Skip to content

Support for attribute.ByteSlice to avoid invalid-UTF-8 issues in instrumentation #2314

Open
@vmihailenco

Description

@vmihailenco

AFAIK there are multiple issues here:

  1. exporter is disconnected on marshaling errors which may hurt performance and cause data loss
  2. protobuf rejects strings with invalid UTF-8
  3. OpenTelemetry does not validate strings
  4. OpenTelemetry does not support []byte and using attribute.String("foo", string(bytes)) looks harmless enough, but it very likely produces an invalid UTF-8 string

Assuming protobuf is not going to change current behavior, OpenTelemetry probably should have some answer to this. At least, dropping the problematic span instead of disconnecting.

PS go2sky seem to have this problem too.

Metadata

Metadata

Assignees

Labels

blocked:specificationWaiting on clarification of the OpenTelemetry specification before progress can be madebugSomething isn't workinghelp wantedExtra attention is neededpkg:attributeRelated to the attribute package

Type

No type

Projects

Status

Low priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions