Add more detailed telemetry for get_audience
This is still slow in some cases, despite #2723, so this information should give useful data about how it could be optimized more. This also adds some abstraction around getting the tracer, just to follow the advice in the OpenTelemetry documentation not to use __name__ directly to set the tracer name. The advice is ignored in most of their examples, so it probably doesn't matter, but IDK, seems reasonable to try to follow it. Related: #2720
This commit is contained in:
parent
ef64fedbd9
commit
7efbdb1865
2 changed files with 14 additions and 1 deletions
|
@ -29,3 +29,7 @@ def instrumentCelery():
|
|||
@worker_process_init.connect(weak=False)
|
||||
def init_celery_tracing(*args, **kwargs):
|
||||
CeleryInstrumentor().instrument()
|
||||
|
||||
|
||||
def tracer():
|
||||
return trace.get_tracer(__name__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue