Skip to content

http: bind output_http_requests_total counter lifecycle to worker's #180

Merged
alltilla merged 2 commits intoaxoflow:mainfrom
alltilla:http-request-metrics-fix
Jul 2, 2024
Merged

http: bind output_http_requests_total counter lifecycle to worker's #180
alltilla merged 2 commits intoaxoflow:mainfrom
alltilla:http-request-metrics-fix

Conversation

@alltilla
Copy link
Member

@alltilla alltilla commented Jun 26, 2024

We do not show the orphaned metrics in the prometheus stats output. Registering, incrementing then unregistering the counter makes it orphaned.

This can be solved with binding the lifecycle of the counters to the worker.

No news file entry is needed, the counters disappeared after 4.7 was released.

Signed-off-by: Attila Szakacs [email protected]

@alltilla alltilla requested review from MrAnno and bshifter June 26, 2024 14:15
alltilla added 2 commits June 27, 2024 14:51
The metrics TLS cache binds the lifecycle of the
counters to the lifecycle of the thread, which is
the same as the process's.

There are cases where a cache like this is useful,
but we want to bind the lifecycle of the counters
to a different entity, like a HTTP worker.

Signed-off-by: Attila Szakacs <[email protected]>
We do not show the orphaned metrics in the
prometheus stats output. Registering, incrementing
then unregistering the counter makes it orphaned.

This can be solved with binding the lifecycle of
the counters to the worker.

Signed-off-by: Attila Szakacs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants