open-telemetry / open-telemetry/opentelemetry-python-contrib

FastAPI/Starlette version spec out of alignment.

Open
#1,420 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-instrumentation help wanted instrumentation
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Describe your environment Building a metapackage builder and noticed some potential issues with starlette instrumentation. Going to avoid providing starlette as part of our metapackager for now (and just assume fastapi instrumentation will be enough for our base)

Steps to reproduce
Attempt to compile a requirements file listing the most recent fastapi and most recent instrumentation for both starlette and fastapi.

What is the expected behavior?
Install both instrumentation for starlette and fastapi along with most recent starlette and fastapi supported by fastapi instrumentation.

What is the actual behavior?
Starlette instrumentation restricted to 0.13.x while most recent fastapi requires a pinned version of starlette at 0.20.4

Could not find a version that matches starlette==0.20.4,~=0.13.0 (from opentelemetry-instrumentation-starlette[instruments]==0.34b0->-r constraints-all.in (line 84))
Tried: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.1.16, 0.1.17, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.12.10, 0.12.11, 0.12.12, 0.12.13, 0.13.0, 0.13.1, 0.13.1, 0.13.2, 0.13.2, 0.13.3, 0.13.3, 0.13.4, 0.13.4, 0.13.5, 0.13.5, 0.13.6, 0.13.6, 0.13.7, 0.13.7, 0.13.8, 0.13.8, 0.14.0, 0.14.0, 0.14.1, 0.14.1, 0.14.2, 0.14.2, 0.15.0, 0.15.0, 0.16.0, 0.16.0, 0.17.0, 0.17.0, 0.17.1, 0.17.1, 0.18.0, 0.18.0, 0.19.0, 0.19.0, 0.19.1, 0.19.1, 0.20.0, 0.20.0, 0.20.1, 0.20.1, 0.20.2, 0.20.2, 0.20.3, 0.20.3, 0.20.4, 0.20.4, 0.21.0, 0.21.0
Skipped pre-versions: 0.12.0b1, 0.12.0b2, 0.12.0b3
There are incompatible versions in the resolved dependencies:
  starlette~=0.13.0 (from opentelemetry-instrumentation-starlette[instruments]==0.34b0->-r constraints-all.in (line 84))
  starlette==0.20.4 (from fastapi==0.85.1->opentelemetry-instrumentation-fastapi[instruments]==0.34b0->-r constraints-all.in (line 64))

Additional context
Just noting this to see if this is an obvious oversight.

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 with the dependency constraints referenced in constraints-all.in at lines 64 and 84, and inspect the package requirements for the FastAPI and Starlette instrumentations. Reproduce the resolver conflict with FastAPI 0.85.1 and instrumentation 0.34b0; done means the supported dependency ranges no longer reject the compatible Starlette version.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.