Skip to content

Commit c36948d

Browse files
authored
Merge branch 'main' into env-carrier-proto
2 parents a35fb8b + 62da90e commit c36948d

File tree

140 files changed

+5218
-1154
lines changed

Some content is hidden

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

140 files changed

+5218
-1154
lines changed

.github/workflows/contrib.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches-ignore:
66
- 'release/*'
7+
- 'otelbot/*'
78
pull_request:
89

910
permissions:

.github/workflows/lint_0.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

.github/workflows/misc_0.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

.github/workflows/test_0.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches-ignore:
99
- 'release/*'
10+
- 'otelbot/*'
1011
pull_request:
1112

1213
permissions:

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.6.9
4+
rev: v0.14.1
55
hooks:
66
# Run the linter.
77
- id: ruff
@@ -13,3 +13,9 @@ repos:
1313
rev: 0.6.0
1414
hooks:
1515
- id: uv-lock
16+
- repo: https://github.com/rstcheck/rstcheck
17+
rev: 77490ffa33bfc0928975ae3cf904219903db755d # frozen: v6.2.5
18+
hooks:
19+
- id: rstcheck
20+
additional_dependencies: ['rstcheck[sphinx]']
21+
args: ["--report-level", "warning"]

.rstcheck.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[rstcheck]
2+
ignore_directives = automodule
3+
ignore_roles = scm_web,scm_raw_web

CHANGELOG.md

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,80 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
## Unreleased
1414

15+
- docs: Added sqlcommenter example
16+
([#4734](https://github.com/open-telemetry/opentelemetry-python/pull/4734))
17+
- build: bump ruff to 0.14.1
18+
([#4782](https://github.com/open-telemetry/opentelemetry-python/pull/4782))
19+
- Add `opentelemetry-exporter-credential-provider-gcp` as an optional dependency to `opentelemetry-exporter-otlp-proto-grpc`
20+
and `opentelemetry-exporter-otlp-proto-http`
21+
([#4760](https://github.com/open-telemetry/opentelemetry-python/pull/4760))
22+
- semantic-conventions: Bump to 1.38.0
23+
([#4791](https://github.com/open-telemetry/opentelemetry-python/pull/4791))
24+
- [BREAKING] Remove LogData and extend SDK LogRecord to have instrumentation scope
25+
([#4676](https://github.com/open-telemetry/opentelemetry-python/pull/4676))
26+
- [BREAKING] Rename several classes from Log to LogRecord
27+
([#4647](https://github.com/open-telemetry/opentelemetry-python/pull/4647))
28+
- Add environment variable carriers to API
29+
([#4609](https://github.com/open-telemetry/opentelemetry-python/pull/4609))
30+
31+
**Migration Guide:**
32+
33+
`LogData` has been removed. Users should update their code as follows:
34+
35+
- **For Log Exporters:** Change from `Sequence[LogData]` to `Sequence[ReadableLogRecord]`
36+
```python
37+
# Before
38+
from opentelemetry.sdk._logs import LogData
39+
def export(self, batch: Sequence[LogData]) -> LogRecordExportResult:
40+
...
41+
42+
# After
43+
from opentelemetry.sdk._logs import ReadableLogRecord
44+
def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult:
45+
...
46+
```
47+
48+
- **For Log Processors:** Use `ReadWriteLogRecord` for processing, `ReadableLogRecord` for exporting
49+
```python
50+
# Before
51+
from opentelemetry.sdk._logs import LogData
52+
def on_emit(self, log_data: LogData):
53+
...
54+
55+
# After
56+
from opentelemetry.sdk._logs import ReadWriteLogRecord, ReadableLogRecord
57+
def on_emit(self, log_record: ReadWriteLogRecord):
58+
# Convert to ReadableLogRecord before exporting
59+
readable = ReadableLogRecord(
60+
log_record=log_record.log_record,
61+
resource=log_record.resource or Resource.create({}),
62+
instrumentation_scope=log_record.instrumentation_scope,
63+
limits=log_record.limits,
64+
)
65+
...
66+
```
67+
68+
- **Accessing log data:** Use the same attributes on `ReadableLogRecord`/`ReadWriteLogRecord`
69+
- `log_record.log_record` - The API LogRecord (contains body, severity, attributes, etc.)
70+
- `log_record.resource` - The Resource
71+
- `log_record.instrumentation_scope` - The InstrumentationScope (now included, was in LogData before)
72+
- `log_record.limits` - The LogRecordLimits
73+
74+
## Version 1.38.0/0.59b0 (2025-10-16)
75+
76+
- Add `rstcheck` to pre-commit to stop introducing invalid RST
77+
([#4755](https://github.com/open-telemetry/opentelemetry-python/pull/4755))
78+
- logs: extend Logger.emit to accept separated keyword arguments
79+
([#4737](https://github.com/open-telemetry/opentelemetry-python/pull/4737))
80+
- logs: add warnings for classes that would be deprecated and renamed in 1.39.0
81+
([#4771](https://github.com/open-telemetry/opentelemetry-python/pull/4771))
82+
83+
## Version 1.37.0/0.58b0 (2025-09-11)
84+
1585
- Add experimental composite samplers
1686
([#4714](https://github.com/open-telemetry/opentelemetry-python/pull/4714))
87+
- Add new environment variables to the SDK `OTEL_PYTHON_EXPORTER_OTLP_{HTTP/GRPC}_{METRICS/TRACES/LOGS}_CREDENTIAL_PROVIDER` that can be used to
88+
inject a `requests.Session` or `grpc.ChannelCredentials` object into OTLP exporters created during auto instrumentation [#4689](https://github.com/open-telemetry/opentelemetry-python/pull/4689).
1789
- Filter duplicate logs out of some internal `logger`'s logs on the export logs path that might otherwise endlessly log or cause a recursion depth exceeded issue in cases where logging itself results in an exception.
1890
([#4695](https://github.com/open-telemetry/opentelemetry-python/pull/4695)).
1991
- docs: linked the examples with their github source code location and added Prometheus example
@@ -22,8 +94,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2294
([#4634](https://github.com/open-telemetry/opentelemetry-python/pull/4634))
2395
- semantic-conventions: Bump to 1.37.0
2496
([#4731](https://github.com/open-telemetry/opentelemetry-python/pull/4731))
25-
- Add environment variable carriers to API
26-
([#4609](https://github.com/open-telemetry/opentelemetry-python/pull/4609))
97+
- opentelemetry-sdk: fix handling of OTEL_ATTRIBUTE_COUNT_LIMIT in logs
98+
([#4677](https://github.com/open-telemetry/opentelemetry-python/pull/4677))
99+
- Performance: Cache `importlib_metadata.entry_points`
100+
([#4735](https://github.com/open-telemetry/opentelemetry-python/pull/4735))
101+
- opentelemetry-sdk: fix calling Logger.emit with an API LogRecord instance
102+
([#4741](https://github.com/open-telemetry/opentelemetry-python/pull/4741))
27103

28104
## Version 1.36.0/0.57b0 (2025-07-29)
29105

0 commit comments

Comments
 (0)