Skip to content

Commit a38aa6a

Browse files
Set OTLP receiver endpoint (#1662)
* Set OTelCol receiver endpoint * changelog * Apply suggestions from code review Co-authored-by: Roger Coll <roger.coll@elastic.co> * Add env vars to collector container --------- Co-authored-by: Roger Coll <roger.coll@elastic.co>
1 parent c417bdb commit a38aa6a

6 files changed

+16
-1
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ IMAGE_NAME=ghcr.io/open-telemetry/demo
66
DEMO_VERSION=latest
77

88
# Dependent images
9-
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1
9+
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.104.0
1010
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2
1111
GRAFANA_IMAGE=grafana/grafana:10.4.3
1212
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ the release.
2525
([#1634](https://github.com/open-telemetry/opentelemetry-demo/pull/1634))
2626
* [otel-col] Add docker stats receiver
2727
([#1650](https://github.com/open-telemetry/opentelemetry-demo/pull/1650))
28+
* [otel-col] Set OTLP receiver endpoint to avoid breaking changes
29+
([#1662](https://github.com/open-telemetry/opentelemetry-demo/pull/1662))
2830

2931
## 1.10.0
3032

docker-compose-tests_include-override.yml

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ services:
55

66
otelcol:
77
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-tracetest.yml" ]
8+
environment:
9+
- ENVOY_PORT
10+
- OTEL_COLLECTOR_HOST
11+
- OTEL_COLLECTOR_PORT_GRPC
12+
- OTEL_COLLECTOR_PORT_HTTP
813
volumes:
914
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
1015
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml

docker-compose.minimal.yml

+3
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ services:
596596
logging: *logging
597597
environment:
598598
- ENVOY_PORT
599+
- OTEL_COLLECTOR_HOST
600+
- OTEL_COLLECTOR_PORT_GRPC
601+
- OTEL_COLLECTOR_PORT_HTTP
599602

600603
# Prometheus
601604
prometheus:

docker-compose.yml

+3
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ services:
706706
logging: *logging
707707
environment:
708708
- ENVOY_PORT
709+
- OTEL_COLLECTOR_HOST
710+
- OTEL_COLLECTOR_PORT_GRPC
711+
- OTEL_COLLECTOR_PORT_HTTP
709712

710713
# Prometheus
711714
prometheus:

src/otelcollector/otelcol-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ receivers:
55
otlp:
66
protocols:
77
grpc:
8+
endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_GRPC}
89
http:
10+
endpoint: ${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
911
cors:
1012
allowed_origins:
1113
- "http://*"

0 commit comments

Comments
 (0)