feat: add optional prometheus metrics endpoint.#267
Merged
Conversation
pantierra
force-pushed
the
feat/prometheus-metrics-endpoint
branch
from
July 22, 2026 11:20
190a020 to
0c20ecb
Compare
pantierra
force-pushed
the
feat/prometheus-metrics-endpoint
branch
from
July 22, 2026 11:36
0c20ecb to
bdc0bc6
Compare
| if settings.add_metrics: | ||
| from tipg.metrics import instrument_app | ||
|
|
||
| instrument_app(app) |
Member
There was a problem hiding this comment.
@pantierra I made some change to control the metrics endpoint using settings
| COPY pyproject.toml pyproject.toml | ||
|
|
||
| RUN python -m pip install . --no-cache-dir | ||
| RUN python -m pip install ".[metrics]" --no-cache-dir |
Member
There was a problem hiding this comment.
I think adding the optional metrics dependency in the docker image will help for eoAPI
vincentsarago
self-requested a review
July 22, 2026 19:06
vincentsarago
approved these changes
Jul 22, 2026
vincentsarago
left a comment
Member
There was a problem hiding this comment.
@pantierra feel free to hit the merge button 🚀
|
|
||
| # API config | ||
| monkeypatch.setenv("TIPG_TEMPLATE_DIRECTORY", TEMPLATE_DIRECTORY) | ||
| monkeypatch.setenv("TIPG_ADD_METRICS", "TRUE") |
Member
There was a problem hiding this comment.
@pantierra I think we should align this with titiler-pgstac and stac-fastapi. metrics_enabled ?
Contributor
Author
There was a problem hiding this comment.
Agreed. Changed to ENABLE_METRICS (seems like the common variable naming).
pantierra
force-pushed
the
feat/prometheus-metrics-endpoint
branch
from
July 23, 2026 09:26
c501fd8 to
5d6a4ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to developmentseed/eoAPI#193