You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current logic to check attributes' types admits the bytes in, it creates problem in the exporters that don't perform type check.
Reproducer:
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
SimpleExportSpanProcessor,
ConsoleSpanExporter,
)
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
SimpleExportSpanProcessor(ConsoleSpanExporter())
)
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("foo") as foo:
foo.set_attribute("willcrash", b"hi")
print("Hello world from OpenTelemetry Python!")
I did a quick look and it happens because bytes is a Sequence, and each element inside is an integer.
I don't know if the we should update the logic to reject that kind of attributes or update the exporters to be able to accept them.
The text was updated successfully, but these errors were encountered:
The current logic to check attributes' types admits the
bytes
in, it creates problem in the exporters that don't perform type check.Reproducer:
I did a quick look and it happens because
bytes
is aSequence
, and each element inside is an integer.I don't know if the we should update the logic to reject that kind of attributes or update the exporters to be able to accept them.
The text was updated successfully, but these errors were encountered: