dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

opentracing: support for logging

Open teeratpitakrat opened this issue 7 years ago • 4 comments

Is there a plan to implement the logging functionality for span in opentracing?

func (s *Span) LogFields(fields ...log.Field) {
	// TODO: implementation missing
}

teeratpitakrat avatar Mar 17 '18 09:03 teeratpitakrat

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.

gbbr avatar Mar 19 '18 11:03 gbbr

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?

franck-schmidlin avatar Jan 18 '19 15:01 franck-schmidlin

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

gbbr avatar Jan 18 '19 16:01 gbbr

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. 🤔

ccbrown avatar Nov 24 '20 01:11 ccbrown

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.

knusbaum avatar Feb 21 '23 16:02 knusbaum