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

Make Orchestrator metrics singleton #1301

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eero-t
Copy link
Contributor

@eero-t eero-t commented Feb 18, 2025

Description

Make Orchestrator metrics singleton, so that even if applications instantiate multiple Orchestrators, "megaservice_*" metrics collect data from all of them.

This is intended as proper fix for the #1280 workaround. When only CI tests created multiple Orchestrator instances, changing metric prefix was fine, but now that applications (e.g. DocSum) do that too, that's not the case any more.

(Another option would be to add arguments for passing Orchestrator instance names as metric prefixes, to name and differentiate metrics for each Orchestrator instance. However, that would have needed changes in 4 OPEA projects instead of just this one, and dashboards & benchmarks would then need to hard-code those per-application prefixes.)

Issues

Adding Orchestrator instances to applications changes their metric names, depending on in which order those instances are created, and it distorts the whole application metric values. This breaks dashboards and benchmarks relying on those metric names.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Dependencies

n/a.

Tests

So far, only CI. Keeping as draft until I have time to test this properly.

@eero-t eero-t marked this pull request as draft February 18, 2025 14:24
So that even if applications instantiate multiple Orchestrators,
"megaservice_*" metrics collect data from all of them.

Another option would be to add arguments for passing Orchestrator
instance names as metric prefixes, to name and differentiate metrics
for each Orchestrator instance.

However, that would have needed changes in 3 OPEA projects instead of
just this one, and dashboards would then need to hard-code those
per-application prefixes.

Signed-off-by: Eero Tamminen <[email protected]>
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
comps/cores/mega/orchestrator.py 91.73% <100.00%> (+0.52%) ⬆️

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.

1 participant