Hacker News new | ask | show | jobs
by cratermoon 1028 days ago
Okay but can you point to some specific experience and suggest improvements?
1 comments

Try implementing an OTEL Tracer. This interface is insane, and should really just be a struct.

https://github.com/open-telemetry/opentelemetry-go/blob/trac...

how is this interface insane?

It's a list of the behaviors you need to implement if you're rolling your own OTEL Tracer Span implementation, and not using one of the multiple available.

In contrast, OpenTracing's interfaces had hardly any required methods, so you had to do a runtime type-cast to the whichever implementation you were using in order to access anything useful on the Span like the OperationName.

Why were you implementing your own tracer? Don't they publish an implementation?
Yes, all SDKs have a tracer you can just use. While you can technically create your own tracer, you're officially in Hard Mode territory - there's no highly extensible system I'm aware of that makes swapping core concepts (that already have a default) easy.