-
Notifications
You must be signed in to change notification settings - Fork 41
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
Rename metrics with a browser prefix #903
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pass the browser custom metrics to the network manager. The network manager will use these metrics instead of the built in ones. This will enable us to differentiate between k6 and browser metrics. We could just retrieve the customMetrics from the ctx too, but this feels a bit more explicit which is easier to understand.
Move from working with the builtin data_sent metric to the browser_data_sent metric. This will help split the browser module metric from the k6 metric for more fine grained observations of the data_sent metric.
ankur22
force-pushed
the
rename/883-browser-prefix-metrics
branch
from
May 23, 2023 10:18
e861722
to
a02a7ae
Compare
This commit helps us move away from the k6 http_reqs metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_reqs metrics separately.
This commit helps us move away from the k6 http_req_duration metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_req_duration metrics separately.
ankur22
force-pushed
the
rename/883-browser-prefix-metrics
branch
from
May 23, 2023 11:06
c723e34
to
78e4249
Compare
This commit helps us move away from the k6 data_received metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser data_received metrics separately.
This commit helps us move away from the k6 http_req_connecting metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_req_connecting metrics separately.
This commit helps us move away from the k6 http_req_tls_handshaking metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_req_tls_handshaking metrics separately.
This commit helps us move away from the k6 http_req_sending metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_req_sending metrics separately.
ankur22
force-pushed
the
rename/883-browser-prefix-metrics
branch
from
May 23, 2023 14:34
af47d14
to
bdb85c1
Compare
This commit helps us move away from the k6 http_req_receiving metric to a browser prefixed one. It is custom to the browser module allowing the user to measure k6 vs browser http_req_receiving metrics separately.
dgzlopes
approved these changes
May 24, 2023
ka3de
approved these changes
May 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes more sense!
LGTM.
inancgumus
approved these changes
May 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👏
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
k6 emits
http
metrics and other metrics (builtin metrics) which are useful for the user to work out how their API under test is behaving. The browser module currently works with these same metrics.While working on an issue to identify why failed metrics requests weren't being accounted for, it became apparent that there was a mismatch in the tags that were being attached to the metrics between k6 and browser. This could affect the output summary and results in user's dashboards.
This also brought to light that these metrics heavily depend on the http implementation, and so the http metrics that the browser module emits will skew the results of the http metrics that k6 emits.
The first step in mitigating such issues is to easily distinguish between the two metrics. Custom metrics (which are clones of the builtin http metrics from k6) have been added and prefixed with
browser_
. This also follows the best practices of prometheus metric naming.Closes: #883
Difference in Summary Results
NOTE:
data_received
anddata_sent
are still be printed, even though the browser module is no longer interacting with these metrics. This is a known issue and will be looked into with k6.Testing
You should be able to run any of the example tests.
Optional tasks
Tasks