PraveenJeffri
08/28/2025, 1:50 PM{
"user": "postgres",
"env": "production",
"event": "connection_start"
}
I want to transform it into a valid OTEL log format like this:
{
"resourceLogs": [
{
"scopeLogs": [
{
"logRecords": [
{
"timeUnixNano": "1666799656123456789",
"body": {
"stringValue": "connection_start"
},
"attributes": [
{
"key": "user",
"value": {
"stringValue": "postgres"
}
},
{
"key": "env",
"value": {
"stringValue": "production"
}
},
{
"key": "event",
"value": {
"stringValue": "connection_start"
}
}
]
}
]
}
]
}
]
}
Basically, I need to parse the original JSON and map those key/value pairs into the attributes array of the OTEL log record.
Is this possible using Content Modifier? Can we solve this? How can we dynamically add the data into Content Modifier, since it only accepts static data?