Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Conversation

@anoadragon453
Copy link
Member

The sygnal_inflight_request_limit_drop is a Counter that counts how many requests were dropped due to a pushkin hitting its concurrent request limit, and was added in #146.

A quirk of counter metrics with a label is that they will not show up in prometheus until they are initially referenced. This had the side-effect of not being able to easily monitor/alert on the metric until something actually went wrong

This PR references and sets up a instance variable with the pushkin's name as a label immediately, ensuring it appears as 0 in prometheus upon startup.

Otherwise the metric is null until a request is dropped, which may not
happen for a while (ideally never).
@clokep
Copy link
Member

clokep commented Mar 18, 2021

I think this just needs to run black .?

@clokep
Copy link
Member

clokep commented Mar 18, 2021

I think black and flake8 are fighting? :) Might want to check our synapse config for flake8 and copy it over.

@anoadragon453
Copy link
Member Author

I think black and flake8 are fighting? :) Might want to check our synapse config for flake8 and copy it over.

I'll do that in a separate PR. This one should be good to review now.

Interestingly in Synapse we disable long line checks in flake8, though black seemed perfectly happy to include a 100+ char line. So there's probably some black config somewhere (other than here?) that sets a line length limit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants