Skip to content

Commit a133e8d

Browse files
Merge branch 'feat/move-stream-to-genai-util-as-abc' of https://github.com/eternalcuriouslearner/opentelemetry-python-contrib into feat/move-stream-to-genai-util-as-abc
2 parents 7ce1427 + c4c3e0c commit a133e8d

721 files changed

Lines changed: 5447 additions & 7474 deletions

File tree

Some content is hidden

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

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Switch to SPDX license headers (#4533)
2+
# TODO: update with the squash-merge commit SHA after merge

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ jobs:
6868
- name: Install tox
6969
run: pip install tox-uv
7070

71+
{%- if job_data == "docker-tests" %}
72+
73+
- name: Install Microsoft SQL ODBC driver
74+
run: sudo apt update -y && ACCEPT_EULA=Y sudo apt install -y msodbcsql18 unixodbc-dev unixodbc
75+
{%- endif %}
76+
7177
- name: Run tests
7278
run: tox -e {{ job_data }}
7379
{%- if job_data == "generate-workflows" %}

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,3 +1353,22 @@ jobs:
13531353

13541354
- name: Run tests
13551355
run: tox -e lint-opamp-client
1356+
1357+
lint-license-header-check:
1358+
name: license-header-check
1359+
runs-on: ubuntu-latest
1360+
timeout-minutes: 30
1361+
steps:
1362+
- name: Checkout repo @ SHA - ${{ github.sha }}
1363+
uses: actions/checkout@v4
1364+
1365+
- name: Set up Python 3.14
1366+
uses: actions/setup-python@v5
1367+
with:
1368+
python-version: "3.14"
1369+
1370+
- name: Install tox
1371+
run: pip install tox-uv
1372+
1373+
- name: Run tests
1374+
run: tox -e lint-license-header-check

.github/workflows/misc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
- name: Install tox
6060
run: pip install tox-uv
6161

62+
- name: Install Microsoft SQL ODBC driver
63+
run: sudo apt update -y && ACCEPT_EULA=Y sudo apt install -y msodbcsql18 unixodbc-dev unixodbc
64+
6265
- name: Run tests
6366
run: tox -e docker-tests
6467

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ disable=missing-docstring,
8080
missing-module-docstring, # temp-pylint-upgrade
8181
import-error, # needed as a workaround as reported here: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/290
8282
cyclic-import,
83-
not-context-manager
83+
not-context-manager,
84+
attribute-defined-outside-init
8485

8586
# Enable the message, report, category or checker with the given id(s). You can
8687
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Added
1515

16+
- Add `BaggageLogProcessor` to `opentelemetry-processor-baggage`
17+
([#4371](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4371))
18+
- `opentelemetry-instrumentation-system-metrics`: Add support for `process.disk.io` metric in system-metrics instrumentation
19+
([#4397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4397))
20+
- Switch to SPDX license headers and add CI enforcement
21+
([#4533](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4533))
1622
- Bump `pylint` to `4.0.5`
1723
([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244))
1824
- `opentelemetry-instrumentation-sqlite3`: Add uninstrument, error status, suppress, and no-op tests
1925
([#4335](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4335))
2026
- Expand `AGENTS.md` with instrumentation/GenAI guidance and add PR review instructions.
2127
([#4457](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4457))
28+
- `opentelemetry-instrumentation-logging`: Add `OTEL_PYTHON_LOG_HANDLER_LEVEL` and `OTEL_PYTHON_LOG_FORMAT` environment variables to configure the log level and formatter of the auto-instrumented `LoggingHandler`.
29+
([#4298](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4298))
30+
- Remove redundant `pylint: disable=attribute-defined-outside-init` comments and add rule to global `.pylintrc` disable list
31+
([#3839](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3839))
32+
- `opentelemetry-exporter-richconsole`: Add support for suppressing resource information
33+
([#3898](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3898))
34+
- `opentelemetry-instrumentation`: Add experimental metrics attributes Labeler utility
35+
([#4288](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4288))
2236

2337
### Fixed
2438

@@ -34,11 +48,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3448
([#4360](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4360))
3549
- `opentelemetry-instrumentation-aiohttp-server`: Use `canonical` attribute of the `Resource` as a span name
3650
([#3896](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3896))
51+
- `docker-tests`: Don't require sudo, debian based distro and MS SQL ODBC driver to run locally. Instead require docker and unixodbc
52+
([#4478](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4478))
53+
- Refactor unit tests to allow for population of the random trace id flag in the `traceparent` header
54+
([#4030](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4030))
55+
- `opentelemetry-instrumentation-fastapi`: Fix `FastAPI` instrumentation to correctly trace `BackgroundTasks` by wrapping their execution in a dedicated span, ensuring proper parent-child relationships and accurate trace timing
56+
([#4368](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4368))
57+
- `opentelemetry-instrumentation-celery`: Coerce timelimit values to strings in `set_attributes_from_context()` to prevent mixed-type span attribute warning
58+
([#4361](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4361))
3759

3860
### Breaking changes
3961

4062
- Drop Python 3.9 support
4163
([#4412](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4412))
64+
- `opentelemetry-instrumentation-logging`: Use `LogRecord.getMessage()` to format and extract each log record's body text to more closely match the expected usage of the logging system. As a result, all OTel log record bodies are now always strings.
65+
Previously, if `LogRecord.msg` (which contains the format string) was set to a non-string object (e.g. `logger.warning(some_dict)`), the object was exported as-is to the OTLP body field. Now, `LogRecord.getMessage()` will convert it to to a string.
66+
If you are passing in non-strings as the format string argument and your backend is expecting them as-is, you will need to update accordingly.
67+
([#4372](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4372))
4268

4369
## Version 1.41.0/0.62b0 (2026-04-09)
4470

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,16 @@ The continuous integration overrides that environment variable with as per the c
306306

307307
## Style Guide
308308

309+
* All Python files must include the following SPDX license header as the first
310+
two lines (or immediately after a shebang line):
311+
312+
```python
313+
# Copyright The OpenTelemetry Authors
314+
# SPDX-License-Identifier: Apache-2.0
315+
```
316+
317+
This is enforced by CI via `tox -e lint-license-header-check`.
318+
309319
* docstrings should adhere to the [Google Python Style
310320
Guide](http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings)
311321
as specified with the [napoleon

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ We meet weekly on Thursday at 9AM PT. The meeting is subject to change depending
108108

109109
Meeting notes are available as a public [Google doc](https://docs.google.com/document/d/18w8zOBm_mbety0OqlPwxc7dvnfu641EgmrO4AdJef0U/edit?tab=t.0).
110110

111+
The meeting is open for all to join. We invite everyone to join our meeting, regardless of your experience level. Whether you're a seasoned OpenTelemetry developer, just starting your journey, or simply curious about the work we do, you're more than welcome to participate!
112+
111113
### Maintainers
112114

113115
- [Aaron Abbott](https://github.com/aabmass), Google

_template/version.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
__version__ = "0.63b0.dev"

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
# Configuration file for the Sphinx documentation builder.
25
#
36
# This file only contains a selection of the most common options. For a full

0 commit comments

Comments
 (0)