Skip to content

Get worker ID from application process #1492

Open
@lchabert

Description

Hi,

In order to get consolidated stats from django-prometheus plugins with multiple workers, the prom module need to setup files on tmp dir.
By default, it save the tmp file suffixed by the pid of the worker process.
Documented here: documentation

In the documentation, we can see a snippet of code to use the worker id instead of the pid when uwsgi is used as server.

How can we have the same behaviour with unit ?

I can't see any env variable pushed with the application worker or any channel open with unit to retrieve this kind of information.

Do you have any hints ?

Thx.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions