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

[chore][service/telemetry] Fill out valid level values and match with definition #12287

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crobert-1
Copy link
Member

Description

This updates the trace and metric configs for service telemetry to have all config options commented, along with the exact case of the defined string constants of each level.

Note: The case of Level doesn't matter in practice as they're all compared in strings.ToLower calls, but I figure exact matching is best here.

@crobert-1 crobert-1 requested a review from a team as a code owner February 4, 2025 22:47
@crobert-1 crobert-1 requested a review from bogdandrutu February 4, 2025 22:47
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.34%. Comparing base (677b87e) to head (8d59bb3).
Report is 173 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12287      +/-   ##
==========================================
+ Coverage   91.31%   91.34%   +0.03%     
==========================================
  Files         465      466       +1     
  Lines       25586    25714     +128     
==========================================
+ Hits        23363    23489     +126     
- Misses       1806     1808       +2     
  Partials      417      417              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// - "basic" is the recommended and covers the basics of the service telemetry.
// - "None" indicates that no tracing data should be collected.
// - "Basic" is the recommended and covers the basics of the service telemetry.
// - "Normal" adds some other indicators on top of basic.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic and Normal aren't documented here because their behaviour is no different from basic for traces.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything currently enforcing the fact that Basic, Normal, and Detailed are all the same at this point?

Out of ignorance, my assumption is that at any point a change could be introduced that makes them different, so we may as well include valid values. Maybe we can add a note that they're currently the same thing? I just lean towards documenting valid values.

// - "None" indicates that no telemetry data should be collected.
// - "Basic" is the recommended and covers the basics of the service telemetry.
// - "Normal" adds some other indicators on top of basic.
// - "Detailed" adds dimensions and views to the previous levels.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this means any documentation/examples should also be updated or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update documentation and examples. It technically doesn't make a difference, but I figure the closer we are to the defined constant, the less likely we are to run into problems.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it a bit more, I think updating documentation examples may be a bit more disconcerting to users than helpful. With the widespread use of these constants in other components (such as the debug exporter), I think it's not worth it. There are also tests to ensure case doesn't impact results, so it should be safe to keep as-is for now.

I can revert this change or leave as-is, let me know if you have a preference.

Copy link
Contributor

github-actions bot commented Mar 5, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants