-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add resource_type tag #4140
Add resource_type tag #4140
Conversation
@@ -180,6 +180,7 @@ func (m *NetworkManager) emitRequestMetrics(req *Request) { | |||
if state.Options.SystemTags.Has(k6metrics.TagURL) { | |||
tags = handleURLTag(m.mi, req.URL(), req.method, tags) | |||
} | |||
tags = tags.With("resource_type", req.ResourceType()) |
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.
There are two things that I'm not sure of:
- This isn't a system tag, but should it be?
- This list can change at a moments notice by the chrome team, should we map them from the chrome ResourceType to a k6 version of it. We would be able to detect if we stop matching on any of the types and log a warning, plus create a unit test to catch this as early as possible.
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.
We would be able to detect if we stop matching on any of the types and log a warning, plus create a unit test to catch this as early as possible.
This sounds like the way to go! 👍🏻
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've added a way to validate the ResourceTypes.
dafc212
to
0f7b08a
Compare
A new resource_type tag is being added to allow users to view and filter metrics based on the chrome resource_types.
It's a duplicate of CDP's network.ResourceType.
0f7b08a
to
a573f2c
Compare
What?
A new
resource_type
tag is being added to allow users to view and filter metrics based on the chrome resource types, which are currently defined as:Checklist
make lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)
Linked: grafana/xk6-browser#1551