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

Add debug logging to metric signal #3722

Closed
MrAlias opened this issue Feb 13, 2023 · 2 comments · Fixed by #4315
Closed

Add debug logging to metric signal #3722

MrAlias opened this issue Feb 13, 2023 · 2 comments · Fixed by #4315
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Feb 13, 2023

Similar to the trace signal we need to have a way for users to debug the system. Add logging to show flow of data.

@MrAlias MrAlias added pkg:SDK Related to an SDK package area:metrics Part of OpenTelemetry Metrics labels Feb 13, 2023
@clesleycode
Copy link

What level of detail would you suggest? The first things that come to mind are:

  1. Metric name
  2. Timestamp
  3. Instrumentation library
  4. Labels
  5. Exporter type
  6. Aggregation type

@MadVikingGod
Copy link
Contributor

I would think that 1, 2, 3, and 4 would have us recreating the metrics in debug logs.

Instead, I would want to capture the configuration of the SDK, similar to what the Tracer does, and events related to SDK operations, like when a periodic reader fires information related to what was exported. Maybe a line when we first create an instrument.

The goal is not to capture every interaction with our library, because the instrumentor can print their own debug with more context than we would have, but to capture the internal workings that aren't exposed to the instrumentor/user.

@MrAlias MrAlias self-assigned this Jul 14, 2023
MrAlias added a commit to MrAlias/opentelemetry-go that referenced this issue Jul 14, 2023
MrAlias added a commit that referenced this issue Jul 17, 2023
* Add debug logging to the metric SDK

Resolves #3722

* Log MeterProvider and Meter setup at info level

* Add changelog entry

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
@MrAlias MrAlias added this to the v1.17.0/v0.40.0 milestone Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants