Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package
python-opentelemetry-exporter-otlp-proto-common for openSUSE:Factory checked in
at 2026-09-30 16:23:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing
/work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common (Old)
and
/work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.1465845
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-exporter-otlp-proto-common"
Wed Sep 30 16:23:41 2026 rev:19 rq:1381469 version:1.45.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common/python-opentelemetry-exporter-otlp-proto-common.changes
2026-07-21 22:56:21.165398397 +0200
+++
/work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.1465845/python-opentelemetry-exporter-otlp-proto-common.changes
2026-09-30 16:24:27.868884086 +0200
@@ -1,0 +2,186 @@
+Tue Sep 29 10:11:12 UTC 2026 - Nico Krapp <[email protected]>
+
+- Update to 1.45.0
+ * ### Added
+ * opentelemetry-exporter-prometheus: add support to configure
+ Resource attributes as metric labels (#5122)
+ * infra: add renovate (#5202)
+ * opentelemetry-api, opentelemetry-sdk: add support for extended
+ attribute values everywhere. (#5266)
+ * opentelemetry-sdk: wire the top-level log_level field in
+ declarative configuration — when set, maps the OTel
+ SeverityNumber value to a Python logging level and applies it
+ to the opentelemetry logger so SDK internal diagnostics respect
+ the configured severity. (#5351)
+ * opentelemetry-sdk: add the new stable AlwaysRecordSampler
+ * opentelemetry-configuration, opentelemetry-sdk: wire top-level
+ attribute_limits into per-signal providers via declarative
+ config; add log_record_limits support to LoggerProvider (#5365)
+ * opentelemetry-exporter-otlp-json-http: add OTLP JSON HTTP
+ exporter package (#5374)
+ * opentelemetry-api, opentelemetry-sdk: add enabled() support to
+ the Logger API, SDK, and LogRecordProcessor to let
+ instrumentation skip expensive work when logging is disabled
+ * opentelemetry-exporter-otlp-json-file: add OTLP JSON file
+ Docker tests (#5412)
+ * opentelemetry-configuration: wire the experimental
+ tracer_configurator/development, meter_configurator/development
+ and logger_configurator/development fields into
+ create_tracer_provider, create_meter_provider and
+ create_logger_provider, so per-instrumentation-scope enabled
+ overrides declared in the config file are applied to the
+ provider (previously these fields were parsed but silently
+ discarded). The logger minimum_severity/trace_based fields are
+ not supported by the Python SDK and are ignored with a warning.
+ * docs/examples: add example on how to manually setup the SDK to
+ get SDK metrics (#5449)
+ * opentelemetry-docker-tests: add Prometheus exporter docker
+ tests (#5457)
+ * opentelemetry-sdk: count records dropped after shutdown on
+ otel.sdk.processor.{span,log}.processed with error.type=
+ already_shutdown (batch span/log and simple log processors),
+ which the semantic conventions define as a valid value for this
+ metric. (#5509)
+ * opentelemetry-semantic-conventions: update semantic conventions
+ to v1.44.0 (#5511)
+ * opentelemetry-sdk: add host.id to the host resource detector
+ * opentelemetry-test-utils: add CapturingSampler to record what
+ samplers receive in instrumentation tests (#5681)
+ * ### Changed
+ * Enable PIE (flake8-pie) ruff rule and fix all violations
+ * The public opentelemetry.util.types.AttributeValue type in
+ package opentelemetry-api is being expanded to include None,
+ heterogeneous sequences of primitive types (and nested
+ sequences) as opposed to only homogeneous primitive sequences,
+ and Mappings of strings to any primitive types or sequences/
+ mappings (which themselves must only contain primitive types or
+ sequences/mappings validated the same way). If a bytes type is
+ set as an attribute value in the SDK, it will no longer be
+ utf-8 decoded to a string, instead it will be passed along as
+ is in accordance with the OTEL spec, since bytes is a valid
+ type in the OTLP proto. (#5266)
+ * opentelemetry-exporter-otlp-proto-http: add a max_request_size
+ argument to the OTLP HTTP exporters (traces, logs, metrics);
+ serialized requests larger than the limit are dropped before
+ sending, measured before compression. Defaults to 64 MiB
+ (enabled); set to 0 to disable. Mirrors opentelemetry-go#8157.
+ * [BREAKING] opentelemetry-api: subclasses of Logger need to
+ implement the enabled method (#5380)
+ * opentelemetry-exporter-otlp-proto-http: refactor to use shared
+ opentelemetry-exporter-otlp-common and
+ opentelemetry-exporter-http-transport packages and switch
+ default HTTP backend to urllib3 (#5389)
+ * opentelemetry-sdk: unify logging force_flush timeout defaults
+ to 30000ms (#5438)
+ * opentelemetry-python: enable Ruff default ruleset and fix
+ auto-fixable lint issues (#5491)
+ * opentelemetry-sdk: SimpleSpanProcessor now drops spans ended
+ after shutdown() instead of passing them to the exporter, and
+ counts them on otel.sdk.processor.span.processed with
+ error.type=already_shutdown. (#5512)
+ * Bump pytest to 9.0.3 (#5518)
+ * opentelemetry-exporter-otlp-proto-http: clarify that the
+ endpoint= kwarg requires the full signal path (#5633)
+ * opentelemetry-sdk: fix typos in SpanLimits docstring (#5658)
+ * ### Fixed
+ * opentelemetry-configuration: perform environment variable
+ substitution on scalar values after parsing the configuration
+ file, so ${VAR} references inside comments and mapping keys
+ are no longer substituted and undefined references in comments
+ no longer abort loading (#5407)
+ * opentelemetry-configuration: declarative config environment
+ variable substitution now replaces an unset variable that has
+ no default with an empty value instead of raising an error, per
+ the configuration spec. Resource attributes whose value
+ resolves to null (an unset ${VAR} with no default) are skipped
+ with a warning instead of being inserted as a null value.
+ * 'scripts/build.sh: add
+ opentelemetry-configurationandopentelemetry-proto-json` to the
+ package to release (#5425)
+ * opentelemetry-sdk: fix View instrument-name matching so a view
+ configured with an instrument's real (mixed-case) name is
+ applied; matching is now case-insensitive and platform-
+ independent instead of relying on fnmatch's OS-dependent case
+ handling (#5430)
+ * opentelemetry-sdk: fix missing f-prefix in exponential
+ histogram error messages (#5434)
+ * opentelemetry-configuration: resolve false-positive warning
+ logs for newer schema minor version (#5436)
+ * opentelemetry-sdk: make methods on
+ FixedSizeExemplarReservoirABC thread safe (#5437)
+ * opentelemetry-propagator-jaeger: fix typing issues and enable
+ pyright typechecking for the package opentelemetry-propagator-
+ jaeger: skip uberctx- baggage headers with an empty value on
+ extraction instead of raising TypeError (#5440)
+ * opentelemetry-sdk: fix TypeError when instantiating a
+ _BaseConfigurator subclass whose __init__ takes arguments
+ * opentelemetry-sdk: fix TypeError in os.fork() when a
+ BatchProcessor or PeriodicExportingMetricReader is garbage
+ collected (#5453)
+ * opentelemetry-configuration: a declarative config key present
+ with an empty (null) value on an object-typed node (e.g.
+ always_on:, a - service: detector, or a metric console:
+ exporter) is now treated the same as an explicit empty config
+ (always_on: {}) instead of failing type dispatch or silently
+ skipping the node. Both dict-typed nodes and dataclasses
+ constructible with no arguments are covered. (#5454)
+ * opentelemetry-api: fix copy-pasted log message in
+ SpanContext.__delattr__ (#5455)
+ * opentelemetry-sdk: reject views with
+ ExponentialBucketHistogramAggregation for asynchronous
+ instruments instead of silently producing no data (#5461)
+ * opentelemetry-sdk: fill every bucket of
+ SimpleFixedSizeExemplarReservoir before random sampling (#5462)
+ * opentelemetry-sdk: Import code_attributes from stable semconv
+ package (#5465)
+ * opentelemetry-sdk: for both the simple and batch span/log
+ processors, count otel.sdk.processor.{span,log}.processed when
+ the processor submits records to the exporter instead of after
+ export completes, and stop stamping exporter failures onto
+ this metric as error.type (#5472)
+ * opentelemetry-sdk: fix misleading instrument name validation
+ error message (name max length is 255, not 63). (#5513)
+ * opentelemetry-configuration: add missing process executable
+ name to default service name when available in resource
+ attributes (#5534)
+ * opentelemetry-sdk: fix values for process.executable.name and
+ process.executable.path to match semantic conventions. (#5535)
+ * opentelemetry-api: fix TraceState.update dropping all entries
+ when adding a new key at the 32-key limit (#5543)
+ * opentelemetry-sdk: bound get_aggregated_resources() wait to
+ the timeout (#5545)
+ * opentelemetry-sdk: don't read process.executable.name resource
+ attribute when building default service.name (#5547)
+ * opentelemetry-propagator-jaeger: enforce baggage limits on both
+ uberctx- extract and inject, borrowing the same limits (180
+ entries, 4096 bytes per entry, 8192 bytes total) the package's
+ core W3CBaggagePropagator already uses, so neither an inbound
+ carrier nor an in-process baggage map can produce unbounded
+ work or headers. (#5556)
+ * opentelemetry-sdk: keep metric attribute values that Python
+ considers equal but the data model does not, such as True, 1
+ and 1.0, in separate metric streams (#5573)
+ * opentelemetry-sdk: keep Resource hashable and serialisable
+ when an attribute value is bytes, instead of raising
+ TypeError from every OTLP encoder (#5577)
+ * opentelemetry-sdk: fix instrumentation scope name matching in
+ the tracer, meter and logger configurators so it is
+ case-sensitive on every platform instead of relying on
+ fnmatch's OS-dependent case handling (#5584)
+ * opentelemetry-sdk: fix TracerProvider() raising ValueError when
+ OTEL_TRACES_SAMPLER_ARG is a syntactically valid number outside
+ the [0.0, 1.0] range, instead of logging a warning and falling
+ back like other invalid values (#5594)
+ * opentelemetry-sdk: retain values from synchronous instruments
+ using last-value aggregation across cumulative collections
+ * opentelemetry-api: Added guard for negative value on
+ max_value_len (#5647)
+ * opentelemetry-sdk: fix overriding of the service.instance.id
+ which has been populated from the user provided values through
+ the resource detectors (#5660)
+ * opentelemetry-exporter-otlp-proto-grpc: Fix incorrect default
+ port for OTLP gRPC exporter self-metrics (#5668)
+ * opentelemetry-api: update W3CBaggagePropagator to properly
+ handle whitespace (#5680)
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_exporter_otlp_proto_common-1.43.0.tar.gz
New:
----
opentelemetry_exporter_otlp_proto_common-1.45.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-exporter-otlp-proto-common.spec ++++++
--- /var/tmp/diff_new_pack.CKC3Rf/_old 2026-09-30 16:24:28.484909737 +0200
+++ /var/tmp/diff_new_pack.CKC3Rf/_new 2026-09-30 16:24:28.485909779 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-exporter-otlp-proto-common
-Version: 1.43.0
+Version: 1.45.0
Release: 0
Summary: OpenTelemetry Protobuf encoding
License: Apache-2.0
++++++ opentelemetry_exporter_otlp_proto_common-1.43.0.tar.gz ->
opentelemetry_exporter_otlp_proto_common-1.45.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/.gitignore
new/opentelemetry_exporter_otlp_proto_common-1.45.0/.gitignore
--- old/opentelemetry_exporter_otlp_proto_common-1.43.0/.gitignore
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.45.0/.gitignore
2020-02-02 01:00:00.000000000 +0100
@@ -36,6 +36,8 @@
.cache
htmlcov
+.agent/
+
# Translations
*.mo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/PKG-INFO
new/opentelemetry_exporter_otlp_proto_common-1.45.0/PKG-INFO
--- old/opentelemetry_exporter_otlp_proto_common-1.43.0/PKG-INFO
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.45.0/PKG-INFO
2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.4
+Metadata-Version: 2.5
Name: opentelemetry-exporter-otlp-proto-common
-Version: 1.43.0
+Version: 1.45.0
Summary: OpenTelemetry Protobuf encoding
Project-URL: Homepage,
https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-otlp-proto-common
Project-URL: Repository, https://github.com/open-telemetry/opentelemetry-python
@@ -19,7 +19,7 @@
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
-Requires-Dist: opentelemetry-proto==1.43.0
+Requires-Dist: opentelemetry-proto==1.45.0
Description-Content-Type: text/x-rst
OpenTelemetry Protobuf Encoding
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/pyproject.toml
new/opentelemetry_exporter_otlp_proto_common-1.45.0/pyproject.toml
--- old/opentelemetry_exporter_otlp_proto_common-1.43.0/pyproject.toml
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.45.0/pyproject.toml
2020-02-02 01:00:00.000000000 +0100
@@ -26,7 +26,7 @@
"Programming Language :: Python :: 3.14",
]
dependencies = [
- "opentelemetry-proto == 1.43.0",
+ "opentelemetry-proto == 1.45.0",
]
[project.urls]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,153 +0,0 @@
-# Copyright The OpenTelemetry Authors
-# SPDX-License-Identifier: Apache-2.0
-
-from __future__ import annotations
-
-from collections import Counter
-from collections.abc import Iterator
-from contextlib import AbstractContextManager, contextmanager
-from dataclasses import dataclass
-from time import perf_counter
-from typing import TYPE_CHECKING, Protocol
-
-from opentelemetry.metrics import MeterProvider, get_meter_provider
-from opentelemetry.semconv._incubating.attributes.otel_attributes import (
- OTEL_COMPONENT_NAME,
- OTEL_COMPONENT_TYPE,
- OtelComponentTypeValues,
-)
-from opentelemetry.semconv._incubating.metrics.otel_metrics import (
- create_otel_sdk_exporter_log_exported,
- create_otel_sdk_exporter_log_inflight,
- create_otel_sdk_exporter_metric_data_point_exported,
- create_otel_sdk_exporter_metric_data_point_inflight,
- create_otel_sdk_exporter_operation_duration,
- create_otel_sdk_exporter_span_exported,
- create_otel_sdk_exporter_span_inflight,
-)
-from opentelemetry.semconv.attributes.error_attributes import ERROR_TYPE
-from opentelemetry.semconv.attributes.server_attributes import (
- SERVER_ADDRESS,
- SERVER_PORT,
-)
-
-if TYPE_CHECKING:
- from typing import Literal
- from urllib.parse import ParseResult as UrlParseResult
-
- from opentelemetry.util.types import Attributes, AttributeValue
-
-_component_counter = Counter()
-
-
-@dataclass
-class ExportResult:
- error: Exception | None = None
- error_attrs: Attributes = None
-
-
-class ExporterMetricsT(Protocol):
- def export_operation(
- self, num_items: int
- ) -> AbstractContextManager[ExportResult]: ...
-
-
-class NoOpExporterMetrics:
- @contextmanager
- def export_operation(self, num_items: int) -> Iterator[ExportResult]:
- yield ExportResult()
-
-
-class ExporterMetrics:
- def __init__(
- self,
- component_type: OtelComponentTypeValues | None,
- signal: Literal["traces", "metrics", "logs"],
- endpoint: UrlParseResult,
- meter_provider: MeterProvider | None,
- ) -> None:
- if signal == "traces":
- create_exported = create_otel_sdk_exporter_span_exported
- create_inflight = create_otel_sdk_exporter_span_inflight
- elif signal == "logs":
- create_exported = create_otel_sdk_exporter_log_exported
- create_inflight = create_otel_sdk_exporter_log_inflight
- else:
- create_exported = (
- create_otel_sdk_exporter_metric_data_point_exported
- )
- create_inflight = (
- create_otel_sdk_exporter_metric_data_point_inflight
- )
-
- port = endpoint.port
- if port is None:
- if endpoint.scheme == "https":
- port = 443
- elif endpoint.scheme == "http":
- port = 80
-
- component_type_value = (
- component_type.value if component_type else "unknown_otlp_exporter"
- )
- count = _component_counter[component_type_value]
- _component_counter[component_type_value] = count + 1
- self._standard_attrs: dict[str, AttributeValue] = {
- OTEL_COMPONENT_TYPE: component_type_value,
- OTEL_COMPONENT_NAME: f"{component_type_value}/{count}",
- }
- if endpoint.hostname:
- self._standard_attrs[SERVER_ADDRESS] = endpoint.hostname
- if port is not None:
- self._standard_attrs[SERVER_PORT] = port
-
- meter_provider = meter_provider or get_meter_provider()
- meter = meter_provider.get_meter("opentelemetry-sdk")
- self._inflight = create_inflight(meter)
- self._exported = create_exported(meter)
- self._duration = create_otel_sdk_exporter_operation_duration(meter)
-
- @contextmanager
- def export_operation(self, num_items: int) -> Iterator[ExportResult]:
- start_time = perf_counter()
- self._inflight.add(num_items, self._standard_attrs)
-
- result = ExportResult()
- try:
- yield result
- finally:
- error = result.error
- error_attrs = result.error_attrs
-
- end_time = perf_counter()
- self._inflight.add(-num_items, self._standard_attrs)
- exported_attrs = (
- {**self._standard_attrs, ERROR_TYPE: type(error).__qualname__}
- if error
- else self._standard_attrs
- )
- self._exported.add(num_items, exported_attrs)
- duration_attrs = (
- {**exported_attrs, **error_attrs}
- if error_attrs
- else exported_attrs
- )
- self._duration.record(end_time - start_time, duration_attrs)
-
-
-def create_exporter_metrics(
- component_type: OtelComponentTypeValues | None,
- signal: Literal["traces", "metrics", "logs"],
- endpoint: UrlParseResult,
- meter_provider: MeterProvider | None,
- enabled: bool,
-) -> ExporterMetricsT:
- if not enabled:
- return NoOpExporterMetrics()
-
- return ExporterMetrics(
- component_type,
- signal,
- endpoint,
- meter_provider,
- )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -27,7 +27,7 @@
)
from opentelemetry.sdk.trace import Resource
from opentelemetry.sdk.util.instrumentation import InstrumentationScope
-from opentelemetry.util.types import _ExtendedAttributes
+from opentelemetry.util.types import Attributes
_logger = logging.getLogger(__name__)
@@ -65,14 +65,10 @@
if isinstance(value, bytes):
return PB2AnyValue(bytes_value=value)
if isinstance(value, Sequence):
- return PB2AnyValue(
- array_value=PB2ArrayValue(values=[_encode_value(v) for v in value])
- )
+ return PB2AnyValue(array_value=PB2ArrayValue(values=[_encode_value(v)
for v in value]))
if isinstance(value, Mapping):
return PB2AnyValue(
- kvlist_value=PB2KeyValueList(
- values=[_encode_key_value(str(k), v) for k, v in value.items()]
- )
+ kvlist_value=PB2KeyValueList(values=[_encode_key_value(str(k), v)
for k, v in value.items()])
)
raise Exception(f"Invalid type {type(value)} of value {value}")
@@ -89,9 +85,7 @@
return trace_id.to_bytes(length=16, byteorder="big", signed=False)
-def _encode_attributes(
- attributes: _ExtendedAttributes | None,
-) -> list[PB2KeyValue]:
+def _encode_attributes(attributes: Attributes) -> list[PB2KeyValue]:
if not attributes:
return []
pb2_attributes = []
@@ -115,9 +109,7 @@
sdk_resource,
scope_data,
) in sdk_resource_scope_data.items():
- collector_resource = PB2Resource(
- attributes=_encode_attributes(sdk_resource.attributes)
- )
+ collector_resource =
PB2Resource(attributes=_encode_attributes(sdk_resource.attributes))
resource_data.append(
resource_class(
**{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -30,9 +30,7 @@
def _encode_log(readable_log_record: ReadableLogRecord) -> PB2LogRecord:
span_id = (
- None
- if readable_log_record.log_record.span_id == 0
- else _encode_span_id(readable_log_record.log_record.span_id)
+ None if readable_log_record.log_record.span_id == 0 else
_encode_span_id(readable_log_record.log_record.span_id)
)
trace_id = (
None
@@ -47,13 +45,9 @@
flags=int(readable_log_record.log_record.trace_flags),
body=_encode_value(readable_log_record.log_record.body),
severity_text=readable_log_record.log_record.severity_text,
- attributes=_encode_attributes(
- readable_log_record.log_record.attributes
- ),
+
attributes=_encode_attributes(readable_log_record.log_record.attributes),
dropped_attributes_count=readable_log_record.dropped_attributes,
- severity_number=getattr(
- readable_log_record.log_record.severity_number, "value", None
- ),
+
severity_number=getattr(readable_log_record.log_record.severity_number,
"value", None),
event_name=readable_log_record.log_record.event_name,
)
@@ -79,9 +73,7 @@
ScopeLogs(
scope=(_encode_instrumentation_scope(sdk_instrumentation)),
log_records=pb2_logs,
- schema_url=sdk_instrumentation.schema_url
- if sdk_instrumentation
- else None,
+ schema_url=sdk_instrumentation.schema_url if
sdk_instrumentation else None,
)
)
pb2_resource_logs.append(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -56,8 +56,7 @@
class OTLPMetricExporterMixin:
def _common_configuration(
self,
- preferred_temporality: dict[type, AggregationTemporality]
- | None = None,
+ preferred_temporality: dict[type, AggregationTemporality] | None =
None,
preferred_aggregation: dict[type, Aggregation] | None = None,
) -> None:
MetricExporter.__init__(
@@ -99,14 +98,9 @@
}
else:
- if otel_exporter_otlp_metrics_temporality_preference != (
- "CUMULATIVE"
- ):
+ if otel_exporter_otlp_metrics_temporality_preference !=
("CUMULATIVE"):
_logger.warning(
- "Unrecognized
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"
- " value found: "
- "%s, "
- "using CUMULATIVE",
+ "Unrecognized
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value found: %s, using
CUMULATIVE",
otel_exporter_otlp_metrics_temporality_preference,
)
instrument_class_temporality = {
@@ -131,22 +125,15 @@
"explicit_bucket_histogram",
)
- if otel_exporter_otlp_metrics_default_histogram_aggregation == (
- "base2_exponential_bucket_histogram"
- ):
+ if otel_exporter_otlp_metrics_default_histogram_aggregation ==
("base2_exponential_bucket_histogram"):
instrument_class_aggregation = {
Histogram: ExponentialBucketHistogramAggregation(),
}
else:
- if otel_exporter_otlp_metrics_default_histogram_aggregation != (
- "explicit_bucket_histogram"
- ):
+ if otel_exporter_otlp_metrics_default_histogram_aggregation !=
("explicit_bucket_histogram"):
_logger.warning(
- (
- "Invalid value for %s: %s, using explicit bucket "
- "histogram aggregation"
- ),
+ ("Invalid value for %s: %s, using explicit bucket
histogram aggregation"),
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
otel_exporter_otlp_metrics_default_histogram_aggregation,
)
@@ -188,9 +175,7 @@
) in resource_metrics_dict.items():
resource_data.append(
pb2.ResourceMetrics(
- resource=PB2Resource(
- attributes=_encode_attributes(sdk_resource.attributes)
- ),
+
resource=PB2Resource(attributes=_encode_attributes(sdk_resource.attributes)),
scope_metrics=scope_data.values(),
schema_url=sdk_resource.schema_url,
)
@@ -261,9 +246,7 @@
max=data_point.max,
min=data_point.min,
)
- pb2_metric.histogram.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
+ pb2_metric.histogram.aggregation_temporality =
metric.data.aggregation_temporality
pb2_metric.histogram.data_points.append(pt)
elif isinstance(metric.data, Sum):
@@ -281,9 +264,7 @@
# note that because sum is a message type, the
# fields must be set individually rather than
# instantiating a pb2.Sum and setting it once
- pb2_metric.sum.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
+ pb2_metric.sum.aggregation_temporality =
metric.data.aggregation_temporality
pb2_metric.sum.is_monotonic = metric.data.is_monotonic
pb2_metric.sum.data_points.append(pt)
@@ -320,9 +301,7 @@
max=data_point.max,
min=data_point.min,
)
- pb2_metric.exponential_histogram.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
+ pb2_metric.exponential_histogram.aggregation_temporality =
metric.data.aggregation_temporality
pb2_metric.exponential_histogram.data_points.append(pt)
else:
@@ -344,24 +323,17 @@
"""
pb_exemplars = []
for sdk_exemplar in sdk_exemplars:
- if (
- sdk_exemplar.span_id is not None
- and sdk_exemplar.trace_id is not None
- ):
+ if sdk_exemplar.span_id is not None and sdk_exemplar.trace_id is not
None:
pb_exemplar = pb2.Exemplar(
time_unix_nano=sdk_exemplar.time_unix_nano,
span_id=_encode_span_id(sdk_exemplar.span_id),
trace_id=_encode_trace_id(sdk_exemplar.trace_id),
- filtered_attributes=_encode_attributes(
- sdk_exemplar.filtered_attributes
- ),
+
filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes),
)
else:
pb_exemplar = pb2.Exemplar(
time_unix_nano=sdk_exemplar.time_unix_nano,
- filtered_attributes=_encode_attributes(
- sdk_exemplar.filtered_attributes
- ),
+
filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes),
)
# Assign the value based on its type in the SDK exemplar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -41,9 +41,7 @@
def encode_spans(
sdk_spans: Sequence[ReadableSpan],
) -> PB2ExportTraceServiceRequest:
- return PB2ExportTraceServiceRequest(
- resource_spans=_encode_resource_spans(sdk_spans)
- )
+ return
PB2ExportTraceServiceRequest(resource_spans=_encode_resource_spans(sdk_spans))
def _encode_resource_spans(
@@ -78,9 +76,7 @@
PB2ScopeSpans(
scope=(_encode_instrumentation_scope(sdk_instrumentation)),
spans=pb2_spans,
- schema_url=sdk_instrumentation.schema_url
- if sdk_instrumentation
- else None,
+ schema_url=sdk_instrumentation.schema_url if
sdk_instrumentation else None,
)
)
pb2_resource_spans.append(
@@ -169,9 +165,7 @@
def _encode_trace_state(trace_state: TraceState) -> str | None:
pb2_trace_state = None
if trace_state is not None:
- pb2_trace_state = ",".join(
- [f"{key}={value}" for key, value in (trace_state.items())]
- )
+ pb2_trace_state = ",".join([f"{key}={value}" for key, value in
(trace_state.items())])
return pb2_trace_state
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
-__version__ = "1.43.0"
+__version__ = "1.45.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_attribute_encoder.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_attribute_encoder.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_attribute_encoder.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_attribute_encoder.py
2020-02-02 01:00:00.000000000 +0100
@@ -39,9 +39,7 @@
PB2KeyValue(key="a", value=PB2AnyValue(int_value=1)),
PB2KeyValue(key="b", value=PB2AnyValue(double_value=3.14)),
PB2KeyValue(key="c", value=PB2AnyValue(bool_value=False)),
- PB2KeyValue(
- key="hello", value=PB2AnyValue(string_value="world")
- ),
+ PB2KeyValue(key="hello",
value=PB2AnyValue(string_value="world")),
PB2KeyValue(
key="greet",
value=PB2AnyValue(
@@ -84,9 +82,7 @@
def test_encode_attributes_error_logs_key(self):
with self.assertLogs(level=ERROR) as error:
- result = _encode_attributes(
- {"a": 1, "bad_key": CallingStrRaisesException(), "b": 2}
- )
+ result = _encode_attributes({"a": 1, "bad_key":
CallingStrRaisesException(), "b": 2})
self.assertEqual(len(error.records), 1)
self.assertEqual(error.records[0].msg, "Failed to encode key %s: %s")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_bytes_resource.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_bytes_resource.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_bytes_resource.py
1970-01-01 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_bytes_resource.py
2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,61 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+"""Every OTLP encoder groups telemetry by using the Resource as a dict key, so
+a Resource carrying a bytes attribute must survive the whole export path.
+"""
+
+import unittest
+
+from opentelemetry.exporter.otlp.proto.common._log_encoder import encode_logs
+from opentelemetry.exporter.otlp.proto.common.metrics_encoder import (
+ encode_metrics,
+)
+from opentelemetry.exporter.otlp.proto.common.trace_encoder import encode_spans
+from opentelemetry.sdk._logs import LoggerProvider
+from opentelemetry.sdk._logs.export import (
+ InMemoryLogExporter,
+ SimpleLogRecordProcessor,
+)
+from opentelemetry.sdk.metrics import MeterProvider
+from opentelemetry.sdk.metrics.export import InMemoryMetricReader
+from opentelemetry.sdk.resources import Resource
+from opentelemetry.sdk.trace import TracerProvider
+from opentelemetry.sdk.trace.export import SimpleSpanProcessor
+from opentelemetry.sdk.trace.export.in_memory_span_exporter import (
+ InMemorySpanExporter,
+)
+
+_BYTES_RESOURCE = {"service.name": "svc", "build.id": b"\x01\x02\x03"}
+
+
+class TestBytesResourceExports(unittest.TestCase):
+ def setUp(self):
+ self.resource = Resource.create(_BYTES_RESOURCE)
+
+ def test_encode_spans(self):
+ exporter = InMemorySpanExporter()
+ provider = TracerProvider(resource=self.resource,
shutdown_on_exit=False)
+ provider.add_span_processor(SimpleSpanProcessor(exporter))
+ with provider.get_tracer(__name__).start_as_current_span("span"):
+ pass
+ request = encode_spans(exporter.get_finished_spans())
+ self.assertEqual(len(request.resource_spans), 1)
+ provider.shutdown()
+
+ def test_encode_metrics(self):
+ reader = InMemoryMetricReader()
+ provider = MeterProvider(metric_readers=[reader],
resource=self.resource)
+ provider.get_meter(__name__).create_counter("counter").add(1)
+ request = encode_metrics(reader.get_metrics_data())
+ self.assertEqual(len(request.resource_metrics), 1)
+ provider.shutdown()
+
+ def test_encode_logs(self):
+ exporter = InMemoryLogExporter()
+ provider = LoggerProvider(resource=self.resource,
shutdown_on_exit=False)
+ provider.add_log_record_processor(SimpleLogRecordProcessor(exporter))
+ provider.get_logger(__name__).emit(body="body")
+ request = encode_logs(exporter.get_finished_logs())
+ self.assertEqual(len(request.resource_logs), 1)
+ provider.shutdown()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_exporter_metrics.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_exporter_metrics.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_exporter_metrics.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_exporter_metrics.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
-# Copyright The OpenTelemetry Authors
-# SPDX-License-Identifier: Apache-2.0
-
-import unittest
-from unittest.mock import Mock, patch
-from urllib.parse import urlparse
-
-from opentelemetry.exporter.otlp.proto.common._exporter_metrics import (
- ExporterMetrics,
- NoOpExporterMetrics,
- create_exporter_metrics,
-)
-from opentelemetry.semconv._incubating.attributes.otel_attributes import (
- OtelComponentTypeValues,
-)
-
-
-class TestExporterMetrics(unittest.TestCase):
- def test_factory_returns_noop_when_disabled(self):
- meter_provider = Mock()
-
- with patch(
- "opentelemetry.exporter.otlp.proto.common."
- "_exporter_metrics.get_meter_provider"
- ) as get_meter_provider:
- metrics = create_exporter_metrics(
- OtelComponentTypeValues.OTLP_HTTP_SPAN_EXPORTER,
- "traces",
- urlparse("http://localhost:4318/v1/traces"),
- meter_provider,
- False,
- )
-
- self.assertIsInstance(metrics, NoOpExporterMetrics)
- meter_provider.get_meter.assert_not_called()
- get_meter_provider.assert_not_called()
-
- def test_factory_returns_exporter_metrics_when_enabled(self):
- meter_provider = Mock()
- meter_provider.get_meter.return_value = Mock()
-
- metrics = create_exporter_metrics(
- OtelComponentTypeValues.OTLP_HTTP_SPAN_EXPORTER,
- "traces",
- urlparse("http://localhost:4318/v1/traces"),
- meter_provider,
- True,
- )
-
- self.assertIsInstance(metrics, ExporterMetrics)
- meter_provider.get_meter.assert_called_once_with("opentelemetry-sdk")
-
- def test_noop_export_operation_yields_result(self):
- metrics = NoOpExporterMetrics()
-
- with metrics.export_operation(1) as result:
- result.error = RuntimeError("error")
-
- self.assertIsInstance(result.error, RuntimeError)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_log_encoder.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_log_encoder.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_log_encoder.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_log_encoder.py
2020-02-02 01:00:00.000000000 +0100
@@ -65,9 +65,7 @@
{"first_resource": "value"},
"resource_schema_url",
),
- instrumentation_scope=InstrumentationScope(
- "first_name", "first_version"
- ),
+ instrumentation_scope=InstrumentationScope("first_name",
"first_version"),
)
pb2_service_request = ExportLogsServiceRequest(
resource_logs=[
@@ -82,28 +80,20 @@
),
scope_logs=[
PB2ScopeLogs(
- scope=PB2InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=PB2InstrumentationScope(name="first_name",
version="first_version"),
log_records=[
PB2LogRecord(
time_unix_nano=1644650195189786880,
observed_time_unix_nano=1644650195189786881,
- trace_id=_encode_trace_id(
- 89564621134313219400156819398935297684
- ),
- span_id=_encode_span_id(
- 1312458408527513268
- ),
+
trace_id=_encode_trace_id(89564621134313219400156819398935297684),
+
span_id=_encode_span_id(1312458408527513268),
flags=int(TraceFlags(0x01)),
severity_text="WARN",
severity_number=SeverityNumber.WARN.value,
body=_encode_value(
"Do not go gentle into that good
night. Rage, rage against the dying of the light"
),
- attributes=_encode_attributes(
- {"a": 1, "b": "c"}
- ),
+ attributes=_encode_attributes({"a": 1,
"b": "c"}),
)
],
),
@@ -117,20 +107,18 @@
def test_encode_log_record_with_no_instrumentation_scope_and_dict_body(
self,
):
- log_record_with_no_instrumentation_scope_and_dict_body = (
- ReadWriteLogRecord(
- LogRecord(
- timestamp=1644650427658989056,
- observed_timestamp=1644650427658989057,
- context=_CONTEXT_LOG,
- severity_text="DEBUG",
- severity_number=SeverityNumber.DEBUG,
- body={"error": None, "array_with_nones": [1, None, 2]},
- attributes={"a": 1, "b": "c"},
- ),
- resource=SDKResource({"second_resource": "CASE"}),
- instrumentation_scope=None,
- )
+ log_record_with_no_instrumentation_scope_and_dict_body =
ReadWriteLogRecord(
+ LogRecord(
+ timestamp=1644650427658989056,
+ observed_timestamp=1644650427658989057,
+ context=_CONTEXT_LOG,
+ severity_text="DEBUG",
+ severity_number=SeverityNumber.DEBUG,
+ body={"error": None, "array_with_nones": [1, None, 2]},
+ attributes={"a": 1, "b": "c"},
+ ),
+ resource=SDKResource({"second_resource": "CASE"}),
+ instrumentation_scope=None,
)
pb2_resource_logs = PB2ResourceLogs(
resource=PB2Resource(
@@ -148,9 +136,7 @@
PB2LogRecord(
time_unix_nano=1644650427658989056,
observed_time_unix_nano=1644650427658989057,
- trace_id=_encode_trace_id(
- 89564621134313219400156819398935297684
- ),
+
trace_id=_encode_trace_id(89564621134313219400156819398935297684),
span_id=_encode_span_id(1312458408527513268),
flags=int(TraceFlags(0x01)),
severity_text="DEBUG",
@@ -168,9 +154,7 @@
],
)
self.assertEqual(
- encode_logs(
- [log_record_with_no_instrumentation_scope_and_dict_body]
- ),
+
encode_logs([log_record_with_no_instrumentation_scope_and_dict_body]),
ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]),
)
@@ -185,11 +169,7 @@
severity_text="FATAL",
severity_number=SeverityNumber.FATAL,
body="This instrumentation scope has a schema url and
attributes",
- attributes={
- "extended": {
- "sequence": [{"inner": "mapping", "none": None}]
- }
- },
+ attributes={"extended": {"sequence": [{"inner": "mapping",
"none": None}]}},
),
resource=SDKResource({}),
instrumentation_scope=InstrumentationScope(
@@ -212,24 +192,14 @@
PB2LogRecord(
time_unix_nano=1644650584292683033,
observed_time_unix_nano=1644650584292683033,
- trace_id=_encode_trace_id(
- 89564621134313219400156819398935297684
- ),
+
trace_id=_encode_trace_id(89564621134313219400156819398935297684),
span_id=_encode_span_id(1312458408527513268),
flags=int(TraceFlags(0x01)),
severity_text="FATAL",
severity_number=SeverityNumber.FATAL.value,
- body=_encode_value(
- "This instrumentation scope has a schema url
and attributes"
- ),
+ body=_encode_value("This instrumentation scope has
a schema url and attributes"),
attributes=_encode_attributes(
- {
- "extended": {
- "sequence": [
- {"inner": "mapping", "none": None}
- ]
- }
- }
+ {"extended": {"sequence": [{"inner":
"mapping", "none": None}]}}
),
)
],
@@ -238,9 +208,7 @@
],
)
self.assertEqual(
- encode_logs(
- [log_record_with_empty_resource_and_dict_attribute_value]
- ),
+
encode_logs([log_record_with_empty_resource_and_dict_attribute_value]),
ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]),
)
@@ -250,10 +218,7 @@
self.assertTrue(hasattr(sdk_logs[0], "dropped_attributes"))
self.assertEqual(
# pylint:disable=no-member
- encoded_logs.resource_logs[0]
- .scope_logs[0]
- .log_records[0]
- .dropped_attributes_count,
+
encoded_logs.resource_logs[0].scope_logs[0].log_records[0].dropped_attributes_count,
2,
)
@@ -280,13 +245,9 @@
),
resource=SDKResource({"first_resource": "value"}),
limits=LogRecordLimits(max_attributes=1),
- instrumentation_scope=InstrumentationScope(
- "first_name", "first_version"
- ),
- )
- ctx_log2 = set_span_in_context(
- NonRecordingSpan(SpanContext(0, 0, False))
+ instrumentation_scope=InstrumentationScope("first_name",
"first_version"),
)
+ ctx_log2 = set_span_in_context(NonRecordingSpan(SpanContext(0, 0,
False)))
log2 = ReadWriteLogRecord(
LogRecord(
timestamp=1644650249738562048,
@@ -297,9 +258,7 @@
attributes={},
),
resource=SDKResource({"second_resource": "CASE"}),
- instrumentation_scope=InstrumentationScope(
- "second_name", "second_version"
- ),
+ instrumentation_scope=InstrumentationScope("second_name",
"second_version"),
)
return [log1, log2]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_metrics_encoder.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_metrics_encoder.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_metrics_encoder.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_metrics_encoder.py
2020-02-02 01:00:00.000000000 +0100
@@ -116,16 +116,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -138,15 +134,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946015139533244,
@@ -197,16 +189,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -219,15 +207,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946015139533244,
@@ -278,16 +262,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -300,15 +280,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
time_unix_nano=1641946016139533244,
@@ -357,16 +333,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -379,15 +351,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
time_unix_nano=1641946016139533244,
@@ -435,16 +403,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -457,15 +421,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946016139533244,
@@ -483,9 +443,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -495,9 +453,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -566,16 +522,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -588,15 +540,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946016139533244,
@@ -614,9 +562,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -626,9 +572,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -650,15 +594,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946016139533244,
@@ -676,9 +616,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -688,9 +626,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -705,9 +641,7 @@
],
),
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="second_name", version="second_version"
- ),
+ scope=InstrumentationScope(name="second_name",
version="second_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -720,15 +654,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946016139533244,
@@ -746,9 +676,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -758,9 +686,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -775,9 +701,7 @@
],
),
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="third_name", version="third_version"
- ),
+ scope=InstrumentationScope(name="third_name",
version="third_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -790,15 +714,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946016139533244,
@@ -816,9 +736,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -828,9 +746,7 @@
filtered_attributes=[
KeyValue(
key="filtered",
- value=AnyValue(
-
string_value="banana"
- ),
+
value=AnyValue(string_value="banana"),
)
],
),
@@ -906,16 +822,12 @@
resource=OTLPResource(
attributes=[
KeyValue(key="a", value=AnyValue(int_value=1)),
- KeyValue(
- key="b", value=AnyValue(bool_value=False)
- ),
+ KeyValue(key="b",
value=AnyValue(bool_value=False)),
]
),
scope_metrics=[
pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name="first_name", version="first_version"
- ),
+ scope=InstrumentationScope(name="first_name",
version="first_version"),
schema_url="instrumentation_scope_schema_url",
metrics=[
pb2.Metric(
@@ -928,15 +840,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=0,
@@ -1039,9 +947,7 @@
name="first_name",
version="first_version",
attributes=[
- KeyValue(
- key="one", value=AnyValue(int_value=1)
- ),
+ KeyValue(key="one",
value=AnyValue(int_value=1)),
KeyValue(
key="two",
value=AnyValue(string_value="2"),
@@ -1060,15 +966,11 @@
attributes=[
KeyValue(
key="a",
- value=AnyValue(
- int_value=1
- ),
+
value=AnyValue(int_value=1),
),
KeyValue(
key="b",
- value=AnyValue(
- bool_value=True
- ),
+
value=AnyValue(bool_value=True),
),
],
start_time_unix_nano=1641946015139533244,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_trace_encoder.py
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_trace_encoder.py
---
old/opentelemetry_exporter_otlp_proto_common-1.43.0/tests/test_trace_encoder.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_exporter_otlp_proto_common-1.45.0/tests/test_trace_encoder.py
2020-02-02 01:00:00.000000000 +0100
@@ -72,13 +72,9 @@
start_times[5] + (500 * 10**6),
)
- parent_span_context = SDKSpanContext(
- trace_id, 0x1111111111111111, is_remote=True
- )
+ parent_span_context = SDKSpanContext(trace_id, 0x1111111111111111,
is_remote=True)
- other_context = SDKSpanContext(
- trace_id, 0x2222222222222222, is_remote=False
- )
+ other_context = SDKSpanContext(trace_id, 0x2222222222222222,
is_remote=False)
span1 = SDKSpan(
name="test-span-1",
@@ -100,9 +96,7 @@
},
),
),
- links=(
- SDKLink(context=other_context, attributes={"key_bool": True}),
- ),
+ links=(SDKLink(context=other_context, attributes={"key_bool":
True}),),
resource=SDKResource({}, "resource_schema_url"),
)
span1.start(start_time=start_times[0])
@@ -136,9 +130,7 @@
context=other_context,
parent=None,
resource=SDKResource({}, "resource_schema_url"),
- instrumentation_scope=SDKInstrumentationScope(
- name="name", version="version"
- ),
+ instrumentation_scope=SDKInstrumentationScope(name="name",
version="version"),
)
span4.start(start_time=start_times[3])
span4.end(end_time=end_times[3])
@@ -198,85 +190,55 @@
spans=[
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[0].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[0].context.span_id),
trace_state=None,
- parent_span_id=_encode_span_id(
- otel_spans[0].parent.span_id
- ),
+
parent_span_id=_encode_span_id(otel_spans[0].parent.span_id),
name=otel_spans[0].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 0
- ].start_time,
+
start_time_unix_nano=otel_spans[0].start_time,
end_time_unix_nano=otel_spans[0].end_time,
attributes=[
PB2KeyValue(
key="key_bool",
- value=PB2AnyValue(
- bool_value=False
- ),
+
value=PB2AnyValue(bool_value=False),
),
PB2KeyValue(
key="key_string",
- value=PB2AnyValue(
- string_value="hello_world"
- ),
+
value=PB2AnyValue(string_value="hello_world"),
),
PB2KeyValue(
key="key_float",
- value=PB2AnyValue(
- double_value=111.22
- ),
+
value=PB2AnyValue(double_value=111.22),
),
],
events=[
PB2SPan.Event(
name="event0",
- time_unix_nano=otel_spans[0]
- .events[0]
- .timestamp,
+
time_unix_nano=otel_spans[0].events[0].timestamp,
attributes=[
PB2KeyValue(
key="annotation_bool",
- value=PB2AnyValue(
- bool_value=True
- ),
+
value=PB2AnyValue(bool_value=True),
),
PB2KeyValue(
key="annotation_string",
- value=PB2AnyValue(
-
string_value="annotation_test"
- ),
+
value=PB2AnyValue(string_value="annotation_test"),
),
PB2KeyValue(
key="key_float",
- value=PB2AnyValue(
- double_value=0.3
- ),
+
value=PB2AnyValue(double_value=0.3),
),
],
)
],
links=[
PB2SPan.Link(
- trace_id=_encode_trace_id(
- otel_spans[0]
- .links[0]
- .context.trace_id
- ),
- span_id=_encode_span_id(
- otel_spans[0]
- .links[0]
- .context.span_id
- ),
+
trace_id=_encode_trace_id(otel_spans[0].links[0].context.trace_id),
+
span_id=_encode_span_id(otel_spans[0].links[0].context.span_id),
attributes=[
PB2KeyValue(
key="key_bool",
- value=PB2AnyValue(
- bool_value=True
- ),
+
value=PB2AnyValue(bool_value=True),
),
],
flags=0x100,
@@ -298,16 +260,12 @@
spans=[
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[3].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[3].context.span_id),
trace_state=None,
parent_span_id=None,
name=otel_spans[3].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 3
- ].start_time,
+
start_time_unix_nano=otel_spans[3].start_time,
end_time_unix_nano=otel_spans[3].end_time,
attributes=None,
events=None,
@@ -324,9 +282,7 @@
attributes=[
PB2KeyValue(
key="key_resource",
- value=PB2AnyValue(
- string_value="some_resource"
- ),
+
value=PB2AnyValue(string_value="some_resource"),
)
]
),
@@ -336,16 +292,12 @@
spans=[
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[1].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[1].context.span_id),
trace_state=None,
parent_span_id=None,
name=otel_spans[1].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 1
- ].start_time,
+
start_time_unix_nano=otel_spans[1].start_time,
end_time_unix_nano=otel_spans[1].end_time,
attributes=None,
events=None,
@@ -355,23 +307,17 @@
),
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[2].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[2].context.span_id),
trace_state=None,
parent_span_id=None,
name=otel_spans[2].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 2
- ].start_time,
+
start_time_unix_nano=otel_spans[2].start_time,
end_time_unix_nano=otel_spans[2].end_time,
attributes=[
PB2KeyValue(
key="key_string",
- value=PB2AnyValue(
- string_value="hello_world"
- ),
+
value=PB2AnyValue(string_value="hello_world"),
),
],
events=None,
@@ -388,32 +334,24 @@
attributes=[
PB2KeyValue(
key="key_resource",
- value=PB2AnyValue(
- string_value="another_resource"
- ),
+
value=PB2AnyValue(string_value="another_resource"),
),
],
),
schema_url="resource_schema_url",
scope_spans=[
PB2ScopeSpans(
- scope=PB2InstrumentationScope(
- name="scope_1_name", version="scope_1_version"
- ),
+ scope=PB2InstrumentationScope(name="scope_1_name",
version="scope_1_version"),
schema_url="scope_1_schema_url",
spans=[
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[4].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[4].context.span_id),
trace_state=None,
parent_span_id=None,
name=otel_spans[4].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 4
- ].start_time,
+
start_time_unix_nano=otel_spans[4].start_time,
end_time_unix_nano=otel_spans[4].end_time,
attributes=None,
events=None,
@@ -442,16 +380,12 @@
spans=[
PB2SPan(
trace_id=trace_id,
- span_id=_encode_span_id(
- otel_spans[5].context.span_id
- ),
+
span_id=_encode_span_id(otel_spans[5].context.span_id),
trace_state=None,
parent_span_id=None,
name=otel_spans[5].name,
kind=span_kind,
- start_time_unix_nano=otel_spans[
- 5
- ].start_time,
+
start_time_unix_nano=otel_spans[5].start_time,
end_time_unix_nano=otel_spans[5].end_time,
attributes=None,
events=None,