Skip to content

[Prometheus Exporter] Unable to disable otel_scope_name attribute #2442

@timwoj

Description

@timwoj

According to the spec for the Prometheus exporter:

Prometheus exporters SHOULD provide a configuration option to disable the otel_scope_info metric and otel_scope_ labels.

I can't find any way to actually disable these. The prometheus exporter would disable them assuming the strings passed in via the scope data are empty. The data in the InstrumentationScope that gets passed into the exporter comes from agruments passed to GetMeter(). Passing a blank string for library_name would ostensibly disable it based on the code in the exporter, but passing a blank there results in an error:

[Warning] File: <>/auxil/opentelemetry-cpp/sdk/src/metrics/meter_provider.cc:54 [MeterProvider::GetMeter] Library name is empty.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedGood for taking. Extra help will be provided by maintainerstriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions