Skip to content

Commit 58bebdc

Browse files
authored
Merge branch 'main' into exporter-metrics
2 parents 243cdb7 + 0d26cb5 commit 58bebdc

File tree

29 files changed

+1685
-415
lines changed

29 files changed

+1685
-415
lines changed

CHANGELOG.md

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

1313
## Unreleased
1414

15+
- Enabled the flake8-tidy-import plugins rules for the ruff linter. These rules throw warnings for relative imports in the modules.
16+
([#5019](https://github.com/open-telemetry/opentelemetry-python/pull/5019))
17+
- `opentelemetry-sdk`: Fix `AttributeError` in `ExplicitBucketHistogramAggregation` when applied to non-Histogram instruments without explicit boundaries
18+
([#5034](https://github.com/open-telemetry/opentelemetry-python/pull/5034))
19+
- Fix `BatchLogRecordProcessor` default `schedule_delay_millis` from 5000ms to 1000ms to comply with the OTel specification. Note: logs may be exported 5x more frequently by default (e.g. for users who don't explicitly set the `OTEL_BLRP_SCHEDULE_DELAY` env var).
20+
([#4998](https://github.com/open-telemetry/opentelemetry-python/pull/4998))
21+
- `opentelemetry-sdk`: Add `process` resource detector support to declarative file configuration via `detection_development.detectors[].process`
22+
([#5001](https://github.com/open-telemetry/opentelemetry-python/pull/5001))
1523
- `opentelemetry-sdk`: Add shared `_parse_headers` helper for declarative config OTLP exporters
1624
([#5021](https://github.com/open-telemetry/opentelemetry-python/pull/5021))
1725
- `opentelemetry-api`: Replace a broad exception in attribute cleaning tests to satisfy pylint in the `lint-opentelemetry-api` CI job
@@ -29,6 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2937
([#4935](https://github.com/open-telemetry/opentelemetry-python/pull/4935))
3038
- `opentelemetry-sdk`: implement metric reader metrics
3139
([#4970](https://github.com/open-telemetry/opentelemetry-python/pull/4970))
40+
- `opentelemetry-sdk`: implement processor metrics
41+
([#5012](https://github.com/open-telemetry/opentelemetry-python/pull/5012))
3242
- `opentelemetry-sdk`: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0
3343
([#4965](https://github.com/open-telemetry/opentelemetry-python/pull/4965))
3444
- `opentelemetry-sdk`: implement exporter metrics
@@ -45,10 +55,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4555
([#4910](https://github.com/open-telemetry/opentelemetry-python/pull/4910))
4656
- Add configurable `max_export_batch_size` to OTLP HTTP metrics exporter
4757
([#4576](https://github.com/open-telemetry/opentelemetry-python/pull/4576))
58+
- `opentelemetry-sdk`: Implement experimental Meter configurator
59+
([#4966](https://github.com/open-telemetry/opentelemetry-python/pull/4966))
4860
- `opentelemetry-exporter-otlp-proto-http`: use consistent protobuf for export request
4961
([#5015](https://github.com/open-telemetry/opentelemetry-python/pull/5015))
5062
- `opentelemetry-sdk`: cache TracerConfig into the tracer, this changes an internal interface. Only one Tracer with the same instrumentation scope will be created
5163
([#5007](https://github.com/open-telemetry/opentelemetry-python/pull/5007))
64+
- Redo OTLPMetricExporter unit tests of `max_export_batch_size` to use real `export`
65+
([#5036](https://github.com/open-telemetry/opentelemetry-python/pull/5036))
5266

5367
## Version 1.40.0/0.61b0 (2026-03-04)
5468

exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_common/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
from opentelemetry.sdk.environment_variables import (
2121
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER,
22-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER,
23-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER,
24-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER,
2522
)
2623
from opentelemetry.util._importlib_metadata import entry_points
2724

@@ -36,9 +33,9 @@ def _is_retryable(resp: requests.Response) -> bool:
3633

3734
def _load_session_from_envvar(
3835
cred_envvar: Literal[
39-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER,
40-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER,
41-
_OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER,
36+
"OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER",
37+
"OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER",
38+
"OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER",
4239
],
4340
) -> Optional[requests.Session]:
4441
_credential_env = environ.get(

exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ def _split_metrics_data(
494494

495495
# Rebuild metric dict generically using same approach as initial creation
496496
field_name = metric.WhichOneof("data")
497+
if field_name is None:
498+
_logger.warning(
499+
"Tried to split and export an unsupported metric type. Skipping."
500+
)
501+
continue
497502
data_container = getattr(metric, field_name)
498503
metric_dict = {
499504
"name": metric.name,
@@ -603,13 +608,13 @@ def _get_split_resource_metrics_pb2(
603608
new_resource_metrics = pb2.ResourceMetrics(
604609
resource=resource_metrics.get("resource"),
605610
scope_metrics=[],
606-
schema_url=resource_metrics.get("schema_url"),
611+
schema_url=resource_metrics.get("schema_url") or "",
607612
)
608613
for scope_metrics in resource_metrics.get("scope_metrics", []):
609614
new_scope_metrics = pb2.ScopeMetrics(
610615
scope=scope_metrics.get("scope"),
611616
metrics=[],
612-
schema_url=scope_metrics.get("schema_url"),
617+
schema_url=scope_metrics.get("schema_url") or "",
613618
)
614619

615620
for metric in scope_metrics.get("metrics", []):

0 commit comments

Comments
 (0)