New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should provide an OpenTelemetry transport #1292
Comments
|
Just a note. Currently I'm extracting the traceId in the Having the traceId is enough in most cases, as that's the entrypoint of retrieving a trace in jaeger/loki. Not sure this issue belongs into pino itself. Retrieving a trace might have too much overhead. module.exports = pinoHttp({
// ...,
reqCustomProps (req) {
return {traceId: req.traceId}
}
})Together with registerInstrumentations({
instrumentations: [
new DnsInstrumentation(),
new ExpressInstrumentation(),
new GrpcInstrumentation(),
new HttpInstrumentation({
requestHook (span, req) {
req.traceId = span?.spanContext().traceId
}
}),
new IORedisInstrumentation(),
new PgInstrumentation({enhancedDatabaseReporting: true})
],
meterProvider: metrics.meterProvider,
tracerProvider: tracing.tracerProvider
}) |
|
The idea would be to receive a standard Pino generated NDJSON line and mutate it to the format described in the linked OT documentation. Adding trace/span ids is out of scope. |
|
Hi! I will take a look on this! |
|
@jhonrocha any news? |
|
Sorry, guys, I couldn't work on this yet. |


https://github.com/open-telemetry/opentelemetry-specification/blob/8e29f555b2282a3883b1b57009ad4eb11bfc5228/specification/logs/data-model.md
The text was updated successfully, but these errors were encountered: