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

Monitoring : Prometheus client to export receiver up statues and other metrics #4

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

jdavid-oqc
Copy link
Collaborator

@jdavid-oqc jdavid-oqc commented Jul 9, 2024

Ported QCaaS backend receiver metrics exporter and modified for qat-rpc receiver with tests.
Added monitoring metrics for receiver state, executed messages count and failed messages counts.

TODO: Hardware connected and reloaded status

Resulted metrics shown below

# HELP receiver_status Measure the Receiver backend up state
# TYPE receiver_status gauge
receiver_status 1.0
# HELP failed_messages_total messages failure counter
# TYPE failed_messages_total counter
failed_messages_total 1.0
# HELP failed_messages_created messages failure counter
# TYPE failed_messages_created gauge
failed_messages_created 1.7205530562998128e+09
# HELP executed_messages_total messages executed counter
# TYPE executed_messages_total counter
executed_messages_total 1.0
# HELP executed_messages_created messages executed counter
# TYPE executed_messages_created gauge
executed_messages_created 1.7205530562998128e+09
# HELP hardware_connected_status Indicate connected status of live hardware
# TYPE hardware_connected_status gauge
hardware_connected_status 0.0
# HELP hardware_reloaded_status Indicate if hardware reload from calibration succeeded or failed
# TYPE hardware_reloaded_status gauge
hardware_reloaded_status 0.0

Copy link

github-actions bot commented Jul 9, 2024

CLA Assistant Lite bot All Contributors have signed the CLA.

@jdavid-oqc
Copy link
Collaborator Author

I have read the Contributor License Agreement and I hereby accept the Terms.

@jdavid-oqc
Copy link
Collaborator Author

recheck

github-actions bot added a commit that referenced this pull request Jul 9, 2024
@jdavid-oqc
Copy link
Collaborator Author

@keriksson-rosenqvist @jfriel-oqc can we please get approval on this PR, would like to merge it before next release.

@dharani-oqc
Copy link

dharani-oqc commented Jul 23, 2024

As discussed suggestion to reuse the classes available in 'metrics.py' , not only helps in maintaining consistency but also reduces redundancy and makes the code base easier to maintain.
We can leverage magic mocking to ensure that the number of executions and the number of failures are accurately tracked, we can simulate various various scenarios and validate that our metrics are correctly incremented.

A separate PR will be raised to address these two points, ensuring that the improvements are implemented effectively.

@jdavid-oqc jdavid-oqc merged commit 571660e into main Jul 23, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants