8000 Attribute value `0x0` cast as integer instead of string and there is no way to specify type · Issue #373 · equinix-labs/otel-cli · GitHub
[go: up one dir, main page]

Skip to content

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

Open

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"

Activity

  1. changed the title [-]Some attribute values are cast as integers instead of strings and there is no way to specify type[/-] [+]Attribute value `0x0` cast as integer instead of string and there is no way to specify type[/+] on Apr 17, 2025
  2. tobert commented on Apr 21, 2025

    @tobert
    Contributor

    This is probably because I have some automatic type coersion happening. I'm starting to pick up maintenance on a fork at https://github.com/tobert/otel-cli could you please submit the request there? Otherwise I'll try to get back here and look at this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0