Skip to content

[exporter/debug] Include Resource/Scope info in normal verbosity mode #10515

Closed
@evantorrie

Description

@evantorrie

Is your feature request related to a problem? Please describe.

#7806 added a normal verbosity level to the debug exporter. As currently implemented, it outputs a "one-line" textual representation of a telemetry record passing through the exporter. In the original issue, there was discussion about whether Resource and/or Scope information associated with a record.

The format is up for discussion, but I believe having one line per telemetry record might be a good "middle ground". The resource and scope details might or might not also be displayed, I'm open to suggestions.

As implemented in #10225, #10280 and #10462, Resource and Scope information are not included. This leads to the situation where a collector using the debug exporter in normal verbosity level can receive metric data from multiple different entities with different resources and there is no way to distinguish them in the normal verbosity level.

system.cpu.time{cpu=cpu0,state=user} 12.4
system.cpu.time{cpu=cpu0,state=user} 15.3
system.cpu.time{cpu=cpu0,state=user} 0.4

Similarly, it's possible to have two different scopes for the same metric name, and there's no way to distinguish between them in normal mode.

Describe the solution you'd like

I'd like to see some information output about the associated Resource and Scope with perhaps _ prefixed attributes for non-attribute related information such as schema and name/version if they are non-empty.

Resource{_schema=https://opentelemetry.io/schemas/1.9.0,host.name=foo1.io}
Scope{_name=otelcol/hostmetricsreceiver/cpu,_version=0.104.0}
system.cpu.time{cpu=cpu0,state=user} 12.4
Resource{host.name=bar1.io}
Scope{_name=otelcol/hostmetricsreceiver/cpu,_version=0.103.1}
system.cpu.time{cpu=cpu0,state=user} 15.3
Resource{host.name=foo1.io}
Scope{_name=otelcol/hostmetricsreceiver/cpu,_version=0.104.0}
system.cpu.time{cpu=cpu0,state=user} 0.4

Describe alternatives you've considered

No obvious alternatives since this is built in to the debug exporter.
There are other open issues (but no work started) related to this, including

#9372
#9149

Metadata

Metadata

Labels

enhancementNew feature or requestexporter/debugIssues related to the Debug exporter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions