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

Integration with aiopg 1.3.0

Open
#561 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem?
Aiopg 1.3.0 has a breaking change on its internal Context Manager class.
The multiple classes were centralized into a single class called _ContextManager.
The constructor for _ContextManager was also changed accordingly.
Therefore, in order to integrate with aiopg 1.3.0, a further work is required.
Currently, PR #560 has forced the instrumentor not to instrument aiopg 1.3.0.
Before fixing the integration, the restriction will not be released.

Describe the solution you'd like
The best solution here will be a conditional import to support both aiopg 1.3.0 and aiopg < 1.3.0.
The conditional import can address the difference between 1.3.0 and < 1.3.0 in Context Manager and reconstruct the same property object.
The main logic then will share that object to run the code.
A set of new test cases under aiopg instrumentors should also be created to test against 1.3.0 and < 1.3.0.

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 in the aiopg instrumentors and inspect the existing Context Manager integration, then review PR #560 and the aiopg version handling. Add coverage for both aiopg 1.3.0 and earlier versions, and confirm the instrumentor works without the current version restriction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.