How to get the gunicorn post_work hook working men...
# support
s
Are you using it with
opentelemetry-instrument
command? If so, skip the
trace.set_tracer_provider(TracerProvider(resource=resource))
line.
u
Tried that as well. Then the last line fails:
Copy code
trace.get_tracer_provider().add_span_processor(span_processor)
s
Are you just getting the
Overriding of current TracerProvider is not allowed
? or does it also not produce any telemetry? If it’s just a message then you can ignore it.
u
It was not producing telemetry also. I'll check again.
s
You can’t use
opentelemetry-instrument
and
post_fork
hook together because both of them try to set up the telemetry pipeline so use only one of them. If you are using the latest version of opentelemetry python SDK you may not need
post_fork
at all.
u
I see. I'll drop the post_fork in that case.