Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ This is a [Docker Compose](https://docs.docker.com/compose/) configuration that
- Narcissus screenshot service (container `narcissus`) at [http://localhost:8687](http://localhost:8687)
- Fetch fact-checking service (container `fetch`) at [http://localhost:8687/about](http://localhost:8687/about)
- Search v2 prototype application (container `search`) at [http://localhost:8001](http://localhost:8001)
- Otel Collector – you can configure receivers, processors and exporters in the otel-collector-config.yaml

## Testing

Expand Down
8 changes: 5 additions & 3 deletions docker-compose.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the commented lines in this file here because we don’t need them anymore (in which case, why not just delete them?), or because we’re supposed to uncomment them to enable something?
If it’s the latter, could you please add comments to clarify this (or add instructions to the README)?
For example: “Uncomment the X lines below to enable OTEL.”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we first added the otel-collector we opted to keep it commented out, because we won't be running by default locally. I'll add a comment, and see if it makes sense to add something to the README.

Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
pender:
# env_file:
# - ./pender/.env
build: pender
platform: linux/x86_64
shm_size: 1G
Expand Down Expand Up @@ -160,13 +162,13 @@ services:
SERVER_PORT: 3200
networks:
- dev
# If you want to run the OpenTelemetry Collector, uncomment the lines below
# otel-collector:
# image: otel/opentelemetry-collector-contrib
# volumes:
# - ./pender/config/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# depends_on:
# - pender
# - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# environment:
# x_honeycomb_team: ${X_HONEYCOMB_TEAM} # Set this env var in your shell before running docker-compose
# RAILS_ENV: development
# SERVER_PORT: 3200
# networks:
Expand Down
35 changes: 35 additions & 0 deletions otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
receivers:
prometheus:
config:
scrape_configs:
- job_name: "prometheus"
scrape_interval: 15s
static_configs:
- targets: ["pender:3200"]

processors:
memory_limiter:
check_interval: 1s
limit_percentage: 80
spike_limit_percentage: 20
batch:
timeout: 200ms
send_batch_size: 8192

exporters:
otlp/metrics:
endpoint: "api.honeycomb.io:443" # US instance
#endpoint: "api.eu1.honeycomb.io:443" # EU instance
headers:
"x-honeycomb-team": ${env:x_honeycomb_team} # Honeycomb API KEY
"x-honeycomb-dataset": "pender"

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