Skip to content

feat: add optional prometheus metrics endpoint.#267

Merged
pantierra merged 3 commits into
mainfrom
feat/prometheus-metrics-endpoint
Jul 23, 2026
Merged

feat: add optional prometheus metrics endpoint.#267
pantierra merged 3 commits into
mainfrom
feat/prometheus-metrics-endpoint

Conversation

@pantierra

Copy link
Copy Markdown
Contributor

@pantierra
pantierra force-pushed the feat/prometheus-metrics-endpoint branch from 0c20ecb to bdc0bc6 Compare July 22, 2026 11:36
Comment thread docker-compose.yml Outdated
Comment thread tipg/main.py
if settings.add_metrics:
from tipg.metrics import instrument_app

instrument_app(app)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pantierra I made some change to control the metrics endpoint using settings

Comment thread dockerfiles/Dockerfile
COPY pyproject.toml pyproject.toml

RUN python -m pip install . --no-cache-dir
RUN python -m pip install ".[metrics]" --no-cache-dir

@vincentsarago vincentsarago Jul 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding the optional metrics dependency in the docker image will help for eoAPI

@vincentsarago
vincentsarago self-requested a review July 22, 2026 19:06

@vincentsarago vincentsarago left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pantierra feel free to hit the merge button 🚀

Comment thread tests/conftest.py Outdated

# API config
monkeypatch.setenv("TIPG_TEMPLATE_DIRECTORY", TEMPLATE_DIRECTORY)
monkeypatch.setenv("TIPG_ADD_METRICS", "TRUE")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pantierra I think we should align this with titiler-pgstac and stac-fastapi. metrics_enabled ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Changed to ENABLE_METRICS (seems like the common variable naming).

@pantierra
pantierra force-pushed the feat/prometheus-metrics-endpoint branch from c501fd8 to 5d6a4ec Compare July 23, 2026 09:26
@pantierra
pantierra merged commit ead747e into main Jul 23, 2026
6 checks passed
@pantierra
pantierra deleted the feat/prometheus-metrics-endpoint branch July 23, 2026 09:59
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