-
Notifications
You must be signed in to change notification settings - Fork 549
POtel implementation base branch #3152
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
Draft
sl0thentr0py
wants to merge
350
commits into
master
Choose a base branch
from
potel-base
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+9,012
−12,284
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f7f153c
to
28effd6
Compare
16f9341
to
951477f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3152 +/- ##
==========================================
+ Coverage 80.67% 84.80% +4.13%
==========================================
Files 142 144 +2
Lines 15982 14725 -1257
Branches 2729 2343 -386
==========================================
- Hits 12893 12488 -405
+ Misses 2232 1523 -709
+ Partials 857 714 -143
|
d4b1d00
to
4428ee9
Compare
This moves the creation of breadcrumbs for outgoing HTTP requests from the `maybe_create_breadcrumbs_from_span` into the integrations.
It is possible to use the return value of `sentry_sdk.init` as a context manager; however, this functionality has not been maintained for a long time, and it does not seem to be documented anywhere. So, we are deprecating this functionality, and we will remove it in the next major release. Closes #3282
BREAKING CHANGE: `sentry_sdk.init` now returns `None` instead of a context manager.
* Don't default to OK span status for UNSET, this breaks older behavior * Set transaction name manually on scope after isolation (we should generally do this everywhere)
Closes #4332 --------- Co-authored-by: Daniel Szoke <[email protected]>
Introduce the convention of underscore-prefixed span attributes. These won't be sent to Sentry and are meant for internal SDK usage. Changed `flag.count` to internal. Looked through the rest of the attrs we're setting and that stuff requires a big comprehensive cleanup altogether to make stuff align with OTel. Didn't touch anything else for now. Closes #4329
Revert changing the default of `traces_sample_rate` done in #4240
Store feature flags on the isolation scope, that is the correct place. I also checked back with Colton about the behavior of feature flags, and having the flags on the isolation scope (meaning: one set of flags per request-response cycle) is the expected behavior.
…eader (#4356) Since we don't automatically have unsampled spans running, this caused a change in behavior when an upstream sampling decision needs to be propagated further downstream. ### Explanation of problem When an incoming trace has `sampled` set to 0 (`trace_id-span_id-0`), in the past we would propagate this since we would have an active span/transaction running but just not sampled, so downstream would also receive `trace_id-span_id-0` from that active span. Now, we actually don't have an active span since we don't sample (just how otel works), so instead of sending the `trace_id-span_id-0` as before, we would have sent `trace_id-other_span_id` from the `propagation_context` instead. This would cause the downstream service to not receive the `-0` flag and would thus sample independently, which is a regression.
In some cases FastAPI emits an exception that has as `__cause__` an ExceptionGroup that contains a single excpetion. That single exepction is the original exception. This PR prevents an infinite loop by trying to add this construct in the `exception.values` field. It also introduces an hard upper limit of chained/nested transaction, to never run into an infinite loop.
This PR also needs an update of the docs to make sure people use the top level API. See this docs issue: getsentry/sentry-docs#13592
To preserve behavior form 2.x
Not using plain strings, but always use `SPANDATA`. Follow up to this PR: #4373
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Full state of CI: #3744
Contains:
scope.span =
setter and make surescope.span
reference is correct in context manager regardless of source of span #4439SPANDATA
consistent in AI integrations.` #4376add_atttachment
. #4360set_measurement
#4333propagate_scope=False
inThreadingIntegration
#4310Scope.root_span
logic #4274Scope.root_span
#4273LoggingIntegration
to Sentry by default #4300integrations/opentelemetry/
#4277integrations/opentelemetry/
#4276integrations/opentelemetry/
#4272integrations/opentelemetry/
#4260integrations/opentelemetry/
#4259integrations/opentelemetry/
#4258cache_spans
by default #3994start_span
fail if unsupported args are provided #4201Span.set_data()
#4261sample_rand
to POTel #4106propagate_traces
#4206warnings
module for deprecation messagse. #4180sample_rate
update topotel-base
#4069SystemExit(0)
not as a span status of 'internal_error' #4094use_scope
#3851None
#3816only_if_parent
option to POTelSpan and use it in integrations #3748_serialize_span_attribute
intoset_attribute
#3732subprocess
breadcrumbs frommaybe_create_breadcrumbs_from_span
to integration. #3637add
to trace state if key does not exist #3645op
. #3628make aws lambda layer
#3586use_scope
,use_isolation_scope
#3522use_scope
,use_isolation_scope
#3500OpenTelemetryIntegration
toDEFAULT_INTEGRATIONS
#3471active
flag onPOTelSpan
#3470start_transaction
#3379Hub
and related code for good. #3446Simple test
References
startSpan
& friendsstart_span
& friendsMisc
In OTel, this:
is equivalent to