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

Add prometheus metrics #527

Merged
merged 4 commits into from
Nov 18, 2022
Merged

Add prometheus metrics #527

merged 4 commits into from
Nov 18, 2022

Conversation

erikjohnston
Copy link
Member

This now makes prometheus dependency mandatory. It adds two metrics:

  1. Received request rate by servlet
  2. Number of emails sent

@erikjohnston erikjohnston requested a review from a team as a code owner November 18, 2022 11:00
@erikjohnston
Copy link
Member Author

Mypy is failing on sydent/sydent.py:200: error: Call to untyped function (unknown) in typed context [no-untyped-call], which is:

prometheus_client.start_http_server(

I'm not entirely sure what to do about this.

@DMRobertson
Copy link
Contributor

Mypy is failing on sydent/sydent.py:200: error: Call to untyped function (unknown) in typed context [no-untyped-call], which is:

prometheus_client.start_http_server(

I'm not entirely sure what to do about this.

This is on me: I made sydent enforce mypy --strict/ Options:

  • # type: ignore
  • change mypy config to allow untyped calls
  • write stubs for prometheus_client by hand
  • try installing a stub package
  • try bumping the package to see if it includes type hints

Sounds like the last option sufficed

sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
@erikjohnston
Copy link
Member Author

Thank you!

@erikjohnston erikjohnston merged commit 3c05e11 into main Nov 18, 2022
@erikjohnston erikjohnston deleted the erikj/prometheus branch November 18, 2022 15:26
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.

3 participants