Skip to content

Implement scope_info_enabled#3503

Open
ArthurSens wants to merge 1 commit into
open-telemetry:mainfrom
ArthurSens:prometheus-scope-labels
Open

Implement scope_info_enabled#3503
ArthurSens wants to merge 1 commit into
open-telemetry:mainfrom
ArthurSens:prometheus-scope-labels

Conversation

@ArthurSens
Copy link
Copy Markdown
Member

@ArthurSens ArthurSens commented May 7, 2026

Related to #3474, but entirely focused on the implementation of Instrumentation Scope.

Here I'm doing quite a few things:

Disclosure: Although I've done Rust before, I'm not great at it. I do rely on LLMs to write most of the code.

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
@ArthurSens ArthurSens requested a review from a team as a code owner May 7, 2026 18:52
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.8%. Comparing base (f744509) to head (7892625).

Files with missing lines Patch % Lines
opentelemetry-prometheus/src/lib.rs 0.0% 36 Missing ⚠️
opentelemetry-prometheus/src/config.rs 0.0% 19 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3503     +/-   ##
=======================================
- Coverage   82.8%   82.8%   -0.1%     
=======================================
  Files        130     130             
  Lines      27276   27284      +8     
=======================================
- Hits       22609   22608      -1     
- Misses      4667    4676      +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

without_counter_suffixes: bool,
namespace: Option<String>,
disable_scope_info: bool,
scope_info_enabled: bool,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❤️ :)

Comment on lines 95 to 98
pub fn without_scope_info(mut self) -> Self {
self.disable_scope_info = true;
self.scope_info_enabled = false;
self
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I kept the function just for backwards compatibility, but happy to remove it it isn't needed

once_cell = { workspace = true }
opentelemetry = { workspace = true, features = ["metrics", "internal-logs"] }
opentelemetry_sdk = { workspace = true, features = ["metrics", "experimental_metrics_custom_reader"] }
opentelemetry_sdk = { workspace = true, features = ["metrics", "experimental_metrics_custom_reader", "spec_unstable_metrics_views"] }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I honestly don't understand why the LLM decided to add this here lol. I tried doing some research, but it seems way beyond my Rust knowledge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants