Provide a context to the NewLoader function, and support a WithTracing config.
This allows more granular tracing of the loader internals.
Open questions:
what is the best way to conditionally run tracing (go pattern)? I could put span start/ends behind a flag conditional on the presence of a tracer in the loader config, but this seems clunky.
where is the best place to provide a name for the span?
what is the best way to write tests for this? i've just been using a simple sandbox test that creates a dummy loader with associated spans for Jaeger, but that is part of repo.
Provide a context to the
NewLoader
function, and support aWithTracing
config. This allows more granular tracing of the loader internals.Open questions: