Skip to content

Commit 7a7d864

Browse files
authored
Merge branch 'main' into griffe
2 parents 75f799f + cb4e3ba commit 7a7d864

File tree

75 files changed

+2397
-2112
lines changed

Some content is hidden

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

75 files changed

+2397
-2112
lines changed

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
persist-credentials: false
2525

26-
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
26+
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
2727
with:
2828
results_file: results.sarif
2929
results_format: sarif

CHANGELOG.md

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

88
## Unreleased
99

10+
- Update OTLP proto to v1.7 [#4645](https://github.com/open-telemetry/opentelemetry-python/pull/4645).
11+
- Update OTLP gRPC/HTTP exporters: the export timeout is now inclusive of all retries and backoffs.
12+
A +/-20% jitter was added to all backoffs. A pointless 32 second sleep that occurred after all retries
13+
had completed/failed was removed.
14+
([#4564](https://github.com/open-telemetry/opentelemetry-python/pull/4564)).
15+
- Update ConsoleLogExporter.export to handle LogRecord's containing bytes type
16+
in the body ([#4614](https://github.com/open-telemetry/opentelemetry-python/pull/4614/)).
1017
- opentelemetry-sdk: Fix invalid `type: ignore` that causes mypy to ignore the whole file
1118
([#4618](https://github.com/open-telemetry/opentelemetry-python/pull/4618))
1219
- Add `span_exporter` property back to `BatchSpanProcessor` class
1320
([#4621](https://github.com/open-telemetry/opentelemetry-python/pull/4621))
21+
- Fix license field in pyproject.toml files
22+
([#4625](https://github.com/open-telemetry/opentelemetry-python/pull/4625))
23+
- Update logger level to NOTSET in logs example
24+
([#4637](https://github.com/open-telemetry/opentelemetry-python/pull/4637))
25+
- Logging API accepts optional `context`; deprecates `trace_id`, `span_id`, `trace_flags`.
26+
([#4597](https://github.com/open-telemetry/opentelemetry-python/pull/4597))
1427

1528
## Version 1.34.0/0.55b0 (2025-06-04)
1629

1730
- typecheck: add sdk/resources and drop mypy
1831
([#4578](https://github.com/open-telemetry/opentelemetry-python/pull/4578))
19-
- Refactor `BatchLogRecordProcessor` to simplify code and make the control flow more
20-
clear ([#4562](https://github.com/open-telemetry/opentelemetry-python/pull/4562/)
21-
and [#4535](https://github.com/open-telemetry/opentelemetry-python/pull/4535)).
2232
- Use PEP702 for marking deprecations
2333
([#4522](https://github.com/open-telemetry/opentelemetry-python/pull/4522))
2434
- Refactor `BatchLogRecordProcessor` and `BatchSpanProcessor` to simplify code

docs-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ opentracing~=2.2.0
2525
thrift~=0.10
2626
wrapt>=1.0.0,<2.0.0
2727
markupsafe~=2.0
28-
protobuf==5.26.1
28+
protobuf==5.29.5

docs/examples/error_handler/error_handler_0/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ name = "error-handler-0"
77
dynamic = ["version"]
88
description = "This is just an error handler example package"
99
readme = "README.rst"
10-
license = {text = "Apache-2.0"}
10+
license = "Apache-2.0"
1111
requires-python = ">=3.9"
1212
authors = [
1313
{ name = "OpenTelemetry Authors", email = "[email protected]" },
1414
]
1515
classifiers = [
1616
"Development Status :: 4 - Beta",
1717
"Intended Audience :: Developers",
18-
"License :: OSI Approved :: Apache Software License",
1918
"Programming Language :: Python",
2019
"Programming Language :: Python :: 3",
2120
"Programming Language :: Python :: 3.9",

docs/examples/error_handler/error_handler_1/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ name = "error-handler-1"
77
dynamic = ["version"]
88
description = "This is just an error handler example package"
99
readme = "README.rst"
10-
license = {text = "Apache-2.0"}
10+
license = "Apache-2.0"
1111
requires-python = ">=3.9"
1212
authors = [
1313
{ name = "OpenTelemetry Authors", email = "[email protected]" },
1414
]
1515
classifiers = [
1616
"Development Status :: 4 - Beta",
1717
"Intended Audience :: Developers",
18-
"License :: OSI Approved :: Apache Software License",
1918
"Programming Language :: Python",
2019
"Programming Language :: Python :: 3",
2120
"Programming Language :: Python :: 3.9",

docs/examples/logs/example.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
3434
handler = LoggingHandler(level=logging.NOTSET, logger_provider=logger_provider)
3535

36+
# Set the root logger level to NOTSET to ensure all messages are captured
37+
logging.getLogger().setLevel(logging.NOTSET)
38+
3639
# Attach OTLP handler to root logger
3740
logging.getLogger().addHandler(handler)
3841

exporter/opentelemetry-exporter-opencensus/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "opentelemetry-exporter-opencensus"
77
dynamic = ["version"]
88
description = "OpenCensus Exporter"
99
readme = "README.rst"
10-
license = {text = "Apache-2.0"}
10+
license = "Apache-2.0"
1111
requires-python = ">=3.9"
1212
authors = [
1313
{ name = "OpenTelemetry Authors", email = "[email protected]" },
@@ -17,7 +17,6 @@ classifiers = [
1717
"Framework :: OpenTelemetry",
1818
"Framework :: OpenTelemetry :: Exporters",
1919
"Intended Audience :: Developers",
20-
"License :: OSI Approved :: Apache Software License",
2120
"Programming Language :: Python",
2221
"Programming Language :: Python :: 3",
2322
"Programming Language :: Python :: 3.9",

exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "opentelemetry-exporter-otlp-proto-common"
77
dynamic = ["version"]
88
description = "OpenTelemetry Protobuf encoding"
99
readme = "README.rst"
10-
license = {text = "Apache-2.0"}
10+
license = "Apache-2.0"
1111
requires-python = ">=3.9"
1212
authors = [
1313
{ name = "OpenTelemetry Authors", email = "[email protected]" },
@@ -17,7 +17,6 @@ classifiers = [
1717
"Framework :: OpenTelemetry",
1818
"Framework :: OpenTelemetry :: Exporters",
1919
"Intended Audience :: Developers",
20-
"License :: OSI Approved :: Apache Software License",
2120
"Programming Language :: Python",
2221
"Programming Language :: Python :: 3",
2322
"Programming Language :: Python :: 3.9",

exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717

1818
import logging
1919
from collections.abc import Sequence
20-
from itertools import count
2120
from typing import (
2221
Any,
2322
Callable,
2423
Dict,
25-
Iterator,
2624
List,
2725
Mapping,
2826
Optional,
@@ -177,38 +175,3 @@ def _get_resource_data(
177175
)
178176
)
179177
return resource_data
180-
181-
182-
def _create_exp_backoff_generator(max_value: int = 0) -> Iterator[int]:
183-
"""
184-
Generates an infinite sequence of exponential backoff values. The sequence starts
185-
from 1 (2^0) and doubles each time (2^1, 2^2, 2^3, ...). If a max_value is specified
186-
and non-zero, the generated values will not exceed this maximum, capping at max_value
187-
instead of growing indefinitely.
188-
189-
Parameters:
190-
- max_value (int, optional): The maximum value to yield. If 0 or not provided, the
191-
sequence grows without bound.
192-
193-
Returns:
194-
Iterator[int]: An iterator that yields the exponential backoff values, either uncapped or
195-
capped at max_value.
196-
197-
Example:
198-
```
199-
gen = _create_exp_backoff_generator(max_value=10)
200-
for _ in range(5):
201-
print(next(gen))
202-
```
203-
This will print:
204-
1
205-
2
206-
4
207-
8
208-
10
209-
210-
Note: this functionality used to be handled by the 'backoff' package.
211-
"""
212-
for i in count(0):
213-
out = 2**i
214-
yield min(out, max_value) if max_value else out

exporter/opentelemetry-exporter-otlp-proto-common/tests/test_backoff.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)