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

Hardcode instrumentation name

Open
#4,173 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Instead of relying on __name__ when we get tracers / meters / loggers we should hardcode the instrumentation names so that it's not dependent on the file the code is. A good candidate where to add a variable containing that may be the package.py file. We should also add tests to avoid changing that by mistake.

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 inspecting the relevant package.py file and searching the instrumentation code for tracer, meter, and logger names derived from name. Add tests that verify the instrumentation names remain stable and run the affected test suite to confirm they do not change accidentally.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.