Skip to content

Commit

Permalink
add configuration for otel collector
Browse files Browse the repository at this point in the history
First round of trying to configure the collector.

- Added otel-collector to pender's docker compose, for the first tests.
When I get this working I'll look into adding it to Check.
- Added a otel-collector-config.example.yaml we can use to create the
otel-collector-config.yaml. And updated .gitignore so it does not track
the config.yaml one.
  • Loading branch information
vasconsaurus committed Jun 18, 2024
1 parent f952a1a commit 7df2d95
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ config/cookies.txt
coverage
.idea
.byebug_history
*.env
*.env
otel-collector-config.yaml
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,17 @@ services:
environment:
RAILS_ENV: development
SERVER_PORT: 3200
otel-collector:
image: otel/opentelemetry-collector-contrib
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
depends_on:
- pender
ports:
- 1888:1888 # pprof extension
- 8888:8888 # Prometheus metrics exposed by the Collector
- 8889:8889 # Prometheus exporter metrics
- 13133:13133 # health_check extension
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 55679:55679 # zpages extension
29 changes: 29 additions & 0 deletions otel-collector-config.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
receivers:
prometheus:
config:
scrape_configs:
- job_name: "prometheus"
scrape_interval: 15s
static_configs:
- targets: ["0.0.0.0:3200"]

processors:
batch:

exporters:
otlp/metrics:
endpoint: "api.honeycomb.io:443" # US instance
#endpoint: "api.eu1.honeycomb.io:443" # EU instance
headers:
"x-honeycomb-team": "<Honeycomb API KEY>"
"x-honeycomb-dataset": "pender"

service:
# telemetry:
# logs:
# level: "debug"
pipelines:
metrics:
receivers: [prometheus]
processors: []
exporters: [otlp/metrics]

0 comments on commit 7df2d95

Please sign in to comment.