Skip to content

ref: Move otel scope out of integrations/opentelemetry/ #4276

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

Merged
merged 29 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4b3284c
ref: Move sampler out of integrations/opentelemetry
sentrivana Apr 9, 2025
7741c64
ref: Move span processor out from integrations
sentrivana Apr 9, 2025
cf28b7b
ref: Move propagator out of integrations
sentrivana Apr 9, 2025
f34b066
forgot one
sentrivana Apr 9, 2025
841bd02
move to opentelemetry
sentrivana Apr 10, 2025
38f6886
Merge branch 'potel-base' into ivana/move-sampler-from-integration
sentrivana Apr 10, 2025
2a554c3
move to opentelemetry/
sentrivana Apr 10, 2025
5d6e318
alphabet
sentrivana Apr 10, 2025
89ae39e
move to opentelemetry/
sentrivana Apr 10, 2025
8819373
fix setup.py
sentrivana Apr 10, 2025
3f02f56
Merge branch 'potel-base' into ivana/potel/move-span-processor-out-of…
sentrivana Apr 10, 2025
db2f1b6
formatting
sentrivana Apr 10, 2025
38b051e
Merge branch 'ivana/potel/move-span-processor-out-of-integration' int…
sentrivana Apr 10, 2025
5d9dc58
ref: Move contextvars_context out of integrations
sentrivana Apr 10, 2025
5e26e54
remove comment
sentrivana Apr 10, 2025
c29719c
ref: Move utils, consts out of integrations/opentelemetry/
sentrivana Apr 10, 2025
ea89a5a
get rid of circ deps
sentrivana Apr 10, 2025
1c93520
fix test
sentrivana Apr 10, 2025
67d3117
.
sentrivana Apr 10, 2025
33709ef
.
sentrivana Apr 10, 2025
3c52872
make apidocs happy
sentrivana Apr 10, 2025
b10193d
Merge branch 'potel-base' into ivana/potel/move-span-processor-out-of…
sentrivana Apr 10, 2025
6858c98
ref: Move otel scope out of `integrations/opentelemetry/`
sentrivana Apr 10, 2025
5b3376d
Merge branch 'ivana/potel/move-span-processor-out-of-integration' int…
sentrivana Apr 10, 2025
d16e026
Merge branch 'ivana/potel/move-propagator' into ivana/potel/move-cont…
sentrivana Apr 10, 2025
94ba998
Merge branch 'ivana/potel/move-context-sync' into ivana/potel/move-mo…
sentrivana Apr 10, 2025
29500ac
Merge branch 'ivana/potel/move-more-otel-stuff' into ivana/potel/move…
sentrivana Apr 10, 2025
3a2b671
.
sentrivana Apr 10, 2025
20f6263
Merge branch 'potel-base' into ivana/potel/move-scope-out-of-integrat…
sentrivana Apr 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry_sdk/_init_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import sentry_sdk
from sentry_sdk.consts import ClientConstructor
from sentry_sdk.integrations.opentelemetry.scope import setup_scope_context_management
from sentry_sdk.opentelemetry.scope import setup_scope_context_management

if TYPE_CHECKING:
from typing import Any, Optional
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# TODO-neel-potel make 2 scope strategies/impls and switch
from sentry_sdk.scope import Scope as BaseScope
from sentry_sdk.integrations.opentelemetry.scope import (
from sentry_sdk.opentelemetry.scope import (
PotelScope as Scope,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] are we considering renaming PotelScope to Scope?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but I'd leave it like this for now so that there's a distinction between the non-otel Scope and PotelScope.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually we'll merge both -- unless we need to keep both around for errors-only.

new_scope,
isolation_scope,
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/opentelemetry/contextvars_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if TYPE_CHECKING:
from typing import Optional
from contextvars import Token
import sentry_sdk.integrations.opentelemetry.scope as scope
import sentry_sdk.opentelemetry.scope as scope


class SentryContextVarsRuntimeContext(ContextVarsRuntimeContext):
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/opentelemetry/propagator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

if TYPE_CHECKING:
from typing import Optional, Set
import sentry_sdk.integrations.opentelemetry.scope as scope
import sentry_sdk.opentelemetry.scope as scope


class SentryPropagator(TextMapPropagator):
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def get_file_text(file_name):
"unleash": ["UnleashClient>=6.0.1"],
},
entry_points={
"opentelemetry_propagator": ["sentry=sentry_sdk.opentelemetry:SentryPropagator"]
"opentelemetry_propagator": [
"sentry=sentry_sdk.opentelemetry:SentryPropagator"
],
},
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def benchmark():


from sentry_sdk import scope
from sentry_sdk.integrations.opentelemetry.scope import (
from sentry_sdk.opentelemetry.scope import (
setup_scope_context_management,
setup_initial_scopes,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ScopeType,
should_send_default_pii,
)
from sentry_sdk.integrations.opentelemetry.scope import (
from sentry_sdk.opentelemetry.scope import (
PotelScope as Scope,
use_scope,
use_isolation_scope,
Expand Down
Loading