-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: add Otel util func #325
base: main
Are you sure you want to change the base?
feat: add Otel util func #325
Conversation
Signed-off-by: bbland1 <[email protected]>
Signed-off-by: bbland1 <[email protected]>
Signed-off-by: bbland1 <[email protected]>
Signed-off-by: bbland1 <[email protected]>
Signed-off-by: bbland1 <[email protected]>
Signed-off-by: bbland1 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #325 +/- ##
==========================================
+ Coverage 86.78% 88.13% +1.35%
==========================================
Files 13 14 +1
Lines 1362 1408 +46
==========================================
+ Hits 1182 1241 +59
+ Misses 156 143 -13
Partials 24 24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…e based on codecov report Signed-off-by: bbland1 <[email protected]>
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.
This is great, thank you!
…o set what is being set by the if-else Signed-off-by: bbland1 <[email protected]>
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.
Looks good to me! Thanks!
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 had a few thoughts after rereviewing this. I'd consider them all optional but worth consider. Thanks!
…dability Signed-off-by: bbland1 <[email protected]>
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.
Some const values were not used, left comments on what to replace.
no linter caught this.
|
||
contextID, exists := details.EvaluationDetails.ResolutionDetail.FlagMetadata[TelemetryFlagMetaContextId] | ||
if exists && contextID != "" { | ||
attributes[TelemetryFlagMetaContextId] = contextID |
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.
replace to TelemetryContextID ?
if exists && contextID != "" { | ||
attributes[TelemetryFlagMetaContextId] = contextID | ||
} else { | ||
attributes[TelemetryFlagMetaContextId] = hookContext.EvaluationContext().TargetingKey() |
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.
replace to TelemetryContextID ?
|
||
setID, exists := details.EvaluationDetails.ResolutionDetail.FlagMetadata[TelemetryFlagMetaFlagSetId] | ||
if exists { | ||
attributes[TelemetryFlagMetaFlagSetId] = setID |
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.
replace to TelemetryFlagSetID ?
|
||
version, exists := details.EvaluationDetails.ResolutionDetail.FlagMetadata[TelemetryFlagMetaVersion] | ||
if exists { | ||
attributes[TelemetryFlagMetaVersion] = version |
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.
replace to TelemetryVersion ?
This PR
Related Issues
Fixes #322
How to test