Open brettmc opened 1 year ago
PR against google/protobuf to allow formatting enums as strings for JSON output: https://github.com/protocolbuffers/protobuf/pull/12707
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Note that this has been worked around via #1192 until protobuf changes are accepted.
The otel collector currently accepts the string values of ENUMs for json-encoded payloads, but this is now prohibited and will likely be removed in a future collector release:
We currently use protobuf's
serializeToJsonString()
method to generate JSON payloads, which doesn't expose any options to represent enums as their integer values.Possible solutions:
Additional context
Protobuf Ruby seems to support FormatEnumsAsIntegers There is a partial implementation in the protobuf php extension for FormatEnumsAsIntegers, but it is not exposed via any public interfaces (and not available in the native library)
Tasks:
ProtobufSerializer
to send new flag(s)