File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common
opentelemetry-exporter-otlp-proto-grpc/tests Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,9 @@ def __init__(
7777 elif endpoint .scheme == "http" :
7878 port = 80
7979
80- component_type = (component_type or OtelComponentTypeValues ("unknown_otlp_exporter" )).value
80+ component_type = (
81+ component_type or OtelComponentTypeValues ("unknown_otlp_exporter" )
82+ ).value
8183 count = _component_counter [component_type ]
8284 _component_counter [component_type ] = count + 1
8385 self ._standard_attrs : dict [str , AttributeValue ] = {
Original file line number Diff line number Diff line change 6262 SpanExporter ,
6363 SpanExportResult ,
6464)
65+ from opentelemetry .semconv ._incubating .attributes .otel_attributes import (
66+ OtelComponentTypeValues ,
67+ )
6568from opentelemetry .test .mock_test_classes import IterEntryPoint
6669
6770logger = getLogger (__name__ )
@@ -83,8 +86,8 @@ def __init__(self, **kwargs):
8386 super ().__init__ (
8487 TraceServiceStub ,
8588 SpanExportResult ,
86- component_type = "test_span_exporter" ,
87- signal = "span " ,
89+ component_type = OtelComponentTypeValues . OTLP_GRPC_SPAN_EXPORTER ,
90+ signal = "traces " ,
8891 meter_provider = kwargs .pop ("meter_provider" , None ),
8992 ** kwargs ,
9093 )
@@ -706,10 +709,12 @@ def test_unavailable_reconnects(self):
706709
707710 def assert_standard_metric_attrs (self , attributes ):
708711 self .assertEqual (
709- attributes ["otel.component.type" ], "test_span_exporter "
712+ attributes ["otel.component.type" ], "otlp_grpc_span_exporter "
710713 )
711714 self .assertTrue (
712- attributes ["otel.component.name" ].startswith ("test_span_exporter/" )
715+ attributes ["otel.component.name" ].startswith (
716+ "otlp_grpc_span_exporter/"
717+ )
713718 )
714719 self .assertEqual (attributes ["server.address" ], "localhost" )
715720 self .assertEqual (attributes ["server.port" ], 4317 )
You can’t perform that action at this time.
0 commit comments