Open dashpole opened 1 week ago
The customer is sending OTLP from a java app, and is using flogger (with jul for formatting) as logging framework.
The json in question was coming in as a string, rather than a map.
They are able to transform to a map using:
transform:
log_statements:
- context: log
statements:
# Extract everything between Str( and )
- 'set(body, ParseJSON(body))'
But then they get errors when the log doesn't have a json body.
@psx95 have you tried OTLP logging from a java app before? Do you know if there is a way to make sure the body is sent as a map instead of a string?
Alternatively, we could make our exporter attempt to parse strings as json, but that might come with a performance penalty.
No, I haven't tried OTLP logging before. I will have to look into this.
From a report on slack, this is not sent as a json payload using the googlecloud exporter for logs.