Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 6 additions & 12 deletions distributions/otelcol-contrib/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks

Expand All @@ -15,16 +16,6 @@ receivers:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

# Collect own metrics
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']

jaeger:
protocols:
grpc:
Expand All @@ -35,7 +26,6 @@ receivers:
endpoint: 0.0.0.0:6831
thrift_http:
endpoint: 0.0.0.0:14268

zipkin:
endpoint: 0.0.0.0:9411

Expand All @@ -47,6 +37,10 @@ exporters:
verbosity: detailed

service:
telemetry:
metrics:
level: basic
address: 0.0.0.0:8888
Copy link
Member

@bogdandrutu bogdandrutu Sep 2, 2025

Choose a reason for hiding this comment

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

This does not work. See https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#v1340v01280 and the telemetry.disableAddressFieldForInternalTelemetry

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the clarification @bogdandrutu .
With just level: basic, the metrics will be exposed on the default (localhost) endpoint, as outlined in the latest documentation. I'll recommit with the removed one accordingly.
Much appreciated!


pipelines:

Expand All @@ -56,7 +50,7 @@ service:
exporters: [debug]

metrics:
receivers: [otlp, prometheus]
receivers: [otlp]
processors: [batch]
exporters: [debug]

Expand Down
18 changes: 6 additions & 12 deletions distributions/otelcol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ receivers:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

# Collect own metrics
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']

jaeger:
protocols:
grpc:
Expand All @@ -48,15 +38,19 @@ exporters:

service:

telemetry:
metrics:
level: basic
address: 0.0.0.0:8888
pipelines:

traces:
receivers: [otlp, jaeger, zipkin]
receivers: [otlp,jaeger,zipkin]
processors: [batch]
exporters: [debug]

metrics:
receivers: [otlp, prometheus]
receivers: [otlp]
processors: [batch]
exporters: [debug]

Expand Down
20 changes: 11 additions & 9 deletions tests/golden/config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
receivers:
# Collect own metrics
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 2s
static_configs:
- targets: ['0.0.0.0:8888']
# Collects-metrics-with-otel
otlp:
protocols:
grpc:
http:
exporters:
debug:
verbosity: detailed
Expand All @@ -19,9 +17,13 @@ exporters:
sending_queue:
enabled: false
service:
telemetry:
metrics:
level: basic
address: 0.0.0.0:8888
pipelines:
metrics:
receivers:
- prometheus
- otlp
exporters:
- otlp