-
Notifications
You must be signed in to change notification settings - Fork 539
feat(spans): Record flag evaluations as span attributes #4280
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #4280 +/- ##
==========================================
+ Coverage 79.54% 80.30% +0.75%
==========================================
Files 142 142
Lines 15907 15925 +18
Branches 2723 2724 +1
==========================================
+ Hits 12654 12788 +134
+ Misses 2389 2262 -127
- Partials 864 875 +11
|
Or to simplify we could remove the span specific recording in each integration and on each call to But the down side of that is the flags buffer has no idea what span the flag was evaluated in. So it violates the contract that only flags evaluated within the span are appended to the span as attributes. So we'd need a second buffer which empties after every call to |
What facilities do we have for capping span attributes? Could a customer send a span with one million attributes today? |
@cmanallen We don't cap the # of span attributes today but we will likely cap a) the total size of the event b) the number of attributes or c) both - we haven't made a decision on this yet. |
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.
Generally lgtm, although I have some questions on some items which were unclear to me.
Also, prior to merging these changes, we should settle on semantic conventions for feature flag span data keys and add them to our develop docs and/or the semantic convention docs. I discussed the span conventions with @AbhiPrasad, it sounds like he has some ideas about how we should name span data keys, so you should discuss with him.
"sdk-key", update_processor_class=td, diagnostic_opt_out=True, send_events=False | ||
) | ||
|
||
uninstall_integration(LaunchDarklyIntegration.identifier) |
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.
[question] why are we uninstalling the integration here? My guess is this would reduce the possibility of interactions between tests, but I this is my first time seeing this pattern in our tests so just want to check
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 how I found the test suite so I'm following the pattern. I'm not sure why its necessary or what the implications are if its removed. I could look into this more.
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.
Interesting, perhaps I just haven't touched this part of the codebase – if that's the pattern you can disregard my comment. Maybe @antonpirker or @sentrivana would know why this is needed.
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
…ry/sentry-python into cmanallen/flags-on-spans
Now capping the number of flags to |
@szokeasaurusrex Did you have any more thoughts on this PR? |
@cmanallen nothing to add, just please make sure to address my previous comment: #4280 (review) Specifically to make sure the semantic convention is agreed upon and documented. @AbhiPrasad had some thoughts on this, I can put him as a reviewer |
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.
Awesome, hadn't seen those other conversations/PRs
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.
Exciting!
Flags evaluated within a span are appended to the span as attributes.