You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing my own collector using the structs from opentelemetry-proto crate, and observed that requests from opentelemetry-js in JSON format cannot be deserialized using serde because they use a number instead of a string in the intValue field of AnyValue.
invalid type: integer `5893`, expected a string at line 1 column 1216
One affected field is resourceSpans::scopeSpans::spans::attributes::key == 'http.response_content_length'
What happened?
I'm writing my own collector using the structs from opentelemetry-proto crate, and observed that requests from opentelemetry-js in JSON format cannot be deserialized using serde because they use a number instead of a string in the
intValue
field ofAnyValue
.One affected field is
resourceSpans::scopeSpans::spans::attributes::key == 'http.response_content_length'
The deserialization from string happens here: https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-proto/src/proto.rs#L106
The JSON Mapping guide from protobuf says that int64 should be encoded as a string, but either numbers or strings are accepted..
API Version
opentelemetry-proto 0.6.0
SDK Version
N/A
What Exporter(s) are you seeing the problem on?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: