Skip to content

Commit 78c7064

Browse files
authored
Merge branch 'main' into chore-4513/drop-py38-support
2 parents a2e0ae5 + 1292c80 commit 78c7064

File tree

159 files changed

+2660
-1797
lines changed

Some content is hidden

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

159 files changed

+2660
-1797
lines changed

.github/workflows/contrib.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ jobs:
1515
uses: open-telemetry/opentelemetry-python-contrib/.github/workflows/core_contrib_test_0.yml@main
1616
with:
1717
CORE_REPO_SHA: ${{ github.sha }}
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

17-
- uses: fossas/fossa-action@c0a7d013f84c8ee5e910593186598625513cc1e4 # v1.6.0
17+
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
1818
with:
1919
api-key: ${{secrets.FOSSA_API_KEY}}
2020
team: OpenTelemetry

.github/workflows/lint_0.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

.github/workflows/misc_0.yml

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:
@@ -58,44 +66,6 @@ jobs:
5866
- name: Run tests
5967
run: tox -e tracecontext
6068

61-
mypy:
62-
name: mypy
63-
runs-on: ubuntu-latest
64-
timeout-minutes: 30
65-
steps:
66-
- name: Checkout repo @ SHA - ${{ github.sha }}
67-
uses: actions/checkout@v4
68-
69-
- name: Set up Python 3.11
70-
uses: actions/setup-python@v5
71-
with:
72-
python-version: "3.11"
73-
74-
- name: Install tox
75-
run: pip install tox
76-
77-
- name: Run tests
78-
run: tox -e mypy
79-
80-
mypyinstalled:
81-
name: mypyinstalled
82-
runs-on: ubuntu-latest
83-
timeout-minutes: 30
84-
steps:
85-
- name: Checkout repo @ SHA - ${{ github.sha }}
86-
uses: actions/checkout@v4
87-
88-
- name: Set up Python 3.11
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: "3.11"
92-
93-
- name: Install tox
94-
run: pip install tox
95-
96-
- name: Run tests
97-
run: tox -e mypyinstalled
98-
9969
typecheck:
10070
name: typecheck
10171
runs-on: ubuntu-latest

.github/workflows/prepare-patch-release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
run: .github/scripts/use-cla-approved-github-bot.sh
6666

6767
- name: Create pull request
68+
id: create_pr
6869
env:
6970
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
7071
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
@@ -74,7 +75,15 @@ jobs:
7475
7576
git commit -a -m "$message"
7677
git push origin HEAD:$branch
77-
gh pr create --title "[$GITHUB_REF_NAME] $message" \
78+
pr_url=$(gh pr create --title "[$GITHUB_REF_NAME] $message" \
7879
--body "$message." \
7980
--head $branch \
80-
--base $GITHUB_REF_NAME
81+
--base $GITHUB_REF_NAME)
82+
83+
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
84+
- name: Add prepare-release label to PR
85+
if: steps.create_pr.outputs.pr_url != ''
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
run: |
89+
gh pr edit ${{ steps.create_pr.outputs.pr_url }} --add-label "prepare-release"

.github/workflows/prepare-release-branch.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
run: .github/scripts/use-cla-approved-github-bot.sh
9292

9393
- name: Create pull request against the release branch
94+
id: create_release_branch_pr
9495
env:
9596
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
9697
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
@@ -100,10 +101,18 @@ jobs:
100101
101102
git commit -a -m "$message"
102103
git push origin HEAD:$branch
103-
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
104+
pr_url=$(gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
104105
--body "$message." \
105106
--head $branch \
106-
--base $RELEASE_BRANCH_NAME
107+
--base $RELEASE_BRANCH_NAME)
108+
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
109+
110+
- name: Add prepare-release label to PR
111+
if: steps.create_release_branch_pr.outputs.pr_url != ''
112+
env:
113+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
run: |
115+
gh pr edit ${{ steps.create_release_branch_pr.outputs.pr_url }} --add-label "prepare-release"
107116
108117
create-pull-request-against-main:
109118
runs-on: ubuntu-latest
@@ -170,6 +179,7 @@ jobs:
170179
run: .github/scripts/use-cla-approved-github-bot.sh
171180

172181
- name: Create pull request against main
182+
id: create_main_pr
173183
env:
174184
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
175185
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
@@ -180,7 +190,15 @@ jobs:
180190
181191
git commit -a -m "$message"
182192
git push origin HEAD:$branch
183-
gh pr create --title "$message" \
193+
pr_url=$(gh pr create --title "$message" \
184194
--body "$body" \
185195
--head $branch \
186-
--base main
196+
--base main)
197+
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
198+
199+
- name: Add prepare-release label to PR
200+
if: steps.create_main_pr.outputs.pr_url != ''
201+
env:
202+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
203+
run: |
204+
gh pr edit ${{ steps.create_main_pr.outputs.pr_url }} --add-label "prepare-release"

.github/workflows/templates/lint.yml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}{% endraw %}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

.github/workflows/templates/misc.yml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}{% endraw %}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

.github/workflows/templates/test.yml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}{% endraw %}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

.github/workflows/test_0.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

.github/workflows/test_1.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
19+
# For PRs you can change the inner fallback ('main')
20+
# For pushes you change the outer fallback ('main')
21+
# The logic below is used during releases and depends on having an equivalent branch name in the contrib repo.
22+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
23+
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
24+
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
25+
'main'
26+
) || 'main' }}
1927
PIP_EXISTS_ACTION: w
2028

2129
jobs:

CHANGELOG.md

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

88
## Unreleased
99

10+
- typecheck: add sdk/resources and drop mypy
11+
([#4578](https://github.com/open-telemetry/opentelemetry-python/pull/4578))
12+
- Refactor `BatchLogRecordProcessor` to simplify code and make the control flow more
13+
clear ([#4562](https://github.com/open-telemetry/opentelemetry-python/pull/4562/)
14+
and [#4535](https://github.com/open-telemetry/opentelemetry-python/pull/4535)).
15+
- Use PEP702 for marking deprecations
16+
([#4522](https://github.com/open-telemetry/opentelemetry-python/pull/4522))
17+
- Refactor `BatchLogRecordProcessor` and `BatchSpanProcessor` to simplify code
18+
and make the control flow more clear ([#4562](https://github.com/open-telemetry/opentelemetry-python/pull/4562/)
19+
[#4535](https://github.com/open-telemetry/opentelemetry-python/pull/4535), and
20+
[#4580](https://github.com/open-telemetry/opentelemetry-python/pull/4580)).
21+
- Remove log messages from `BatchLogRecordProcessor.emit`, this caused the program
22+
to crash at shutdown with a max recursion error ([#4586](https://github.com/open-telemetry/opentelemetry-python/pull/4586)).
23+
- Configurable max retry timeout for grpc exporter
24+
([#4333](https://github.com/open-telemetry/opentelemetry-python/pull/4333))
25+
- opentelemetry-api: allow importlib-metadata 8.7.0
26+
([#4593](https://github.com/open-telemetry/opentelemetry-python/pull/4593))
27+
- opentelemetry-test-utils: assert explicit bucket boundaries in histogram metrics
28+
([#4595](https://github.com/open-telemetry/opentelemetry-python/pull/4595))
29+
- Bump semantic conventions to 1.34.0
30+
([#4599](https://github.com/open-telemetry/opentelemetry-python/pull/4599))
31+
32+
## Version 1.33.0/0.54b0 (2025-05-09)
33+
34+
- Fix intermittent `Connection aborted` error when using otlp/http exporters
35+
([#4477](https://github.com/open-telemetry/opentelemetry-python/pull/4477))
36+
- opentelemetry-sdk: use stable code attributes: `code.function` -> `code.function.name`, `code.lineno` -> `code.line.number`, `code.filepath` -> `code.file.path`
37+
([#4508](https://github.com/open-telemetry/opentelemetry-python/pull/4508))
38+
- Fix serialization of extended attributes for logs signal
39+
([#4342](https://github.com/open-telemetry/opentelemetry-python/pull/4342))
40+
- Handle OTEL_PROPAGATORS contains None
41+
([#4553](https://github.com/open-telemetry/opentelemetry-python/pull/4553))
42+
- docs: updated and added to the metrics and log examples
43+
([#4559](https://github.com/open-telemetry/opentelemetry-python/pull/4559))
44+
- Bump semantic conventions to 1.33.0
45+
([#4567](https://github.com/open-telemetry/opentelemetry-python/pull/4567))
46+
1047
## Version 1.32.0/0.53b0 (2025-04-10)
1148

1249
- Fix user agent in OTLP HTTP metrics exporter
@@ -1522,8 +1559,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15221559
Serialize tuple type values by coercing them into a string, since Jaeger does not
15231560
support tuple types.
15241561
([#865](https://github.com/open-telemetry/opentelemetry-python/pull/865))
1525-
- Validate span attribute types in SDK
1526-
([#678](https://github.com/open-telemetry/opentelemetry-python/pull/678))
15271562
- Specify to_json indent from arguments
15281563
([#718](https://github.com/open-telemetry/opentelemetry-python/pull/718))
15291564
- Span.resource will now default to an empty resource

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ For additional exporter and instrumentation packages, see the
9191

9292
For information about contributing to OpenTelemetry Python, see [CONTRIBUTING.md](CONTRIBUTING.md).
9393

94-
We meet weekly on Thursdays at 9AM PST. The meeting is subject to change depending on contributors' availability. Check the [OpenTelemetry community calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com) for specific dates and Zoom meeting links.
94+
We meet weekly on Thursdays at 9AM PST. The meeting is subject to change depending on contributors' availability. Check the [OpenTelemetry community calendar](https://calendar.google.com/calendar/embed?src=c_2bf73e3b6b530da4babd444e72b76a6ad893a5c3f43cf40467abc7a9a897f977%40group.calendar.google.com) for specific dates and Zoom meeting links.
9595

9696
Meeting notes are available as a public [Google doc](https://docs.google.com/document/d/1CIMGoIOZ-c3-igzbd6_Pnxx1SjAkjwqoYSUWxPY8XIs/edit).
9797

RELEASING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
(otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix).
1010
* Review the two pull requests that it creates.
1111
(one is targeted to the release branch and one is targeted to `main`).
12-
* The builds will fail for both the `main` and release pr because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/RELEASING.md) for the contrib repo up until this same point.
13-
* Change the CONTRIB_REPO_SHA of core PRs to point to their counterpart in contrib.
14-
* Change the CORE_REPO_SHA of contrib PRs to point to their counterpart in core.
12+
* The builds will fail for the release PR because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/RELEASING.md) for the contrib repo up until this same point.
13+
* Close and reopen the PR so that the workflow will take into account the label automation we have in place
1514
* Release builds now should pass.
1615
* Merge the release PR.
1716
* Merge the PR to main (this can be done separately from [making the release](#making-the-release))
@@ -23,13 +22,16 @@
2322
* Press the "Run workflow" button, then select the release branch from the dropdown list,
2423
e.g. `release/v1.9.x`, then enter the pull request number that you want to backport,
2524
then click the "Run workflow" button below that.
25+
* Add the label `backport` to the generated pull request.
26+
* In case label automation doesn't work, just close and reopen the PR so that the workflow will take into account the label automation we have in place.
2627
* Review and merge the backport pull request that it generates.
2728
* Merge a pull request to the release branch updating the `CHANGELOG.md`.
2829
* The heading for the unreleased entries should be `## Unreleased`.
2930
* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-patch-release.yml).
3031
* Press the "Run workflow" button, then select the release branch from the dropdown list,
3132
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
3233
* Review and merge the pull request that it creates for updating the version.
34+
* Note: If you are doing a patch release in `-core` repo, you should also do an equivalent patch release in `-contrib` repo (even if there's no fix to release), otherwise tests in CI will fail.
3335

3436
## Making the release
3537

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
pylint==3.3.4
22
httpretty==1.1.4
33
pyright==1.1.396
4-
mypy==1.9.0
54
sphinx==7.1.2
65
sphinx-rtd-theme==2.0.0rc4
76
sphinx-autodoc-typehints==1.25.2

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@
154154
"py:class",
155155
"_contextvars.Token",
156156
),
157+
(
158+
"py:class",
159+
"AnyValue",
160+
),
157161
]
158162

159163
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)