open-telemetry / open-telemetry/opentelemetry-python

Question: do newer versions of exporters work with older versions of sdk?

Open
#4,881 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Didn't want to report this as a bug before double checking that it is a setup issue but our services use autoinstrumentation for python via opentel operator image for kuberenetes.

However, when our services start up we saw the following:

from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
File "/src/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/init.py", line 25, in
from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
File "/src/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 85, in
from opentelemetry.sdk._shared_internal import DuplicateFilter
ImportError: cannot import name 'DuplicateFilter' from 'opentelemetry.sdk._shared_internal' (/otel-auto-instrumentation-python/opentelemetry

This occurs when our service uses a newer version of the opentel sdk such as 0.60b0 but the autoinstrumentation image being used along with it in kuberenetes is 0.57b0. It looks like the newer version of the sdk (v1.37.x-0.58bx) added in the DuplicateFilter which is used in the opentelemetry-exporter-otlp-proto-grpc.

So my question is, when using the autoinstrumentation images along with the sdk, do the versions of the sdk have to match?? Or, should newer versions be backwards compatible?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the autoinstrumentation Python image version 0.57b0 with the service SDK and exporter versions around 0.60b0 and 0.58bx. Trace the imports in opentelemetry/exporter/otlp/proto/grpc/trace_exporter/init.py and exporter.py, alongside opentelemetry.sdk._shared_internal, to establish the supported version relationship. Done means the compatibility behavior and required version matching are documented or reproducibly clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, python
Domain
backend, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.