-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Component(s)
service
What happened?
Describe the bug
Most of my otelc instances scrape the default internal telemetry with a prometheus job like this:
receivers:
prometheus/default:
config:
scrape_configs:
- job_name: otel-collector-self-metrics
static_configs:
- targets: ['localhost:8888']this works fine and it looks like it has without_type_suffix and without_units internally set to true.
However when you explicitly declare internal-telemetry - to e.g. change the host - without_type_suffix and without_units now default to false
So for to restore the original behavior you have to manually without_type_suffix and without_units to true.
service:
# https://opentelemetry.io/docs/collector/internal-telemetry/
telemetry:
metrics:
readers:
- pull:
exporter:
prometheus:
host: '[::0]'
port: 8888
# https://github.com/open-telemetry/opentelemetry-collector/blob/v0.125.0/CHANGELOG.md#v1250v01190
without_type_suffix: true
without_units: trueSteps to reproduce
- Start a default otelc and let it scrape it's metrics and store the somewhere
- There should be a metric named
otelcol_process_memory_rss - Add
service: telemetry: metrics: readers: - pull: exporter: prometheus: host: '[::0]' port: 8888
- Restart the collector
- The metric
otelcol_process_memory_rssshould vanish and now you getotelcol_process_memory_rss_bytes❌
What did you expect to see?
without_type_suffix and without_units should default to true if nothing is configured as is the case when not explicitly declaring internal-telemetry.
What did you see instead?
Already described above
Collector version
0.135.0
Environment information
Environment
OS: Docker - otel/opentelemetry-collector-contrib:0.135.0
OpenTelemetry Collector configuration
receivers:
prometheus/default:
config:
scrape_configs:
- job_name: otel-collector-self-metrics
static_configs:
- targets: ['localhost:8888']
...Log output
-Additional context
The documentation also doesn't refer to without_type_suffix and without_units and similar options and it should be updated.
I only found out about the change after manually checking the changelogs.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.