-
Notifications
You must be signed in to change notification settings - Fork 555
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
394
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
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
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3152 +/- ##
==========================================
+ Coverage 80.70% 84.95% +4.24%
==========================================
Files 156 158 +2
Lines 16498 15372 -1126
Branches 2806 2431 -375
==========================================
- Hits 13315 13059 -256
+ Misses 2295 1560 -735
+ Partials 888 753 -135
|
d4b1d00
to
4428ee9
Compare
It is not ready yet and i do not want to push dog fooding back again.
extracted from https://github.com/getsentry/sentry-python/pull/4487/files with lots of manual fixes * migrate old style `# type: bla` to inline types * most importantly use [`__future__.annotations`](https://peps.python.org/pep-0563/#enabling-the-future-behavior-in-python-3-7) so that we can simply use forward annotations without wrapping them in strings like we did before, this simplifies things substantially * also guard only things that shouldn't be imported under `TYPE_CHECKING`, in the future it seems we should avoid using `TYPE_CHECKING` completely * #4510 * #4522 * #4529 * #4530 * #4532 * #4533 * #4534 closes #2585
Ensure tag values are strings before serializing an event or a transaction to an `Event` dictionary. Fixes #4391 Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
We currently use an `if self._ctx_token` check to determine if a span has a `_ctx_token`. However, this check is incorrect, since `_ctx_token` is only sometimes set. Furthermore, when `_ctx_token` is set, we should always have a `_ctx_token`. Therefore, using `hasattr` is what we want. <!-- Describe your PR here --> --- Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`. Running the test suite on your PR might require maintainer approval.
Port the `openai-agents` integration to `potel-base`. --------- Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io> Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
The main change is that `op` is now optional and `name` and `description` are basically interchangeable and map to each other as best as possible. Preference is given to explicitly set values (`SentrySpanAttribute`) and if not (in the case of pure otel spans), we try to derive them. The entire flow is **much** cleaner now instead of repeated calls to the same attributes. (For the main mapping changes in `opentelemetry/test_utils` I'd recommend reading the new code instead of the diff.)
Allow to turn off span creation based on span origin. This is a nice-to-have that's useful when you're double instrumenting a library with e.g. Sentry and OpenTelemetry and you want to turn off Sentry spans. (On the OTel side you can also disable specific instrumentation. By adding the possibility to do this on the Sentry side of things, we enable users to pick whichever they prefer.)
All our integrations follow the `setup_once` logic while the otel patching was being done for each `Client` again leading to recursive patching. This was revealed by removing the transport test forks.
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.
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