Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed May 30, 2024
1 parent a0b05f5 commit e07ea8d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions contract-tests/tests/test/amazon/botocore/botocore_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from opentelemetry.proto.common.v1.common_pb2 import AnyValue, KeyValue
from opentelemetry.proto.metrics.v1.metrics_pb2 import ExponentialHistogramDataPoint, Metric
from opentelemetry.proto.trace.v1.trace_pb2 import Span, SpanKind
from opentelemetry.proto.trace.v1.trace_pb2 import Span
from opentelemetry.semconv.trace import SpanAttributes

_logger: Logger = getLogger(__name__)
Expand Down Expand Up @@ -467,7 +467,9 @@ def _assert_aws_span_attributes(self, resource_scope_spans: List[ResourceScopeSp
for resource_scope_span in resource_scope_spans:
# pylint: disable=no-member
if resource_scope_span.span.kind in (Span.SPAN_KIND_CLIENT, Span.SPAN_KIND_PRODUCER):
self.assertEqual(resource_scope_span.span.kind, Span.SpanKind.Value('SPAN_KIND_' + kwargs.get("span_kind")))
self.assertEqual(
resource_scope_span.span.kind, Span.SpanKind.Value("SPAN_KIND_" + kwargs.get("span_kind"))
)
target_spans.append(resource_scope_span.span)
self.assertEqual(len(target_spans), 1)
self._assert_aws_attributes(
Expand Down Expand Up @@ -510,7 +512,9 @@ def _assert_semantic_conventions_span_attributes(
for resource_scope_span in resource_scope_spans:
# pylint: disable=no-member
if resource_scope_span.span.kind in (Span.SPAN_KIND_CLIENT, Span.SPAN_KIND_PRODUCER):
self.assertEqual(resource_scope_span.span.kind, Span.SpanKind.Value('SPAN_KIND_' + kwargs.get("span_kind")))
self.assertEqual(
resource_scope_span.span.kind, Span.SpanKind.Value("SPAN_KIND_" + kwargs.get("span_kind"))
)
target_spans.append(resource_scope_span.span)

self.assertEqual(len(target_spans), 1)
Expand Down

0 comments on commit e07ea8d

Please sign in to comment.