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

prometheus metrics for server mode #853

Open
sbrunato opened this issue Sep 29, 2023 · 3 comments · May be fixed by #944
Open

prometheus metrics for server mode #853

sbrunato opened this issue Sep 29, 2023 · 3 comments · May be fixed by #944
Assignees
Labels
dedl DEDL related enhancement New feature or request server Server-mode related
Projects

Comments

@sbrunato
Copy link
Collaborator

sbrunato commented Sep 29, 2023

Implement prometheus metrics for server mode

Should be configurable as needed only in containers.

measure data downloaded from each provider
measure product types searched ?

check https://github.com/trallnag/prometheus-fastapi-instrumentator

@sbrunato sbrunato added enhancement New feature or request server Server-mode related labels Sep 29, 2023
@sbrunato sbrunato added this to Needs Triage in eodag.* via automation Sep 29, 2023
@sbrunato sbrunato moved this from Needs Triage to priority::1 in eodag.* Sep 29, 2023
@alambare-csgroup
Copy link
Collaborator

additional suggested measures:

  • count of available providers
  • count of available product types

@alambare-csgroup
Copy link
Collaborator

Metrics should be OpenTelemetry as it's more general and the new standard way of doing things.

@dalpasso dalpasso self-assigned this Nov 16, 2023
@alambare-csgroup alambare-csgroup added the dedl DEDL related label Nov 16, 2023
@dalpasso dalpasso linked a pull request Nov 30, 2023 that will close this issue
@dalpasso
Copy link
Collaborator

dalpasso commented Jan 11, 2024

Metrics are implemented with OpenTelemetriy automatic instrumentation (https://opentelemetry.io/docs/instrumentation/python/automatic/).

TODO:

  • Compare with https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CONTRIBUTING.md#guideline-for-instrumentations
  • Handle exceptions raised in the metric's code. Write a log message with the error.
  • Add test.
  • Cleanup of the code. For example, _instrument_search and _instrument_download used to be independent of each other (you could call _instrument_search without calling _instrument_download) but this is not the case anymore. This is not clear for the code and it should be rewritten.
  • Fix EODAGInstrumentor_uninstrument. The callback functions continue to be called after calling _uninstrument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dedl DEDL related enhancement New feature or request server Server-mode related
Projects
No open projects
eodag.*
  
priority::1
Development

Successfully merging a pull request may close this issue.

4 participants