Skip to content

Commit 251b3c1

Browse files
committed
resolve conflicts
2 parents 076144c + 4f98519 commit 251b3c1

File tree

287 files changed

+6751
-3144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+6751
-3144
lines changed

.github/component_owners.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ components:
3535
sdk-extension/opentelemetry-sdk-extension-aws:
3636
- NathanielRN
3737
- Kausik-A
38+
- srprash
3839

3940
instrumentation/opentelemetry-instrumentation-tortoiseorm:
4041
- tonybaloney

.github/workflows/instrumentations_0.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
9+
CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
1010

1111
jobs:
1212
instrumentations-0:
@@ -66,7 +66,6 @@ jobs:
6666
- "redis"
6767
- "remoulade"
6868
- "requests"
69-
- "sklearn"
7069
- "sqlalchemy"
7170
- "sqlite3"
7271
- "starlette"
@@ -75,14 +74,6 @@ jobs:
7574
- "tortoiseorm"
7675
os: [ubuntu-20.04]
7776
exclude:
78-
- python-version: py39
79-
package: "sklearn"
80-
- python-version: py310
81-
package: "sklearn"
82-
- python-version: py311
83-
package: "sklearn"
84-
- python-version: py312
85-
package: "sklearn"
8677
- python-version: py312
8778
package: "boto"
8879
- python-version: py312
@@ -103,8 +94,6 @@ jobs:
10394
package: "remoulade"
10495
- python-version: pypy3
10596
package: "requests"
106-
- python-version: pypy3
107-
package: "sklearn"
10897
- python-version: pypy3
10998
package: "confluent-kafka"
11099
- python-version: pypy3
@@ -125,6 +114,6 @@ jobs:
125114
path: |
126115
.tox
127116
~/.cache/pip
128-
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
117+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
129118
- name: run tox
130-
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
119+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra

.github/workflows/instrumentations_1.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
9+
CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
1010

1111
jobs:
1212
instrumentations-1:
@@ -35,7 +35,10 @@ jobs:
3535
- "sdk-extension-aws"
3636
- "propagator-aws-xray"
3737
- "propagator-ot-trace"
38+
- "resource-detector-azure"
3839
- "resource-detector-container"
40+
- "util-http"
41+
- "fastapi-slim"
3942
os: [ubuntu-20.04]
4043
exclude:
4144
- python-version: pypy3
@@ -56,6 +59,6 @@ jobs:
5659
path: |
5760
.tox
5861
~/.cache/pip
59-
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
62+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
6063
- name: run tox
61-
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
64+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra

.github/workflows/lint.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
9+
CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
1010

1111
jobs:
1212
lint-3_12:
@@ -68,8 +68,10 @@ jobs:
6868
- "processor-baggage"
6969
- "propagator-aws-xray"
7070
- "propagator-ot-trace"
71+
- "resource-detector-azure"
7172
- "resource-detector-container"
7273
- "sdk-extension-aws"
74+
- "util-http"
7375
os: [ubuntu-20.04]
7476
runs-on: ubuntu-20.04
7577
steps:
@@ -91,31 +93,3 @@ jobs:
9193
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
9294
- name: run tox
9395
run: tox -e lint-${{ matrix.package }}
94-
95-
lint-3_8:
96-
strategy:
97-
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
98-
matrix:
99-
package:
100-
- "instrumentation-sklearn"
101-
os: [ubuntu-20.04]
102-
runs-on: ubuntu-20.04
103-
steps:
104-
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
105-
uses: actions/checkout@v4
106-
- name: Set up Python 3.8
107-
uses: actions/setup-python@v5
108-
with:
109-
python-version: 3.8
110-
- name: Install tox
111-
run: pip install tox
112-
- name: Cache tox environment
113-
# Preserves .tox directory between runs for faster installs
114-
uses: actions/cache@v4
115-
with:
116-
path: |
117-
.tox
118-
~/.cache/pip
119-
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
120-
- name: run tox
121-
run: tox -e lint-${{ matrix.package }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
9+
CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
1010

1111
jobs:
1212
misc:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ _build/
5858
# mypy
5959
.mypy_cache/
6060
target
61+
62+
# Benchmark result files
63+
*-benchmark.json

CHANGELOG.md

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- `opentelemetry-instrumentation-aws-lambda` Bugfix: AWS Lambda event source key incorrect for SNS in instrumentation library.
11-
([#2612](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2612))
12-
- `opentelemetry-instrumentation-system-metrics` Permit to use psutil 6.0+.
13-
([#2630](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2630))
10+
## Version 1.26.0/0.47b0 (2024-07-23)
1411

1512
### Added
1613

14+
- `opentelemetry-instrumentation-flask` Add `http.route` and `http.target` to metric attributes
15+
([#2621](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2621))
16+
- `opentelemetry-instrumentation-aws-lambda` Enable global propagator for AWS instrumentation
17+
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
18+
- `opentelemetry-instrumentation-sklearn` Deprecated the sklearn instrumentation
19+
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
1720
- `opentelemetry-instrumentation-pyramid` Record exceptions raised when serving a request
1821
([#2622](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2622))
1922
- `opentelemetry-sdk-extension-aws` Add AwsXrayLambdaPropagator
2023
([#2573](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2573))
2124
- `opentelemetry-instrumentation-confluent-kafka` Add support for version 2.4.0 of confluent_kafka
2225
([#2616](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2616))
26+
- `opentelemetry-instrumentation-asyncpg` Add instrumentation to cursor based queries
27+
([#2501](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2501))
2328
- `opentelemetry-instrumentation-confluent-kafka` Add support for produce purge
2429
([#2638](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2638))
30+
- `opentelemetry-instrumentation-asgi` Implement new semantic convention opt-in with stable http semantic conventions
31+
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
32+
- `opentelemetry-instrumentation-fastapi` Implement new semantic convention opt-in with stable http semantic conventions
33+
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
34+
- `opentelemetry-instrumentation-httpx` Implement new semantic convention opt-in migration with stable http semantic conventions
35+
([#2631](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2631))
36+
- `opentelemetry-instrumentation-system-metrics` Permit to use psutil 6.0+.
37+
([#2630](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2630))
38+
- `opentelemetry-instrumentation-system-metrics` Add support for capture open file descriptors
39+
([#2652](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2652))
40+
- `opentelemetry-instrumentation-httpx` Add support for instrument client with proxy
41+
([#2664](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2664))
42+
- `opentelemetry-instrumentation-aiohttp-client` Implement new semantic convention opt-in migration
43+
([#2673](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2673))
44+
- `opentelemetry-instrumentation-django` Add `http.target` to Django duration metric attributes
45+
([#2624](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2624))
46+
- `opentelemetry-instrumentation-urllib3` Implement new semantic convention opt-in migration
47+
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
48+
- `opentelemetry-instrumentation-django` Implement new semantic convention opt-in with stable http semantic conventions
49+
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
2550

2651
### Breaking changes
2752

2853
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette` Use `tracer` and `meter` of originating components instead of one from `asgi` middleware
2954
([#2580](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2580))
55+
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `asgi` middleware
56+
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
57+
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` middleware
58+
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
59+
- `opentelemetry-instrumentation-urllib3` Populate `{method}` as `HTTP` on `_OTHER` methods for span name
60+
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
61+
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` instrumentation
62+
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
63+
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `django` middleware
64+
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
65+
- `opentelemetry-instrumentation-httpx`, `opentelemetry-instrumentation-aiohttp-client`,
66+
`opentelemetry-instrumentation-requests` Populate `{method}` as `HTTP` on `_OTHER` methods
67+
([#2726](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2726))
68+
- `opentelemetry-instrumentation-fastapi` Add dependency support for fastapi-slim
69+
([#2702](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2702))
70+
- `opentelemetry-instrumentation-urllib3` improve request_hook, replacing `headers` and `body` parameters with a single `request_info: RequestInfo` parameter that now contains the `method` and `url` ([#2711](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2711))
3071

3172
### Fixed
3273

74+
- Handle `redis.exceptions.WatchError` as a non-error event in redis instrumentation
75+
([#2668](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2668))
3376
- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
3477
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
3578
- Add Python 3.12 support
@@ -38,6 +81,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3881
([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590))
3982
- Reference symbols from generated semantic conventions
4083
([#2611](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2611))
84+
- `opentelemetry-instrumentation-psycopg` Bugfix: Handle empty statement.
85+
([#2644](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2644))
86+
- `opentelemetry-instrumentation-confluent-kafka` Confluent Kafka: Ensure consume span is ended when consumer is closed
87+
([#2640](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2640))
88+
- `opentelemetry-instrumentation-asgi` Fix generation of `http.target` and `http.url` attributes for ASGI apps
89+
using sub apps
90+
([#2477](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2477))
91+
- `opentelemetry-instrumentation-aws-lambda` Bugfix: AWS Lambda event source key incorrect for SNS in instrumentation library.
92+
([#2612](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2612))
93+
- `opentelemetry-instrumentation-asyncio` instrumented `asyncio.wait_for` properly raises `asyncio.TimeoutError` as expected
94+
([#2637](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2637))
95+
- `opentelemetry-instrumentation-django` Handle exceptions from request/response hooks
96+
([#2153](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2153))
97+
- `opentelemetry-instrumentation-asgi` Removed `NET_HOST_NAME` AND `NET_HOST_PORT` from active requests count attribute
98+
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
99+
- `opentelemetry-instrumentation-asgi` Bugfix: Middleware did not set status code attribute on duration metrics for non-recording spans.
100+
([#2627](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2627))
101+
41102

42103
## Version 1.25.0/0.46b0 (2024-05-31)
43104

@@ -145,7 +206,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
145206
([#2136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2136))
146207
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
147208
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
148-
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
209+
- AwsLambdaInstrumentor handles and re-raises function exception
210+
([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
149211

150212
### Added
151213

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ for more detail on available tox commands.
9696
9797
### Benchmarks
9898

99-
Performance progression of benchmarks for packages distributed by OpenTelemetry Python can be viewed as a [graph of throughput vs commit history](https://opentelemetry-python-contrib.readthedocs.io/en/latest/performance/benchmarks.html). From the linked page, you can download a JSON file with the performance results.
100-
101-
Running the `tox` tests also runs the performance tests if any are available. Benchmarking tests are done with `pytest-benchmark` and they output a table with results to the console.
99+
Some packages have benchmark tests. To run them, run `tox -f benchmark`. Benchmark tests use `pytest-benchmark` and they output a table with results to the console.
102100

103101
To write benchmarks, simply use the [pytest benchmark fixture](https://pytest-benchmark.readthedocs.io/en/latest/usage.html#usage) like the following:
104102

@@ -114,10 +112,10 @@ def test_simple_start_span(benchmark):
114112
benchmark(benchmark_start_as_current_span, "benchmarkedSpan", 42)
115113
```
116114

117-
Make sure the test file is under the `tests/performance/benchmarks/` folder of
115+
Make sure the test file is under the `benchmarks/` folder of
118116
the package it is benchmarking and further has a path that corresponds to the
119117
file in the package it is testing. Make sure that the file name begins with
120-
`test_benchmark_`. (e.g. `propagator/opentelemetry-propagator-aws-xray/tests/performance/benchmarks/trace/propagation/test_benchmark_aws_xray_propagator.py`)
118+
`test_benchmark_`. (e.g. `propagator/opentelemetry-propagator-aws-xray/benchmarks/trace/propagation/test_benchmark_aws_xray_propagator.py`)
121119

122120
## Pull Requests
123121

@@ -271,6 +269,9 @@ Below is a checklist of things to be mindful of when implementing a new instrume
271269
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L234>
272270
- Appropriate error handling
273271
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L220>
272+
- Isolate sync and async test
273+
- For synchronous tests, the typical test case class is inherited from `opentelemetry.test.test_base.TestBase`. However, if you want to write asynchronous tests, the test case class should inherit also from `IsolatedAsyncioTestCase`. Adding asynchronous tests to a common test class can lead to tests passing without actually running, which can be misleading.
274+
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py#L84>
274275

275276
## Expectations from contributors
276277

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc
110110
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):
111111

112112
- [Aaron Abbott](https://github.com/aabmass), Google
113+
- [Emídio Neto](https://github.com/emdneto), Zenvia
113114
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
114115
- [Owais Lone](https://github.com/owais), Splunk
115116
- [Pablo Collins](https://github.com/pmcollins), Splunk

_template/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.47b0.dev"
15+
__version__ = "0.48b0.dev"

0 commit comments

Comments
 (0)