From 621d8b2c30251a504c26418f5c0d1dd535ceb7af Mon Sep 17 00:00:00 2001 From: wasup-yash Date: Fri, 16 Aug 2024 06:32:27 +0530 Subject: [PATCH] updated for bytes Signed-off-by: wasup-yash --- .../exporter/otlp/proto/common/_internal/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py index 23bc23822c4..65f94771407 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py @@ -75,6 +75,8 @@ def _encode_value(value: Any) -> PB2AnyValue: return PB2AnyValue(int_value=value) if isinstance(value, float): return PB2AnyValue(double_value=value) + 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])