Skip to content

Instantly share code, notes, and snippets.

@sfc-gh-jopel
Last active November 22, 2024 00:41
Show Gist options
  • Save sfc-gh-jopel/b99a506acb43ebf5ef0f9ffefd87bc7c to your computer and use it in GitHub Desktop.
Save sfc-gh-jopel/b99a506acb43ebf5ef0f9ffefd87bc7c to your computer and use it in GitHub Desktop.
Diff between internalized and original opentelemetry-exporter-otlp-proto-common tags/v1.26.0 code
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/__init__.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/__init__.py
index 2d336ae..dffaa32 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/__init__.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/__init__.py
@@ -13,6 +13,6 @@
# limitations under the License.
-from opentelemetry.exporter.otlp.proto.common.version import __version__
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common.version import __version__
__all__ = ["__version__"]
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
index 23bc238..fe1c776 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
@@ -28,18 +28,18 @@ from typing import (
)
from opentelemetry.sdk.util.instrumentation import InstrumentationScope
-from opentelemetry.proto.common.v1.common_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import (
InstrumentationScope as PB2InstrumentationScope,
)
-from opentelemetry.proto.resource.v1.resource_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.resource.v1.resource_marshaler import (
Resource as PB2Resource,
)
-from opentelemetry.proto.common.v1.common_pb2 import AnyValue as PB2AnyValue
-from opentelemetry.proto.common.v1.common_pb2 import KeyValue as PB2KeyValue
-from opentelemetry.proto.common.v1.common_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import AnyValue as PB2AnyValue
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import KeyValue as PB2KeyValue
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import (
KeyValueList as PB2KeyValueList,
)
-from opentelemetry.proto.common.v1.common_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import (
ArrayValue as PB2ArrayValue,
)
from opentelemetry.sdk.trace import Resource
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
index 47ff0cf..916d5d6 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
@@ -14,7 +14,7 @@
from collections import defaultdict
from typing import Sequence, List
-from opentelemetry.exporter.otlp.proto.common._internal import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal import (
_encode_instrumentation_scope,
_encode_resource,
_encode_span_id,
@@ -22,14 +22,14 @@ from opentelemetry.exporter.otlp.proto.common._internal import (
_encode_value,
_encode_attributes,
)
-from opentelemetry.proto.collector.logs.v1.logs_service_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.collector.logs.v1.logs_service_marshaler import (
ExportLogsServiceRequest,
)
-from opentelemetry.proto.logs.v1.logs_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.logs.v1.logs_marshaler import (
ScopeLogs,
ResourceLogs,
)
-from opentelemetry.proto.logs.v1.logs_pb2 import LogRecord as PB2LogRecord
+from snowflake.telemetry._internal.opentelemetry.proto.logs.v1.logs_marshaler import LogRecord as PB2LogRecord
from opentelemetry.sdk._logs import LogData
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
index 0d66fd2..5620f17 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
@@ -26,7 +26,7 @@ from opentelemetry.sdk.metrics import (
ObservableUpDownCounter,
UpDownCounter,
)
-from opentelemetry.exporter.otlp.proto.common._internal import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal import (
_encode_attributes,
)
from opentelemetry.sdk.environment_variables import (
@@ -35,11 +35,11 @@ from opentelemetry.sdk.environment_variables import (
from opentelemetry.sdk.metrics.export import (
AggregationTemporality,
)
-from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.collector.metrics.v1.metrics_service_marshaler import (
ExportMetricsServiceRequest,
)
-from opentelemetry.proto.common.v1.common_pb2 import InstrumentationScope
-from opentelemetry.proto.metrics.v1 import metrics_pb2 as pb2
+from snowflake.telemetry._internal.opentelemetry.proto.common.v1.common_marshaler import InstrumentationScope
+from snowflake.telemetry._internal.opentelemetry.proto.metrics.v1 import metrics_marshaler as pb2
from opentelemetry.sdk.metrics.export import (
MetricsData,
Gauge,
@@ -48,7 +48,7 @@ from opentelemetry.sdk.metrics.export import (
ExponentialHistogram as ExponentialHistogramType,
)
from typing import Dict
-from opentelemetry.proto.resource.v1.resource_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.resource.v1.resource_marshaler import (
Resource as PB2Resource,
)
from opentelemetry.sdk.environment_variables import (
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
index 97cf608..8243860 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py
@@ -16,23 +16,23 @@ import logging
from collections import defaultdict
from typing import List, Optional, Sequence
-from opentelemetry.exporter.otlp.proto.common._internal import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal import (
_encode_attributes,
_encode_instrumentation_scope,
_encode_resource,
_encode_span_id,
_encode_trace_id,
)
-from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.collector.trace.v1.trace_service_marshaler import (
ExportTraceServiceRequest as PB2ExportTraceServiceRequest,
)
-from opentelemetry.proto.trace.v1.trace_pb2 import (
+from snowflake.telemetry._internal.opentelemetry.proto.trace.v1.trace_marshaler import (
ResourceSpans as PB2ResourceSpans,
)
-from opentelemetry.proto.trace.v1.trace_pb2 import ScopeSpans as PB2ScopeSpans
-from opentelemetry.proto.trace.v1.trace_pb2 import Span as PB2SPan
-from opentelemetry.proto.trace.v1.trace_pb2 import SpanFlags as PB2SpanFlags
-from opentelemetry.proto.trace.v1.trace_pb2 import Status as PB2Status
+from snowflake.telemetry._internal.opentelemetry.proto.trace.v1.trace_marshaler import ScopeSpans as PB2ScopeSpans
+from snowflake.telemetry._internal.opentelemetry.proto.trace.v1.trace_marshaler import Span as PB2SPan
+from snowflake.telemetry._internal.opentelemetry.proto.trace.v1.trace_marshaler import SpanFlags as PB2SpanFlags
+from snowflake.telemetry._internal.opentelemetry.proto.trace.v1.trace_marshaler import Status as PB2Status
from opentelemetry.sdk.trace import Event, ReadableSpan
from opentelemetry.trace import Link, SpanKind
from opentelemetry.trace.span import SpanContext, Status, TraceState
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
index f34ff82..4e761cd 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/_log_encoder.py
@@ -13,7 +13,7 @@
# limitations under the License.
-from opentelemetry.exporter.otlp.proto.common._internal._log_encoder import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal._log_encoder import (
encode_logs,
)
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
index 14f8fc3..a8425de 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/metrics_encoder.py
@@ -13,7 +13,7 @@
# limitations under the License.
-from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
encode_metrics,
)
diff --git a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
index 2af5765..d5896eb 100644
--- a/tmp/opentelemetry-python/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
+++ b/src/snowflake/telemetry/_internal/opentelemetry/exporter/otlp/proto/common/trace_encoder.py
@@ -13,7 +13,7 @@
# limitations under the License.
-from opentelemetry.exporter.otlp.proto.common._internal.trace_encoder import (
+from snowflake.telemetry._internal.opentelemetry.exporter.otlp.proto.common._internal.trace_encoder import (
encode_spans,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment