open-telemetry / open-telemetry/opentelemetry-python-contrib
Custom distro and configurator not loading when added as poetry plugins
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Describe your environment
I had created a python library that implements a custom distro and configurator to add my own sampler and span processor. I created a class that extends BaseDistro and _OTELConfigurator, I had added these in my pyproject.toml like below
[tool.poetry.plugins."opentelemetry_distro"]
customdistro = "libspython.new_distro:OpenTelemetryDistro"
[tool.poetry.plugins."opentelemetry_configurator"]
customconfigurator = "libspython.new_configurator:OpenTelemetryConfigurator"
After build this library, I had added this library in another python project, and ran that application. I see the below warning.
Configuration of customconfigurator not loaded, configurator already loaded
It looks default distro loads before my custom distro loads. I tried setting OTEL_PYTHON_CONFIGURATOR variable as well. But then, it says Configuration of customconfigurator not loaded because configurator is set by OTEL_PYTHON_CONFIGURATOR
Any idea on how to make sure that my custom distro and configurators takes precendence.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the pyproject.toml plugin entries for OpenTelemetryDistro and OpenTelemetryConfigurator, then inspect how the distro and configurator entry points are discovered and selected. Done means a custom distro and configurator can be installed through Poetry and take precedence without the existing warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100