Skip to content

Commit 884dc4e

Browse files
authored
Merge branch 'main' into override-exporter-headers
2 parents c3f937b + 6ed676a commit 884dc4e

File tree

41 files changed

+466
-577
lines changed

Some content is hidden

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

41 files changed

+466
-577
lines changed

CHANGELOG.md

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

88
## Unreleased
99

10+
- Update OTLP gRPC/HTTP exporters: the export timeout is now inclusive of all retries and backoffs.
11+
A +/-20% jitter was added to all backoffs. A pointless 32 second sleep that occurred after all retries
12+
had completed/failed was removed.
13+
([#4564](https://github.com/open-telemetry/opentelemetry-python/pull/4564)).
14+
- Update ConsoleLogExporter.export to handle LogRecord's containing bytes type
15+
in the body ([#4614](https://github.com/open-telemetry/opentelemetry-python/pull/4614/)).
1016
- opentelemetry-sdk: Fix invalid `type: ignore` that causes mypy to ignore the whole file
1117
([#4618](https://github.com/open-telemetry/opentelemetry-python/pull/4618))
1218
- Add `span_exporter` property back to `BatchSpanProcessor` class
1319
([#4621](https://github.com/open-telemetry/opentelemetry-python/pull/4621))
1420
- Permit to override default OTLP exporters headers
1521
([#4634](https://github.com/open-telemetry/opentelemetry-python/pull/4634))
22+
- Fix license field in pyproject.toml files
23+
([#4625](https://github.com/open-telemetry/opentelemetry-python/pull/4625))
1624

1725
## Version 1.34.0/0.55b0 (2025-06-04)
1826

1927
- typecheck: add sdk/resources and drop mypy
2028
([#4578](https://github.com/open-telemetry/opentelemetry-python/pull/4578))
21-
- Refactor `BatchLogRecordProcessor` to simplify code and make the control flow more
22-
clear ([#4562](https://github.com/open-telemetry/opentelemetry-python/pull/4562/)
23-
and [#4535](https://github.com/open-telemetry/opentelemetry-python/pull/4535)).
2429
- Use PEP702 for marking deprecations
2530
([#4522](https://github.com/open-telemetry/opentelemetry-python/pull/4522))
2631
- Refactor `BatchLogRecordProcessor` and `BatchSpanProcessor` to simplify code

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",

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.

exporter/opentelemetry-exporter-otlp-proto-grpc/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-grpc"
77
dynamic = ["version"]
88
description = "OpenTelemetry Collector Protobuf over gRPC 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-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(
5858
headers: Optional[
5959
Union[TypingSequence[Tuple[str, str]], Dict[str, str], str]
6060
] = None,
61-
timeout: Optional[int] = None,
61+
timeout: Optional[float] = None,
6262
compression: Optional[Compression] = None,
6363
):
6464
if insecure is None:
@@ -79,7 +79,7 @@ def __init__(
7979

8080
environ_timeout = environ.get(OTEL_EXPORTER_OTLP_LOGS_TIMEOUT)
8181
environ_timeout = (
82-
int(environ_timeout) if environ_timeout is not None else None
82+
float(environ_timeout) if environ_timeout is not None else None
8383
)
8484

8585
compression = (

0 commit comments

Comments
 (0)