Skip to content

Commit

Permalink
Handle bytes in OTLP exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Dec 30, 2023
1 parent ed306ac commit 9648e02
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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])
Expand Down

0 comments on commit 9648e02

Please sign in to comment.