(no title)
Cwizard | 1 year ago
And reading this it seems a lot of people agree. Hope that can be fixed at some point. Tracing should be simple.
See for example this project: https://github.com/jmorrell/minimal-nodejs-otel-tracer
I think it is more a POC but it shows that all this complexity is not needed IMO.
phillipcarter|1 year ago
In Go, currently it is a deliberate choice to be both very granular and specific, so that end-users can ultimately depend on only the exact packages they need and have nothing standing between them and any customization of the SDK they need to do for their organizations.
There's some ways to isolate this kind of setup, which we document like so: https://opentelemetry.io/docs/languages/go/getting-started/#...
Stuff that into an otel.go file and then the rest of your code is usually pretty okay. From there your application code usually looks like this:
https://gist.github.com/cartermp/f37b6702109bbd7401be8a1cab8...
The main thing people sometimes struggle with at this point is threading context through all their calls if they haven't done that yet. It's annoying, but unfortunately running into a limitation of the Go language here. Most of the other languages (Java, .NET, Ruby, etc.) keep context implicitly available for you at all times because the languages provide that affordance.