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

Duplicate prometheus metrics when testing/importing hermes, hermes2 #3977

Closed
bziemons opened this issue Sep 2, 2020 · 0 comments · Fixed by #3991
Closed

Duplicate prometheus metrics when testing/importing hermes, hermes2 #3977

bziemons opened this issue Sep 2, 2020 · 0 comments · Fixed by #3991
Assignees
Milestone

Comments

@bziemons
Copy link
Member

bziemons commented Sep 2, 2020

Motivation

Importing hermes and hermes2 at the same time now fails in testing, because the prometheus metrics are named the same and are initialized on module import.

The error is:

ValueError: Duplicated timeseries in CollectorRegistry: set(['rucio_daemons_hermes_reconnect_total', 'rucio_daemons_hermes_reconnect_created'])

which is caused on this line:

RECONNECT_COUNTER = Counter('rucio_daemons_hermes_reconnect', 'Counts Hermes reconnects to different ActiveMQ brokers', labelnames=('host',))

See the checks on PR #3947

Modification

Move initialization to the run Method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants