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

Document the metadata column in the CSV output #925

Open
immavalls opened this issue Dec 1, 2022 · 7 comments
Open

Document the metadata column in the CSV output #925

immavalls opened this issue Dec 1, 2022 · 7 comments
Assignees
Labels
Area: OSS Content Improvements or additions to community/oss documentation Tech Writers Issues that a writer could help with

Comments

@immavalls
Copy link
Contributor

In the docs we have the output columns as below:

metric_name,timestamp,metric_value,check,error,error_code,group,method,name,proto,scenario,status,subproto,tls_version,url,extra_tags
http_reqs,1595325560,1.000000,,,,,GET,http://test.k6.io,HTTP/1.1,default,200,,,http://test.k6.io,

Currently, the output is adding a metadata column:

metric_name,timestamp,metric_value,check,error,error_code,expected_response,group,method,name,proto,scenario,service,status,subproto,tls_version,url,extra_tags,metadata
http_reqs,1669309480,1.000000,,,,true,,POST,https://httpbin.test.k6.io/post,HTTP/1.1,default,,200,,tls1.3,https://httpbin.test.k6.io/post,,

We should change the example and also review where the fieldNames are documented. Is it under metrics? I am not finding the metadata field in the docs. Could this be the metadata in the requests?

Decide if it's worth documenting the output columns as in k6-learn.

And also review the JSON and other outputs to see if it's clear. Or we can document the columns in general for "all" the outputs.

@immavalls immavalls added Area: OSS Content Improvements or additions to community/oss documentation Tech Writers Issues that a writer could help with labels Dec 1, 2022
@immavalls immavalls self-assigned this Jan 24, 2023
@immavalls
Copy link
Contributor Author

This was probably introduced with the v0.41.0 release , grafana/k6#2726. Based on the release notes. Not sure if we want to document or reference it. Or simply change the example in the docs to add this column.

Internal support for high-cardinality metrics metadata (grafana/k6#2726, grafana/k6#2727)

As described in the previous section, the efficient grouping of metric samples into time series works well for relatively low-cardinality data. However, k6 needed some way to attach high-cardinality metadata as well. This is necessary for data that's unique or random, such as Trace and Span IDs in distributed tracing or user IDs in tests with huge data sets.

k6 v0.41.0 has added support for attaching high-cardinality metadata to metric samples, and the vu and iter system tags have been transformed into such metadata (see the breaking changes section above), but it is not yet accessible from user scripts. There is no JavaScript API to modify this metadata, only built-in k6 Go modules and xk6 Go extensions can make use of it, for now.

@immavalls
Copy link
Contributor Author

If we take the CSV headers metric_name,timestamp,metric_value,check,error,error_code,group,method,name,proto,scenario,status,subproto,tls_version,url,extra_tags,metadata, the docs point to metrics and error codes.

I'd like to see all the headers clearly documented, either pointing to the corresponding metric or explaining what we'll find there (proto is the protocol? subproto, extra_tags are the custom tags?...). What to expect for each output: https://k6.io/docs/results-output/real-time/.

We could convert this issue to better document what to expect when writing to files vs streaming. At least for the outputs maintained in the core. What do you think @MattDodsonEnglish ?

@MattDodsonEnglish
Copy link
Contributor

I think it's a great Idea to add tabbed references for the major OSs here. 👍 . Especially since it's an introductory doc.

@immavalls
Copy link
Contributor Author

Thank! Is this comment maybe for #1078 @MattDodsonEnglish ?

@MattDodsonEnglish
Copy link
Contributor

Haha, yes 🤦 .

I need to be a little slower in going through my issues

@MattDodsonEnglish
Copy link
Contributor

🤦

@immavalls
Copy link
Contributor Author

Do you plan to create a new issue for this @MattDodsonEnglish

We could convert this issue to better document what to expect when writing to files vs streaming. At least for the outputs maintained in the core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OSS Content Improvements or additions to community/oss documentation Tech Writers Issues that a writer could help with
Projects
None yet
Development

No branches or pull requests

2 participants