Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
evantorrie opened this issue Jul 2, 2024 · 2 comments
Open
Assignees
Labels
enhancement New feature or request exporter/debug Issues related to the Debug exporter

Comments

@evantorrie
Copy link

evantorrie commented Jul 2, 2024

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

@mx-psi mx-psi added exporter/debug Issues related to the Debug exporter enhancement New feature or request labels Jul 5, 2024
@andrzej-stencel
Copy link
Member

💯 agree, I believe this is an important and useful enhancement to do.

@andrzej-stencel andrzej-stencel self-assigned this Nov 15, 2024
@andrzej-stencel
Copy link
Member

I'll take this on for the OTel Contribfest at KubeCon NA 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/debug Issues related to the Debug exporter
Projects
None yet
Development

No branches or pull requests

3 participants