Skip to content

Attribute value 0x0 cast as integer instead of string and there is no way to specify type #373

@mb0p

Description

@mb0p

I am trying to set an attribute with a string value 0x0, however regardless of the quote configuration I use, the value of the attribute is set as an integer with the value of 0.

For example --attrs key1="0x0" or --attrs 'key1=0x0'. There just seems to be no way for the attribute value to have a string type 0x0.

I am using otel-desktop-viewer to view the trace outputs.

Example complete command otel-cli exec --tp-print --fail --verbose --attrs key1='0x0' --name "test" sleep 1

And key1 is set as a number, value 0, instead of string value 0x0.

I should also specify that I have set the following env vars

export OTEL_TRACES_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://localhost:4318/v1/traces"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions