[chore] improve metrics for integration
Improve metrics for integrations, record a counter with integration_name and state
This PR expands the metrics endpoint, now exposing a counter for the combination integration_name and integration_phase. The output looks like:
curl -s localhost:8080/metrics | grep -v "# " | grep integration_phase
camel_k_integration_phase{id="hello",phase="running"} 1
camel_k_integration_phase{id="hello-1",phase="error"} 5
camel_k_integration_phase{id="hello-1",phase="running"} 2
Release Note
NONE
Fixes https://github.com/apache/camel-k/issues/5120
@squakez I included all your recommendations
@lgarciaaco please, rebase against main as we have fixed the errored check.
:warning: Unit test coverage report - coverage decreased from 37.1% to 36.9% (-0.2%)
@lgarciaaco I was about to merge but it seems there are merge conflicts could you please rebase against main? also, please, squash your commits to be a single one to have a cleaner history.
To be squashed and merged once checks pass after the rebase. Thanks.