-
Hello I am creating a Pino transport for OpenTelemetry. My plan was to translate the logs from Pino's format to OT Log Data model. The ideal way to send the logs line-by-line to the OTLP collector would be to use the opentelemetry-js sdk. Unfortunately, the support for logs is not yet added (it is on the roadmap). As a workaround, I opted to send the log lines to the collector using its HTTP interface (POST-ing to I reverse-engineered the model from the collector code, but it looks nothing like what's described in the aforementioned OT Data model: {
"resourceLogs": [
{
"resource": {},
"scopeLogs": [
{
"scope": {},
"logRecords": [
{
"body": {
"stringValue": "Test Pino log"
},
"observedTimeUnixNano": 1,
"severityNumber": 1,
"severityText": "TRACE",
"traceId": "5982fe77008310cc80f1da5e10147519"
}
]
}
]
}
]
} I also saw this is the format that's used in OT collector file exporter. Where can I find the specification for that data format? Can it be mapped 1-to-1 to OT Log Data model? Is there an option to make OT collector use the OT Log Data model on the HTTP endpoint instead? p.s. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
This seems like a question that would be better asked in the collector repo than the JS repo. As you mentioned we don't have support for logs yet and I don't know anything about the log format you mentioned. |
Beta Was this translation helpful? Give feedback.
-
@dyladan I see logs are on the roadmap. Is the roadmap publicly available and is there a chance we can contribute to implement this? |
Beta Was this translation helpful? Give feedback.
-
Looks like there's now experimental support for OTLP logs API https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.33.0 |
Beta Was this translation helpful? Give feedback.
This seems like a question that would be better asked in the collector repo than the JS repo. As you mentioned we don't have support for logs yet and I don't know anything about the log format you mentioned.