Skip to content

Commit 3102460

Browse files
Merge branch 'main' into feature/flask-attr-in-metric
2 parents 827dc07 + 881a179 commit 3102460

File tree

287 files changed

+2541
-1446
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

+2541
-1446
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

-19
This file was deleted.
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: Bug Report
3+
description: Create a report to help us improve
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report! Please make sure to fill out the entire form below, providing as much context as you can in order to help us triage and track down your bug as quickly as possible.
10+
11+
Before filing a bug, please be sure you have searched through [existing bugs](https://github.com/open-telemetry/opentelemetry-python-contrib/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) to see if your bug is already addressed.
12+
13+
- type: textarea
14+
id: environment
15+
attributes:
16+
label: Describe your environment
17+
description: |
18+
Please describe any aspect of your environment relevant to the problem, including your Python version, [platform](https://docs.python.org/3/library/platform.html), version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
19+
value: |
20+
OS: (e.g, Ubuntu)
21+
Python version: (e.g., Python 3.8.10)
22+
Package version: (e.g., 0.46.0)
23+
24+
- type: textarea
25+
attributes:
26+
label: What happened?
27+
description: Please provide as much detail as you reasonably can.
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
attributes:
33+
label: Steps to Reproduce
34+
description: Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible and the needed steps to reproduce the problem.
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
attributes:
40+
label: Expected Result
41+
description: What did you expect to see?
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
attributes:
47+
label: Actual Result
48+
description: What did you see instead?
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: additional-context
54+
attributes:
55+
label: Additional context
56+
description: Add any other context about the problem here.
57+
placeholder: Any additional information...
58+
59+
- type: dropdown
60+
id: contribute
61+
attributes:
62+
label: Would you like to implement a fix?
63+
description: For guidance on how to get started, refer to the [contribution guide](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CONTRIBUTING.md).
64+
options:
65+
- "No"
66+
- "Yes"

.github/ISSUE_TEMPLATE/config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contact_links:
2+
- name: Slack
3+
url: https://cloud-native.slack.com/archives/C01PD4HUVBL
4+
about: Or the `#otel-python` channel in the CNCF Slack instance.

.github/ISSUE_TEMPLATE/feature_request.md

-19
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Feature Request
3+
description: Suggest an idea for this project
4+
labels: [feature-request]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before opening a feature request against this repo, consider whether the feature should/could be implemented in the [other OpenTelemetry client libraries](https://github.com/open-telemetry/). If so, please [open an issue on opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification/issues/new) first.
10+
- type: textarea
11+
id: related-problem
12+
attributes:
13+
label: What problem do you want to solve?
14+
description: Is your feature request related to a problem? If so, provide a concise description of the problem.
15+
placeholder: Describe the problem and include relevant issue IDs
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Describe the solution you'd like
22+
description: What do you want to happen instead? What is the expected behavior?
23+
placeholder: I'd like to ...
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: Which alternative solutions or features have you considered?
31+
placeholder: Some potential solutions
32+
validations:
33+
required: false
34+
- type: textarea
35+
id: additional-context
36+
attributes:
37+
label: Additional Context
38+
description: Add any other context about the feature request here.
39+
placeholder: Some related requests in other projects or upstream spec proposals.
40+
validations:
41+
required: false
42+
- type: dropdown
43+
id: contribute
44+
attributes:
45+
label: Would you like to implement a fix?
46+
description: |
47+
For guidance on how to get started, refer to the [contribution guide](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CONTRIBUTING.md).
48+
options:
49+
- "No"
50+
- "Yes"

.github/workflows/instrumentations_0.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2
9+
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
1010

1111
jobs:
1212
instrumentations-0:
@@ -16,13 +16,14 @@ jobs:
1616
py39: 3.9
1717
py310: "3.10"
1818
py311: "3.11"
19+
py312: "3.12"
1920
pypy3: pypy-3.8
2021
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
2122
runs-on: ${{ matrix.os }}
2223
strategy:
2324
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2425
matrix:
25-
python-version: [py38, py39, py310, py311, pypy3]
26+
python-version: [py38, py39, py310, py311, py312, pypy3]
2627
package:
2728
# Do not add more instrumentations here, add them in instrumentations_1.yml.
2829
# The reason for this separation of instrumentations into more than one YAML file is
@@ -80,6 +81,12 @@ jobs:
8081
package: "sklearn"
8182
- python-version: py311
8283
package: "sklearn"
84+
- python-version: py312
85+
package: "sklearn"
86+
- python-version: py312
87+
package: "boto"
88+
- python-version: py312
89+
package: "kafka-python"
8390
- python-version: pypy3
8491
package: "aiopg"
8592
- python-version: pypy3

.github/workflows/instrumentations_1.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2
9+
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
1010

1111
jobs:
1212
instrumentations-1:
@@ -16,13 +16,14 @@ jobs:
1616
py39: 3.9
1717
py310: "3.10"
1818
py311: "3.11"
19+
py312: "3.12"
1920
pypy3: pypy-3.8
2021
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
2122
runs-on: ${{ matrix.os }}
2223
strategy:
2324
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2425
matrix:
25-
python-version: [py38, py39, py310, py311, pypy3]
26+
python-version: [py38, py39, py310, py311, py312, pypy3]
2627
package:
2728
- "urllib"
2829
- "urllib3"
@@ -37,8 +38,6 @@ jobs:
3738
- "resource-detector-container"
3839
os: [ubuntu-20.04]
3940
exclude:
40-
- python-version: py311
41-
package: "prometheus-remote-write"
4241
- python-version: pypy3
4342
package: "prometheus-remote-write"
4443
steps:

.github/workflows/lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 955c92e91b5cd4bcfb43c39efcef086b040471d2
9+
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
1010

1111
jobs:
12-
lint-3_11:
12+
lint-3_12:
1313
strategy:
1414
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1515
matrix:
@@ -75,10 +75,10 @@ jobs:
7575
steps:
7676
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
7777
uses: actions/checkout@v4
78-
- name: Set up Python 3.11
78+
- name: Set up Python 3.12
7979
uses: actions/setup-python@v5
8080
with:
81-
python-version: 3.11
81+
python-version: 3.12
8282
- name: Install tox
8383
run: pip install tox
8484
- name: Cache tox environment

.github/workflows/release.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ jobs:
8181
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
8282
# middle of the package upload causing the action to fail, and certain packages
8383
# might have already been updated, this would be bad.
84-
- name: Publish to TestPyPI
85-
env:
86-
TWINE_USERNAME: '__token__'
87-
TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
88-
run: |
89-
twine upload --repository testpypi --skip-existing --verbose dist/*
84+
# EDIT: 5/31/2024 - TestPypi now requires a verified email. Commenting out as a temporary measure
85+
# until we found TestPypi credentials.
86+
# - name: Publish to TestPyPI
87+
# env:
88+
# TWINE_USERNAME: '__token__'
89+
# TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
90+
# run: |
91+
# twine upload --repository testpypi --skip-existing --verbose dist/*
9092

9193
- name: Publish to PyPI
9294
env:

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 47d5ad7aae5aef31238ca66e55dc550b307c7b35
9+
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
1010

1111
jobs:
1212
misc:

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: 24.3.0
44
hooks:
55
- id: black
6-
language_version: python3.11
6+
language_version: python3.12
77
- repo: https://github.com/pycqa/isort
88
rev: 5.12.0
99
hooks:

.pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,4 +492,4 @@ min-public-methods=2
492492

493493
# Exceptions that will emit a warning when being caught. Defaults to
494494
# "Exception".
495-
overgeneral-exceptions=Exception
495+
overgeneral-exceptions=builtins.Exception

CHANGELOG.md

+38-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Added
11+
12+
- `opentelemetry-sdk-extension-aws` Add AwsXrayLambdaPropagator
13+
([#2573](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2573))
14+
1015
### Breaking changes
1116

17+
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette` Use `tracer` and `meter` of originating components instead of one from `asgi` middleware
18+
([#2580](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2580))
19+
20+
### Fixed
21+
22+
- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
23+
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
24+
- Add Python 3.12 support
25+
([#2572](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2572))
26+
27+
## Version 1.25.0/0.46b0 (2024-05-31)
28+
29+
### Breaking changes
30+
31+
- Add return statement to Confluent kafka Producer poll() and flush() calls when instrumented by ConfluentKafkaInstrumentor().instrument_producer() ([#2527](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2527))
1232
- Rename `type` attribute to `asgi.event.type` in `opentelemetry-instrumentation-asgi`
1333
([#2300](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2300))
1434
- Rename AwsLambdaInstrumentor span attributes `faas.id` to `cloud.resource_id`, `faas.execution` to `faas.invocation_id`
@@ -19,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1939
([#2425](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2425))
2040
- `opentelemetry-instrumentation-flask` Add `http.method` to `span.name`
2141
([#2454](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2454))
42+
- ASGI, FastAPI, Starlette: provide both send and receive hooks with `scope` and `message` for internal spans ([#2546](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2546))
2243

2344
### Added
2445

@@ -36,12 +57,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3657
([#2253](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2253))
3758
- `opentelemetry-instrumentation-pika` Instrumentation for `channel.consume()` (supported
3859
only for global, non channel specific instrumentation)
39-
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397)))
60+
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397))
4061
- `opentelemetry-processor-baggage` Initial release
4162
([#2436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2436))
63+
- `opentelemetry-processor-baggage` Add baggage key predicate
64+
([#2535](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2535))
4265

4366
### Fixed
4467

68+
- `opentelemetry-instrumentation-dbapi` Fix compatibility with Psycopg3 to extract libpq build version
69+
([#2500](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2500))
4570
- `opentelemetry-instrumentation-grpc` AioClientInterceptor should propagate with a Metadata object
4671
([#2363](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2363))
4772
- `opentelemetry-instrumentation-boto3sqs` Instrument Session and resource
@@ -54,6 +79,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5479
([#2461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2461))
5580
- Remove SDK dependency from opentelemetry-instrumentation-grpc
5681
([#2474](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2474))
82+
- `opentelemetry-instrumentation-elasticsearch` Improved support for version 8
83+
([#2420](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2420))
84+
- `opentelemetry-instrumentation-elasticsearch` Disabling instrumentation with native OTel support enabled
85+
([#2524](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2524))
86+
- `opentelemetry-instrumentation-asyncio` Check for __name__ attribute in the coroutine
87+
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
88+
- `opentelemetry-instrumentation-requests` Fix wrong time unit for duration histogram
89+
([#2553](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2553))
90+
- `opentelemetry-util-http` Preserve brackets around literal IPv6 hosts ([#2552](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2552))
91+
- `opentelemetry-util-redis` Fix net peer attribute for unix socket connection ([#2493](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2493))
5792

5893
## Version 1.24.0/0.45b0 (2024-03-28)
5994

@@ -104,6 +139,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
104139
## Version 1.22.0/0.43b0 (2023-12-14)
105140

106141
### Added
142+
107143
- `opentelemetry-instrumentation-asyncio` Add support for asyncio
108144
([#1919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1943))
109145
- `opentelemetry-instrumentation` Added Otel semantic convention opt-in mechanism
@@ -125,7 +161,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
125161
([#1959](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1959))
126162
- `opentelemetry-resource-detector-azure` Added dependency for Cloud Resource ID attribute
127163
([#2072](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2072))
128-
164+
129165
## Version 1.21.0/0.42b0 (2023-11-01)
130166

131167
### Added
@@ -1539,4 +1575,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15391575
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
15401576
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
15411577
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
1542-

0 commit comments

Comments
 (0)