-
Notifications
You must be signed in to change notification settings - Fork 764
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
[Api] Nullable #5801
[Api] Nullable #5801
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5801 +/- ##
==========================================
+ Coverage 83.38% 86.33% +2.95%
==========================================
Files 297 257 -40
Lines 12531 11193 -1338
==========================================
- Hits 10449 9664 -785
+ Misses 2082 1529 -553
Flags with carried forward coverage won't be shown. Click here to find out more.
|
de9f690
to
8ebf150
Compare
8ebf150
to
8bf04e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with fixes.
While reviewing, please focus on Baggage and RuntimeContext related things.
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
@@ -7,7 +7,7 @@ namespace OpenTelemetry.Metrics; | |||
|
|||
internal sealed class PullMetricScope : IDisposable | |||
{ | |||
private static readonly RuntimeContextSlot<bool> Slot = RuntimeContext.RegisterSlot<bool>("otel.pull_metric"); | |||
private static readonly RuntimeContextSlot<bool> Slot = RuntimeContext.RegisterSlot<bool>("otel.pull_metric")!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one needs a closer look.
I'm not familiar with the RuntimeContext api. If the RegisterSlot method can return a nullable, that might suggest something failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in fe4d9bf
I double checked. There is no possibility to return null (at least as long someone does no play with reflection with contextSlotType
field in RuntimeContext
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes LGTM.
One thing to note, I don't know the Baggage
or RuntimeContext
classes well enough to say if these values SHOULD be nullable.
Towards #3958
Changes
OpenTelemety.Api mark as nullable
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes