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

Writing traces from current @opentelemetry/exporter-collector fails with "cannot unmarshal ID from string" #1899

Closed
tmc opened this issue Oct 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@tmc
Copy link
Contributor

tmc commented Oct 4, 2020

See open-telemetry/opentelemetry-js#1568

The payloads that the exporter are sending look like:

{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"collector-trace-exporter"}},{"key":"telemetry.sdk.language","value":{"stringValue":"nodejs"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.version","value":{"stringValue":"0.11.0"}}],"droppedAttributesCount":0},"instrumentationLibrarySpans":[{"spans":[{"traceId":"In34NtT/Ay92zZ0Akx1KYg==","spanId":"WESYaWFU+/g=","name":"foo","kind":1,"startTimeUnixNano":1601839169774235400,"endTimeUnixNano":1601839169774460700,"attributes":[{"key":"key","value":{"stringValue":"value"}}],"droppedAttributesCount":0,"events":[],"droppedEventsCount":0,"status":{"code":0},"links":[],"droppedLinksCount":0}],"instrumentationLibrary":{"name":"default","version":"*"}}]}]}

And the collector currently responds with:

{
  "code": 3,
  "message": "cannot unmarshal ID from string 'In34NtT/Ay92zZ0Akx1KYg==': encoding/hex: invalid byte: U+0049 'I'",
  "details": [
  ]
}
@bogdandrutu
Copy link
Member

I think this is because @tigrannajaryan changed the specs and implementation to use hex for IDs instead of base64

@tigrannajaryan
Copy link
Member

@tmc Collector now expects Trace ID and Span ID to be hex-encoded as it is defined in the spec: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md#request
The spec was changed a few weeks ago: open-telemetry/opentelemetry-specification#911

Closing this issue since the behavior is as expected.

@tmc
Copy link
Contributor Author

tmc commented Oct 6, 2020

Why was this change made? it seems like a departure from the protobuf json representation standard.

@tmc
Copy link
Contributor Author

tmc commented Oct 7, 2020

Can we make the unmarshalling in the collector accept either?

MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Document functional options

* Update CONTRIBUTING.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update CONTRIBUTING.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](aquasecurity/trivy-action@0.7.0...0.7.1)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this issue Jul 5, 2024
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

No branches or pull requests

3 participants