Skip to content

fix(flytestdlib): initialize metrics scope and expose /metrics endpoi…#7473

Open
vic-comm wants to merge 1 commit into
flyteorg:mainfrom
vic-comm:fix/v2-app-metrics-endpoint
Open

fix(flytestdlib): initialize metrics scope and expose /metrics endpoi…#7473
vic-comm wants to merge 1 commit into
flyteorg:mainfrom
vic-comm:fix/v2-app-metrics-endpoint

Conversation

@vic-comm

@vic-comm vic-comm commented Jun 4, 2026

Copy link
Copy Markdown

Resolves the missing /metrics endpoint in the v2 app framework.

Initializes sc.Scope = promutils.NewScope(a.Name) prior to calling a.Setup(...) to prevent nil pointer exceptions in standalone binaries. (Respects existing scopes if already initialized by the unified manager).

Mounts promhttp.Handler() at /metrics alongside the existing health checks.

Includes a unit test asserting scope initialization and a 200 OK from the metrics endpoint.
Fixes: #7446

@github-actions github-actions Bot added the flyte2 label Jun 4, 2026
@vic-comm vic-comm force-pushed the fix/v2-app-metrics-endpoint branch from f714356 to 06e2906 Compare June 4, 2026 16:18
…nt in v2 app framework

Signed-off-by: Victor Chidera Obiezue <obiezuechidera@gmail.com>
@vic-comm vic-comm force-pushed the fix/v2-app-metrics-endpoint branch from 06e2906 to a4df17d Compare June 4, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flyte2] Add /metrics endpoint and initialize metrics Scope in the app framework

1 participant