|
shim = create_tracer(otel_tracer) |
The shim's create_shim() function takes a TracerProvider, not a Tracer object.
>>> shim = create_tracer(otel_tracer)
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
shim = create_tracer(otel_tracer)
File "/home/benroot/miniconda3/envs/py13/lib/python3.13/site-packages/opentelemetry/shim/opentracing_shim/__init__.py", line 150, in create_tracer
return TracerShim(otel_tracer_provider.get_tracer(__name__, __version__))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Tracer' object has no attribute 'get_tracer'
I've seen similar code examples elsewhere with this incorrect usage.
opentelemetry-python/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py
Line 42 in e905594
The shim's
create_shim()function takes aTracerProvider, not aTracerobject.I've seen similar code examples elsewhere with this incorrect usage.