8000 Determine lowest compatible `opentelemetry-distro` (`-api`, `-sdk`) version · Issue #3241 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

Determine lowest compatible opentelemetry-distro (-api, -sdk) version #3241

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

Closed
sentrivana opened this issue Jul 3, 2024 · 2 comments
Closed

Comments

@sentrivana
Copy link
Contributor
sentrivana commented Jul 3, 2024

Version pinning can create issues for folks. We should be as lenient as possible.

We'll be testing our POTel setup with latest OTel packages. Before we switch to POTel and introduce these packages in setup.py for the generic install target (i.e., not [opentelemetry] or [opentelemetry-experimental]), we should dedicate some time to figure out if we need a lower bound on the version.

Once we're confident our OTel setup works well enough with the latest versions of OTel dependencies, retest with lower versions to find out how we work with older versions. On a case by case basis, fix things if easy enough, or decide to introduce a lower bound.

Note: This also affects what Python versions we can support.

@antonpirker
Copy link
Member

Opentelemetry dropped support for Python 3.7 in version 1.23.0 / 0.44b0 on Feb 23, 2024.

So if we want to keep Python 3.7 the highest supported Otel version would be 1.22.0 / 0.43b0.

(1.XX.0 version numbers are for opentelementry-sdk, opentelementry-api, opentelementry-proto. 0.XXb0 version numbers are for opentelemetry-distro)

@antonpirker
Copy link
Member

Our decision for Sentry using OpenTelemetry under the hood:

The Sentry SDK will still keep support for Python 3.7+.

In case users are on Python 3.7 they can use newest Sentry but have to use the OpenTelemetry libraries <= 1.22.0 / 0.43b0.

In case users are on Python 3.8+ they can use newest Sentry and OpenTelementry.

Either way, we want to make sure that the lower bounds of the OpenTelementry dependencies are as low as possible.

@linear linear bot added the Task label Apr 9, 2025
@sentrivana sentrivana self-assigned this Apr 14, 2025
sentrivana added a commit that referenced this issue Apr 24, 2025
With the switch to OTel, the Common test suite is now dependent on an
otel package, so it technically fits the toxgen usecase. By letting
toxgen take care of it, we're making sure we're always testing a good
range of otel versions, including the oldest one (to catch regressions)
and the newest one (to catch incompatibilities early).

Couple things surfaced in terms of incompatibility with older versions:
- Some semantic attributes we're using weren't there from the get go
open-telemetry/opentelemetry-python@495d705.
Changed the code that uses them to handle failure.
- The signature of `span.set_status()` changed at some point
open-telemetry/opentelemetry-python@6e282d2.
Added a compat version of `set_status()` for older otel.

Also included:
- removing the `opentelemetry-experimental` extra (not used anymore)
- ❗ switching to using `opentelemetry-sdk` instead of
`opentelemetry-distro` -- the `distro` only seems to [be setting up some
defaults](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/8390db35ae2062c09d4d74a08d310c7bde1912c4/opentelemetry-distro/src/opentelemetry/distro/__init__.py)
that we're not using


Closes #3241
@stephanie-anderson stephanie-anderson added Python SDK and removed Task labels Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0