Skip to content

Conversation

@cijothomas
Copy link
Member

Continuing from #2330.
Also realized the opentelemetry crate did not internal-logs ff enabled by default, and fixed it.

@cijothomas cijothomas requested a review from a team as a code owner November 23, 2024 20:57
**provider = Arc::new(new_provider);
otel_info!(name: "MeterProvider.GlobalSet", message = "Global meter provider is set. Meters can now be created using global::meter() or global::meter_with_scope().");
} else {
otel_error!(name: "MeterProvider.GlobalSetFailed", message = "Global meter provider is not set due to lock poison. Meters created using global::meter() or global::meter_with_scope() will not function.");
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if this (lock poison) is ever user-actionable... Maybe just state "OTel internal error occurred, report it at OpenTelemtry Github repo"?

Copy link
Member

@lalitb lalitb Nov 23, 2024

Choose a reason for hiding this comment

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

It's not user-actionable in its current form. If set_meter_provider returned a PoisonError, users could retrieve provider from this error object, reinitialize it to Noop and retry. In current form, it's better to log the error and instruct users to report it to the repository.

Copy link
Member Author

Choose a reason for hiding this comment

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

will change it in next PR

@codecov
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.5%. Comparing base (8c9babb) to head (0ea1393).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry/src/global/metrics.rs 83.3% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2331     +/-   ##
=======================================
- Coverage   79.5%   79.5%   -0.1%     
=======================================
  Files        123     123             
  Lines      21295   21297      +2     
=======================================
+ Hits       16935   16936      +1     
- Misses      4360    4361      +1     

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


🚨 Try these New Features:

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM with nit comment to report error to Otel repo.

@cijothomas cijothomas merged commit 5de2caf into open-telemetry:main Nov 24, 2024
22 of 23 checks passed
@cijothomas cijothomas deleted the cijothomas/internallogs3 branch November 24, 2024 02:37
pitoniak32 pushed a commit to pitoniak32/opentelemetry-rust that referenced this pull request Dec 4, 2024
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