Bluehouse-Technology / otter

Support for OpenTracing in Erlang
https://hexdocs.pm/otter/
Apache License 2.0
104 stars 17 forks source link

graceful handling of p-functions w/o start #7

Closed Licenser closed 7 years ago

Licenser commented 7 years ago

When the p-functions are called w/o the process having been initialized they can crash. it would be nicer if they'd simply be no-ops that way tracing could be completely 'disabled' by just not calling 'start' to begin with :)

cmullaparthi commented 7 years ago

I like the trick but it messes up the type specs. A better way would be to provide support for a no-op tracer, I'll look into that.

Licenser commented 7 years ago

it doesn't mess them up it changes them. The whole switchable provider thing will add performance overhead, allowing for undefined spans does not.