Skip to content

Commit

Permalink
Set OTLP receiver endpoint (#1662)
Browse files Browse the repository at this point in the history
* Set OTelCol receiver endpoint

* changelog

* Apply suggestions from code review

Co-authored-by: Roger Coll <[email protected]>

* Add env vars to collector container

---------

Co-authored-by: Roger Coll <[email protected]>
  • Loading branch information
julianocosta89 and rogercoll authored Jul 12, 2024
1 parent c417bdb commit a38aa6a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IMAGE_NAME=ghcr.io/open-telemetry/demo
DEMO_VERSION=latest

# Dependent images
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.104.0
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2
GRAFANA_IMAGE=grafana/grafana:10.4.3
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ the release.
([#1634](https://github.com/open-telemetry/opentelemetry-demo/pull/1634))
* [otel-col] Add docker stats receiver
([#1650](https://github.com/open-telemetry/opentelemetry-demo/pull/1650))
* [otel-col] Set OTLP receiver endpoint to avoid breaking changes
([#1662](https://github.com/open-telemetry/opentelemetry-demo/pull/1662))

## 1.10.0

Expand Down
5 changes: 5 additions & 0 deletions docker-compose-tests_include-override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ services:

otelcol:
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-tracetest.yml" ]
environment:
- ENVOY_PORT
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP
volumes:
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ services:
logging: *logging
environment:
- ENVOY_PORT
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP

# Prometheus
prometheus:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ services:
logging: *logging
environment:
- ENVOY_PORT
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP

# Prometheus
prometheus:
Expand Down
2 changes: 2 additions & 0 deletions src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_GRPC}
http:
endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
cors:
allowed_origins:
- "http://*"
Expand Down

0 comments on commit a38aa6a

Please sign in to comment.