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-06-27 18:04:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing 
/work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common (Old)
 and      
/work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.11887
 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-opentelemetry-exporter-otlp-proto-common"

Sat Jun 27 18:04:39 2026 rev:17 rq:1361870 version:1.42.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common/python-opentelemetry-exporter-otlp-proto-common.changes
  2026-04-28 11:55:53.088294719 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.11887/python-opentelemetry-exporter-otlp-proto-common.changes
       2026-06-27 18:05:46.447318626 +0200
@@ -1,0 +2,119 @@
+Sat Jun 20 15:59:21 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 1.42.1:
+  * This is a patch release on the previous 1.42.0/0.63b0
+    release, fixing the issue(s) below.
+  * ### Fixed
+  * Preserve the random trace ID flag when creating child spans
+    instead of always setting the random trace id bit depending
+    on the available trace id generator.
+- update to 1.42.0:
+  * ### Added
+  * `opentelemetry-api`, `opentelemetry-sdk`: add support for
+    'random-trace-id' flags in W3C traceparent header trace
+    flags. Implementations of `IdGenerator` that do randomly
+    generate the 56 least significant bits, should also implement
+    a `is_trace_id_random` methods that returns `True`.
+  * logs: add exception support to Logger emit and LogRecord
+    attributes
+  * `opentelemetry-exporter-otlp-proto-grpc`: make retryable gRPC
+    error codes configurable for gRPC exporters
+  * `opentelemetry-sdk`: Add
+    `create_logger_provider`/`configure_logger_provider` to
+    declarative file configuration, enabling LoggerProvider
+    instantiation from config files without reading env vars
+  * `opentelemetry-exporter-otlp-json-common`: add
+    'opentelemetry-exporter-otlp-json-common' package for OTLP
+    JSON exporters
+  * `opentelemetry-sdk`: Add `service` resource detector support
+    to declarative file configuration via
+    `detection_development.detectors[].service`
+  * `opentelemetry-docker-tests`: add docker-tests coverage of
+    `opentelemetry-exporter-otlp-proto-grpc` and `opentelemetry-
+    exporter-otlp-proto-http` metrics export
+  * Add `registry` keyword argument to `PrometheusMetricReader`
+    to allow passing a custom Prometheus registry
+  * Add WeaverLiveCheck test util
+  * `opentelemetry-sdk`: add `load_entry_point` shared utility to
+    declarative file configuration for loading plugins via entry
+    points; refactor propagator loading to use it
+  * `opentelemetry-sdk`: add sampler plugin loading to
+    declarative file configuration via the
+    `opentelemetry_sampler` entry point group, matching the
+    spec's PluginComponentProvider mechanism
+  * `opentelemetry-sdk`: add propagator plugin loading to
+    declarative file configuration via the
+    `opentelemetry_propagator` entry point group, matching the
+    spec's PluginComponentProvider mechanism
+  * `opentelemetry-sdk`: add exporter plugin loading to
+    declarative file configuration for all three signals (traces,
+    metrics, logs) via the `opentelemetry_*_exporter` entry point
+    groups, matching the spec's PluginComponentProvider mechanism
+  * `opentelemetry-sdk`: add generic resource detector plugin
+    loading to declarative file configuration via the
+    `opentelemetry_resource_detector` entry point group, matching
+    the spec's PluginComponentProvider mechanism
+  * `opentelemetry-sdk`: add `additional_properties` support to
+    generated config models via custom `datamodel-codegen`
+    template, enabling plugin/custom component names to flow
+    through typed dataclasses
+  * Add ability to selectively enable exporting of SDK internal
+    metrics with the `OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED`
+    environment variable.
+  * ### Changed
+  * `opentelemetry-semantic-conventions`: use `X | Y` union
+    annotation
+  * `opentelemetry-api`: update `EnvironmentGetter` and
+    `EnvironmentSetter` to use normalized environment variable
+    names
+  * Apply fixes for `UP` ruff rule
+  * `opentelemetry-sdk`: only load entrypoints for resource
+    detectors if they are configured via
+    `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS`
+  * ci: wait for tracecontext server readiness instead of a fixed
+    sleep in `scripts/tracecontext-integration-test.sh`
+  * Switch to SPDX license headers and add CI enforcement
+  * `opentelemetry-semantic-conventions`: Bump semantic
+    conventions to 1.41.1, this changes the metrics name of
+    `K8S_CONTAINER_CPU_LIMIT_UTILIZATION` and
+    `K8S_CONTAINER_CPU_REQUEST_UTILIZATION`.
+  * ### Removed
+  * `opentelemetry-api`: remove third-party importlib-metadata in
+    favor of standard library since Python >= 3.10 is now
+    required
+  * Drop Python 3.9 support
+  * ### Fixed
+  * `opentelemetry-sdk`: Allow declarative OTLP HTTP exporters to
+    map `compression: deflate` instead of rejecting it as
+    unsupported.
+  * Fix incorrect code example in `create_tracer()` docstring
+  * `opentelemetry-sdk`: Fix `ProcessResourceDetector` to use
+    `sys.orig_argv` so that `process.command`,
+    `process.command_line`, and `process.command_args` reflect
+    the original invocation for `python -m ` runs (where
+    `sys.argv[0]` is rewritten to the module path)
+  * `opentelemetry-sdk`: fix YAML structure injection via
+    environment variable substitution in declarative file
+    configuration; values containing newlines are now emitted as
+    quoted YAML scalars per spec requirement
+  * `opentelemetry-sdk`: Fix mutable attributes reference in
+    metrics, attributes passed to instrument `add`/`record` are
+    now copied so that subsequent mutations do not affect
+    recorded data points
+  * `opentelemetry-sdk`: make resource detector ordering
+    deterministic
+  * Fix incorrect type annotation on `detectors` parameter of
+    `get_aggregated_resources`
+  * `opentelemetry-api`: Enforce W3C Baggage size limits on
+    outbound propagation in `W3CBaggagePropagator.inject()`.
+    Previously only inbound extraction enforced limits; now
+    inject also caps entries at 180, individual pairs at 4096
+    bytes, and total header at 8192 bytes per the W3C Baggage
+    spec. The extract path max_pairs limit now counts all size-
+    valid entries rather than only successfully parsed ones.
+  * `opentelemetry-sdk`: fix multi-processor `force_flush`
+    skipping remaining processors when one returns `None`
+  * `opentelemetry-test-utils`: fix weaver live check hanging
+    when weaver log output fills the pipe buffer
+
+-------------------------------------------------------------------

Old:
----
  opentelemetry_exporter_otlp_proto_common-1.41.1.tar.gz

New:
----
  opentelemetry_exporter_otlp_proto_common-1.42.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-opentelemetry-exporter-otlp-proto-common.spec ++++++
--- /var/tmp/diff_new_pack.S3ON4C/_old  2026-06-27 18:05:47.099340483 +0200
+++ /var/tmp/diff_new_pack.S3ON4C/_new  2026-06-27 18:05:47.099340483 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-opentelemetry-exporter-otlp-proto-common
-Version:        1.41.1
+Version:        1.42.1
 Release:        0
 Summary:        OpenTelemetry Protobuf encoding
 License:        Apache-2.0

++++++ opentelemetry_exporter_otlp_proto_common-1.41.1.tar.gz -> 
opentelemetry_exporter_otlp_proto_common-1.42.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/PKG-INFO 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/PKG-INFO
--- old/opentelemetry_exporter_otlp_proto_common-1.41.1/PKG-INFO        
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.42.1/PKG-INFO        
2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: opentelemetry-exporter-otlp-proto-common
-Version: 1.41.1
+Version: 1.42.1
 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
@@ -13,14 +13,13 @@
 Classifier: Intended Audience :: Developers
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Programming Language :: Python :: 3.14
-Requires-Python: >=3.9
-Requires-Dist: opentelemetry-proto==1.41.1
+Requires-Python: >=3.10
+Requires-Dist: opentelemetry-proto==1.42.1
 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.41.1/pyproject.toml 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/pyproject.toml
--- old/opentelemetry_exporter_otlp_proto_common-1.41.1/pyproject.toml  
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.42.1/pyproject.toml  
2020-02-02 01:00:00.000000000 +0100
@@ -8,7 +8,7 @@
 description = "OpenTelemetry Protobuf encoding"
 readme = "README.rst"
 license = "Apache-2.0"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
 authors = [
   { name = "OpenTelemetry Authors", email = 
"[email protected]" },
 ]
@@ -19,7 +19,6 @@
   "Intended Audience :: Developers",
   "Programming Language :: Python",
   "Programming Language :: Python :: 3",
-  "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
@@ -27,7 +26,7 @@
   "Programming Language :: Python :: 3.14",
 ]
 dependencies = [
-  "opentelemetry-proto == 1.41.1",
+  "opentelemetry-proto == 1.42.1",
 ]
 
 [project.urls]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/__init__.py
        2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/__init__.py
        2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 
 from opentelemetry.exporter.otlp.proto.common.version import __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py
       2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,153 @@
+# 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.41.1/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
      2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
      2020-02-02 01:00:00.000000000 +0100
@@ -1,29 +1,13 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 
 from __future__ import annotations
 
 import logging
-from collections.abc import Sequence
+from collections.abc import Callable, Mapping, Sequence
 from typing import (
     Any,
-    Callable,
-    Dict,
-    List,
-    Mapping,
-    Optional,
     TypeVar,
 )
 
@@ -67,9 +51,7 @@
     return PB2Resource(attributes=_encode_attributes(resource.attributes))
 
 
-def _encode_value(
-    value: Any, allow_null: bool = False
-) -> Optional[PB2AnyValue]:
+def _encode_value(value: Any, allow_null: bool = False) -> PB2AnyValue | None:
     if allow_null is True and value is None:
         return None
     if isinstance(value, bool):
@@ -136,7 +118,7 @@
 def _encode_attributes(
     attributes: _ExtendedAttributes,
     allow_null: bool = False,
-) -> Optional[List[PB2KeyValue]]:
+) -> list[PB2KeyValue] | None:
     if attributes:
         pb2_attributes = []
         for key, value in attributes.items():
@@ -153,10 +135,10 @@
 
 
 def _get_resource_data(
-    sdk_resource_scope_data: Dict[Resource, _ResourceDataT],
+    sdk_resource_scope_data: dict[Resource, _ResourceDataT],
     resource_class: Callable[..., _TypingResourceT],
     name: str,
-) -> List[_TypingResourceT]:
+) -> list[_TypingResourceT]:
     resource_data = []
 
     for (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/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.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
 2020-02-02 01:00:00.000000000 +0100
@@ -1,18 +1,7 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 from collections import defaultdict
-from typing import List, Sequence
+from collections.abc import Sequence
 
 from opentelemetry.exporter.otlp.proto.common._internal import (
     _encode_attributes,
@@ -72,7 +61,7 @@
 
 def _encode_resource_logs(
     batch: Sequence[ReadableLogRecord],
-) -> List[ResourceLogs]:
+) -> list[ResourceLogs]:
     sdk_resource_logs = defaultdict(lambda: defaultdict(list))
 
     for readable_log in batch:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/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.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
      2020-02-02 01:00:00.000000000 +0100
@@ -1,21 +1,9 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 from __future__ import annotations
 
 import logging
 from os import environ
-from typing import Dict, List
 
 from opentelemetry.exporter.otlp.proto.common._internal import (
     _encode_attributes,
@@ -79,8 +67,8 @@
         )
 
     def _get_temporality(
-        self, preferred_temporality: Dict[type, AggregationTemporality]
-    ) -> Dict[type, AggregationTemporality]:
+        self, preferred_temporality: dict[type, AggregationTemporality]
+    ) -> dict[type, AggregationTemporality]:
         otel_exporter_otlp_metrics_temporality_preference = (
             environ.get(
                 OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE,
@@ -136,8 +124,8 @@
 
     def _get_aggregation(
         self,
-        preferred_aggregation: Dict[type, Aggregation],
-    ) -> Dict[type, Aggregation]:
+        preferred_aggregation: dict[type, Aggregation],
+    ) -> dict[type, Aggregation]:
         otel_exporter_otlp_metrics_default_histogram_aggregation = environ.get(
             OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
             "explicit_bucket_histogram",
@@ -344,7 +332,7 @@
         )
 
 
-def _encode_exemplars(sdk_exemplars: List[Exemplar]) -> List[pb2.Exemplar]:
+def _encode_exemplars(sdk_exemplars: list[Exemplar]) -> list[pb2.Exemplar]:
     """
     Converts a list of SDK Exemplars into a list of protobuf Exemplars.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/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.42.1/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
        2020-02-02 01:00:00.000000000 +0100
@@ -1,20 +1,9 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 import logging
 from collections import defaultdict
-from typing import List, Optional, Sequence
+from collections.abc import Sequence
 
 from opentelemetry.exporter.otlp.proto.common._internal import (
     _encode_attributes,
@@ -59,7 +48,7 @@
 
 def _encode_resource_spans(
     sdk_spans: Sequence[ReadableSpan],
-) -> List[PB2ResourceSpans]:
+) -> list[PB2ResourceSpans]:
     # We need to inspect the spans and group + structure them as:
     #
     #   Resource
@@ -105,7 +94,7 @@
     return pb2_resource_spans
 
 
-def _span_flags(parent_span_context: Optional[SpanContext]) -> int:
+def _span_flags(parent_span_context: SpanContext | None) -> int:
     flags = PB2SpanFlags.SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK
     if parent_span_context and parent_span_context.is_remote:
         flags |= PB2SpanFlags.SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK
@@ -136,7 +125,7 @@
 
 def _encode_events(
     events: Sequence[Event],
-) -> Optional[List[PB2SPan.Event]]:
+) -> list[PB2SPan.Event] | None:
     pb2_events = None
     if events:
         pb2_events = []
@@ -167,7 +156,7 @@
     return pb2_links
 
 
-def _encode_status(status: Status) -> Optional[PB2Status]:
+def _encode_status(status: Status) -> PB2Status | None:
     pb2_status = None
     if status is not None:
         pb2_status = PB2Status(
@@ -177,7 +166,7 @@
     return pb2_status
 
 
-def _encode_trace_state(trace_state: TraceState) -> Optional[str]:
+def _encode_trace_state(trace_state: TraceState) -> str | None:
     pb2_trace_state = None
     if trace_state is not None:
         pb2_trace_state = ",".join(
@@ -186,7 +175,7 @@
     return pb2_trace_state
 
 
-def _encode_parent_id(context: Optional[SpanContext]) -> Optional[bytes]:
+def _encode_parent_id(context: SpanContext | None) -> bytes | None:
     if context:
         return _encode_span_id(context.span_id)
     return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
    2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
    2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 
 from opentelemetry.exporter.otlp.proto.common._internal._log_encoder import (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
 2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
 2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 
 from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import 
(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
   2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
   2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 
 from opentelemetry.exporter.otlp.proto.common._internal.trace_encoder import (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
        2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
        2020-02-02 01:00:00.000000000 +0100
@@ -1,15 +1,4 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
-__version__ = "1.41.1"
+__version__ = "1.42.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_attribute_encoder.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_attribute_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_attribute_encoder.py
 2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_attribute_encoder.py
 2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 import unittest
 from logging import ERROR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_exporter_metrics.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_exporter_metrics.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_exporter_metrics.py
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_exporter_metrics.py
  2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,59 @@
+# 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.41.1/tests/test_log_encoder.py 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_log_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_log_encoder.py   
    2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_log_encoder.py   
    2020-02-02 01:00:00.000000000 +0100
@@ -1,19 +1,7 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 import unittest
-from typing import List, Tuple
 
 from opentelemetry._logs import LogRecord, SeverityNumber
 from opentelemetry.exporter.otlp.proto.common._internal import (
@@ -87,7 +75,7 @@
         )
 
     @staticmethod
-    def _get_sdk_log_data() -> List[ReadWriteLogRecord]:
+    def _get_sdk_log_data() -> list[ReadWriteLogRecord]:
         # pylint:disable=too-many-locals
         ctx_log1 = set_span_in_context(
             NonRecordingSpan(
@@ -330,7 +318,7 @@
 
     def get_test_logs(
         self,
-    ) -> Tuple[List[ReadWriteLogRecord], ExportLogsServiceRequest]:
+    ) -> tuple[list[ReadWriteLogRecord], ExportLogsServiceRequest]:
         sdk_logs = self._get_sdk_log_data()
 
         pb2_service_request = ExportLogsServiceRequest(
@@ -646,7 +634,7 @@
         return sdk_logs, pb2_service_request
 
     @staticmethod
-    def _get_test_logs_dropped_attributes() -> List[ReadWriteLogRecord]:
+    def _get_test_logs_dropped_attributes() -> list[ReadWriteLogRecord]:
         ctx_log1 = set_span_in_context(
             NonRecordingSpan(
                 SpanContext(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_metrics_encoder.py
 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_metrics_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_metrics_encoder.py
   2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_metrics_encoder.py
   2020-02-02 01:00:00.000000000 +0100
@@ -1,16 +1,5 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 # pylint: disable=protected-access,too-many-lines
 import unittest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_trace_encoder.py 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_trace_encoder.py
--- 
old/opentelemetry_exporter_otlp_proto_common-1.41.1/tests/test_trace_encoder.py 
    2020-02-02 01:00:00.000000000 +0100
+++ 
new/opentelemetry_exporter_otlp_proto_common-1.42.1/tests/test_trace_encoder.py 
    2020-02-02 01:00:00.000000000 +0100
@@ -1,21 +1,9 @@
 # Copyright The OpenTelemetry Authors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
 
 # pylint: disable=protected-access
 
 import unittest
-from typing import List, Tuple
 
 from opentelemetry.exporter.otlp.proto.common._internal import (
     _encode_span_id,
@@ -63,7 +51,7 @@
         self.assertEqual(encode_spans(otel_spans), expected_encoding)
 
     @staticmethod
-    def get_exhaustive_otel_span_list() -> List[SDKSpan]:
+    def get_exhaustive_otel_span_list() -> list[SDKSpan]:
         trace_id = 0x3E0C63257DE34C926F9EFCD03927272E
 
         base_time = 683647322 * 10**9  # in ns
@@ -194,7 +182,7 @@
 
     def get_exhaustive_test_spans(
         self,
-    ) -> Tuple[List[SDKSpan], PB2ExportTraceServiceRequest]:
+    ) -> tuple[list[SDKSpan], PB2ExportTraceServiceRequest]:
         otel_spans = self.get_exhaustive_otel_span_list()
         trace_id = _encode_trace_id(otel_spans[0].context.trace_id)
         span_kind = _SPAN_KIND_MAP[SDKSpanKind.INTERNAL]

Reply via email to