Skip to content

Commit df91529

Browse files
Merge branch 'feat/anthropic-messages-stream-method-instrumentation' of https://github.com/eternalcuriouslearner/opentelemetry-python-contrib into feat/anthropic-messages-stream-method-instrumentation
2 parents fca3aa7 + 4f7890f commit df91529

709 files changed

Lines changed: 4758 additions & 7308 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
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Add PR to project board
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
add-to-project:
12+
name: add to project board
13+
runs-on: ubuntu-latest
14+
if: github.event.pull_request.draft == false
15+
steps:
16+
# NOTE: do NOT add an actions/checkout step here. This workflow uses
17+
# pull_request_target (which has access to secrets) but must never
18+
# execute code from the fork branch. See open-telemetry/opentelemetry-python#4955 for context.
19+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
20+
id: otelbot-token
21+
with:
22+
app-id: ${{ vars.OTELBOT_PYTHON_APP_ID }}
23+
private-key: ${{ secrets.OTELBOT_PYTHON_PRIVATE_KEY }}
24+
25+
- uses: actions/add-to-project@v1.0.2
26+
with:
27+
project-url: https://github.com/orgs/open-telemetry/projects/88
28+
github-token: ${{ steps.otelbot-token.outputs.token }}

.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

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ repos:
1818
rev: 77490ffa33bfc0928975ae3cf904219903db755d # frozen: v6.2.5
1919
hooks:
2020
- id: rstcheck
21-
additional_dependencies: ['rstcheck[sphinx]']
21+
additional_dependencies:
22+
- rstcheck[sphinx]
23+
- rstcheck-core==1.3.0
2224
args: ["--report-level", "warning"]
25+
exclude: ^_template/autodoc_entry\.rst$

.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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
## Unreleased
1313

1414
### Added
15+
- Add `BaggageLogProcessor` to `opentelemetry-processor-baggage`
16+
([#4371](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4371))
1517

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/issues/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))
2234

2335
### Fixed
2436

@@ -58,9 +70,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5870
([#4049](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4049))
5971
- `opentelemetry-instrumentation-sqlalchemy`: implement new semantic convention opt-in migration
6072
([#4110](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4110))
73+
- `opentelemetry-instrumentation`: Add experimental metrics attributes Labeler utility
74+
([#4288](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4288))
6175

6276
### Fixed
6377

78+
- `opentelemetry-instrumentation-celery`: Coerce timelimit values to strings in `set_attributes_from_context()` to prevent mixed-type span attribute warning
79+
([#4361](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4361))
6480
- `opentelemetry-docker-tests`: Replace deprecated `SpanAttributes` from `opentelemetry.semconv.trace` with `opentelemetry.semconv._incubating.attributes`
6581
([#4339](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4339))
6682
- `opentelemetry-instrumentation-confluent-kafka`: Skip `recv` span creation when `poll()` returns no message or `consume()` returns an empty list, avoiding empty spans on idle polls

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: 6 additions & 3 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
@@ -121,14 +123,11 @@ For more information about the maintainer role, see the [community repository](h
121123
- [Dylan Russell](https://github.com/dylanrussell), Google
122124
- [Emídio Neto](https://github.com/emdneto), Independent
123125
- [Héctor Hernández](https://github.com/hectorhdzg), Microsoft
124-
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
125126
- [Keith Decker](https://github.com/keith-decker), Cisco/Splunk
126127
- [Liudmila Molkova](https://github.com/lmolkova), Grafana Labs
127128
- [Lukas Hering](https://github.com/herin049), Oracle
128129
- [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
129-
- [Owais Lone](https://github.com/owais), Splunk
130130
- [Pablo Collins](https://github.com/pmcollins), Splunk
131-
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
132131
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
133132
- [Tammy Baylis](https://github.com/tammy-baylis-swi), SolarWinds
134133

@@ -139,11 +138,15 @@ For more information about the approver role, see the [community repository](htt
139138
- [Alex Boten](https://github.com/codeboten), Maintainer
140139
- [Ashutosh Goel](https://github.com/ashu658), Approver
141140
- [Diego Hurtado](https://github.com/ocelotl), Maintainer
141+
- [Jeremy Voss](https://github.com/jeremydvoss), Approver
142142
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), Approver
143143
- [Nikolay Sokolik](https://github.com/nikosokolik), Approver
144144
- [Nikolay Sokolik](https://github.com/oxeye-nikolay), Approver
145145
- [Owais Lone](https://github.com/owais), Maintainer
146+
- [Owais Lone](https://github.com/owais), Approver
147+
- [Sanket Mehta](https://github.com/sanketmehta28), Approver
146148
- [Shalev Roda](https://github.com/shalevr), Maintainer
149+
- [Shalev Roda](https://github.com/shalevr), Approver
147150
- [Yusuke Tsutsumi](https://github.com/toumorokoshi), Maintainer
148151

149152
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).

_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)