lightstep / lightstep-tracer-go

The Lightstep distributed tracing library for Go
https://lightstep.com
MIT License
98 stars 54 forks source link

Allow `NewTracer` to return error. #226

Closed bwplotka closed 4 years ago

bwplotka commented 4 years ago

Hi :wave:

Any particular reason why there is no proper error handling for NewTracer constructor?

I would vote for extending return arg and add err (:

https://github.com/lightstep/lightstep-tracer-go/blob/HEAD/tracer.go#L88

jmacd commented 4 years ago

This will require a major version bump. We could rename the existing method MustNewTracer() and panic instead of error. I'd prefer to just add a new method like NewTracerChecked(), given that we're putting a lot of effort into the OTel libraries, at this point.

bwplotka commented 4 years ago

Oh yea, it definitely can be a separate constructor. Happy to contribute.

jmacd commented 4 years ago

We would be glad to accept a pull request for this. Thanks!