Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of the box support for uWSGI #675

Open
owais opened this issue Sep 10, 2021 · 5 comments
Open

Out of the box support for uWSGI #675

owais opened this issue Sep 10, 2021 · 5 comments

Comments

@owais
Copy link
Contributor

owais commented Sep 10, 2021

Setting up OpenTelemetry needs additional manual steps when working with uWSGI as documented here: https://opentelemetry-python.readthedocs.io/en/latest/examples/fork-process-model/README.html#uwsgi-postfork-decorator

This should not be required if a user is invokes the opentelemetry-instrument command to auto-instrument their uWSGI based service.

Hint: pre instrumentation hook might be helpful to implement this.

@imadmoussa1
Copy link

this support only works for Tracing. Do we have any support for metrics ?
Any suggestion how to add it for metrics ?

@srikanthccv
Copy link
Member

Did you move the meterprovider, reader, and exporter setup to postfork hook?

@srikanthccv
Copy link
Member

You need to have some hook init_metrics setup similar to the init_tracing and set up the metrics pipeline there, and it should work.

@imadmoussa1
Copy link

yes, this solution worked

@imadmoussa1
Copy link

The solution is working fine , but I noticed that it's missing the http_target from the data in Prometheus.
This all the field I have for for http_server_duration_count : http_server_name, http_method, http_status_code, http_scheme, job, net_host_port, instance, http_flavor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants