Skip to content

feat: add optional prometheus metrics endpoint.#267

Open
pantierra wants to merge 2 commits into
mainfrom
feat/prometheus-metrics-endpoint
Open

feat: add optional prometheus metrics endpoint.#267
pantierra wants to merge 2 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
interval: 30s
timeout: 10s
retries: 3
start_period: 40s

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.

unrelated to PR goals

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

# 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 ?

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