dd-trace-go
dd-trace-go copied to clipboard
opentracing: support for logging
Is there a plan to implement the logging functionality for span in opentracing?
func (s *Span) LogFields(fields ...log.Field) {
// TODO: implementation missing
}
We don't have a plan to do this at the moment, but we'll provide a clearer roadmap once we do. I will leave this open here in the meanwhile.
What is the status of this issue? Does this mean that should I become a user of APM and logging, I wouldn't have a nice easy link between my traces and my logs?
Actually, I am having trouble differentiating between the functionality exposed by the datadog generic client and the OpenTracing implementation. According to https://docs.datadoghq.com/tracing/advanced_usage/?tab=java#logging, logs can be attached to traces, but in the context of this support issue I am wondering if this would work with OpentTracing?
Does this mean that should I become a user of APM and logging, I wouldn't have a nice easy link between my traces and my logs?
No, that is still possible today just like in the page you've linked to in your comment. OpenTracing logs are something different: https://github.com/opentracing/specification/blob/master/semantic_conventions.md#log-fields-table
There's now a LogFields implementation, but... it seems to do something totally wrong?
https://github.com/DataDog/dd-trace-go/blob/v1.27.1/ddtrace/opentracer/span.go#L43-L64
It just sets some tags for a few of the common fields and assumes that logged messages are always error messages. 🤔
Our opentracer is in "Maintenance" mode and limited support is offered. Please consider using ddtrace/tracer directly, which can be used with an OpenTelemetry agent with the datadog collector.
For additional details, please see our OpenTelemetry documentation: https://docs.datadoghq.com/opentelemetry/ and our Support Policy: https://github.com/DataDog/dd-trace-go#support-policy
Please open a new issue if there is something else we can help with.