elastic / apm-agent-go

https://www.elastic.co/guide/en/apm/agent/go/current/index.html
Apache License 2.0
422 stars 196 forks source link

Opentracing - Support to binary format #401

Open andrehp opened 5 years ago

andrehp commented 5 years ago

Is your feature request related to a problem? Please describe. I am trying to use the apm go agent with a project which is already instrumented for opentracing and works with Jaeger, but the project uses the binary format, that apmot doesn't support currently.

Describe the solution you'd like It would be perfect if apmot supported the opentracing binary format.

Is the binary support on the roadmap for apmot?

axw commented 5 years ago

@andrehp, thanks for raising the issue!

We are following the W3C Trace-Context proposal, which currently does not define a binary format. When there is a defined format (perhaps even in draft), we will add support to the agents.

In the mean time, you could embed the apmot Tracer implementation in a struct, and define Inject/Extract methods which add a custom binary format. This will only work if you're using Go in each of your services, or you make a similar change for other languages.

andrehp commented 5 years ago

Hi @axw , thanks for the reply.

I guess this solution of wrapping the Inject/Extract methods will work for my current case, I will try to use it, but an official solution would be greatly appreciated.

Azuka commented 5 years ago

Also adding to this: my use case has ambassador (microservice gateway) sitting behind traefik (Kubernetes ingress). Is there any way to get these to play together or would you just recommend using only the elastic apm for my inner services?

axw commented 5 years ago

Also adding to this: my use case has ambassador (microservice gateway) sitting behind traefik (Kubernetes ingress). Is there any way to get these to play together or would you just recommend using only the elastic apm for my inner services?

I'm not familiar with Ambassador, but from what I can tell it's all HTTP and based on Envoy, using Envoy's tracing capabilities. I don't think the binary format is required. As for whether you can trace at the gateway level, that's not related to this issue; I don't know the answer, but if you open a separate topic on Discuss then perhaps someone else will know.