Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter-zipkin 1.1.0] otel.dropped_attributes_count - 400: json: cannot unmarshal number into Go struct field .tags of type string #1404

Closed
tomasjanda opened this issue Oct 15, 2024 · 0 comments · Fixed by #1406
Labels
bug Something isn't working

Comments

@tomasjanda
Copy link

tomasjanda commented Oct 15, 2024

Hello, i am using zipkin exporter in version 1.1.0 and opentelemetry-collector with zipkin receiver and i got 400 - Bad request when tags cointains otel.dropped_attributes_count attribute formattes as number, not string.

Here is correct comment in source code:

// Zipkin tags must be strings, but opentelemetry
// accepts strings, booleans, numbers, and lists of each.

but when library sets custom tag otel.dropped_attributes_count, there is not casting to string

Collector settings

receivers:
  zipkin:
    endpoint: 0.0.0.0:9411

processors:
  batch:
    send_batch_max_size: 10485760
    send_batch_size: 1048576
    timeout: 5s

exporters:
  otlphttp:
    endpoint: ${env:OTELCOL_EXPORTER}
    tls:
      insecure: true

service:
  pipelines:
    traces:
      receivers: [zipkin]
      processors: [batch]
      exporters: [otlphttp]

Generated payload

[
    {
        "id": "5a19611a37ba40c4",
        "traceId": "03f6f604f59e0ec4cf39931e87e0db2e",
        "localEndpoint": {
            "serviceName": "api.cv1-core"
        },
        "name": "mdw PERMISSIONS",
        "timestamp": 1729012528523110,
        "duration": 257155,
        "tags": {
            "otel.status_code": "Ok",
            "permission.context": "ADMINISTRATOR",
            "permission.ignoreBlockedService": "false",
            "user.clientId": "test_client",
            "user.clientRole": "ADMINISTRATOR",
            "user.clientScopes": "administrator",
            "service.name": "api.cv1-core",
            "service.version": "unknown",
            "deployment.environment.name": "develop",
            "service.instance.id": "local",
            "otel.dropped_attributes_count": 1
        },
        "parentId": "e2d7b2cdac905f5f",
        "otel.scope.name": "api.cv1-core",
        "annotations": [
            {
                "timestamp": 1729012528523121,
                "value": "\"Call user-management to resolve admin role\""
            },
            {
                "timestamp": 1729012528780249,
                "value": "\"User management response\""
            }
        ]
    }
]

Response

400 Bad Request
json: cannot unmarshal number into Go struct field .tags of type string↵
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant