We should use .instrument(tracer_provider=tracer_provider) in our examples, instead of trace_api.set_tracer_provider(tracer_provider) because users may be working in a (production) system where there's an already an incumbent OTEL tracer provider (and exporter). This results in confusion because our instrumentor won't get the proper exporter and nothing gets exported.
We should use
.instrument(tracer_provider=tracer_provider)
in our examples, instead oftrace_api.set_tracer_provider(tracer_provider)
because users may be working in a (production) system where there's an already an incumbent OTEL tracer provider (and exporter). This results in confusion because our instrumentor won't get the proper exporter and nothing gets exported.