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

feat(publish-metrics): send metrics to prometheus on done or stats event #2340

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

Conversation

pmtkh
Copy link

@pmtkh pmtkh commented Nov 30, 2023

Description

Gives possibility to send metrics to Prometheus only summary report (on done event). This is configurable in test config using property sendMetricsAtSummary with boolean value.

Reason:
Currently metrics are send only at stats event which brings two issues:

  • you cannot define mare than one phase - not all metrics are send to Prometheus
  • summary metrics are not recalculated when send multiple metrics (based on stats event) - in Prometheus you see only latest metric send by Artillery.io.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs? I think yes, new config value for Prometheus is available
  • Does this require a changelog entry? I think yes, new feature should be marked in changelog

@CLAassistant
Copy link

CLAassistant commented Nov 30, 2023

CLA assistant check
All committers have signed the CLA.

@hassy
Copy link
Member

hassy commented Dec 6, 2023

thank you for the PR @pmtkh! I'd like to understand the use case a little bit better. publish-metrics sends metrics continuously by design, so that the progression of a load test can be tracked across time. By only sending a summary at the end you'd lose that and the granularity of metrics.

@pmtkh
Copy link
Author

pmtkh commented Dec 6, 2023

@hassy as mentioned in the description, there are two problems with gathering metrics by pushgateway which are sent across time. One is that artillery_summaries are not recalculated for whole test execution - when there are more than one metric send to pushgateway, you can see only results of the last metric send by artillery. Second is that summary metric is not send at all to the pushgateway which brings an issue in case when you want to split your test to more than on phase (sometimes there is missing last metric which normally is included into summary report).
Besides that I've prepared change which is configurable, so if someone doesn't want to use summary report but needs metrics across time this should also work. For me it is not needed, I would like to see summary report with actual results of the whole test (not only last metric).

@pmtkh
Copy link
Author

pmtkh commented Jan 2, 2024

@hassy is there any plan to merge changes prepared within this PR?

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.

3 participants