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

[cmd/mdatagen] Generate more mdatagen attribute documentation #8985

Merged
merged 7 commits into from
Apr 11, 2022

Conversation

dehaansa
Copy link
Contributor

Description: Improves the documentation of attributes detailed in metadata.yaml. Adds the "value" field to name so that users can see what the actual attribute value will be on metrics, and enumerates the possible values when available.

image

Link to tracking Issue: #8983

Testing: Ensured that attributes are used in the main test.

@dehaansa dehaansa changed the title Fix mdatagen attributes [cmd/mdatagen] Generate more mdatagen attribute documentation Mar 31, 2022
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dmitryax, do you want to have a look?

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@djaglowski
Copy link
Member

@dehaansa we just need a rebase to merge this.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement! Overall this looks good, just one question that doesn't need to block this PR

| Name | Description | Values |
| ---- | ----------- | ------ |
| cache_name | The name of cache. | fielddata, query |
| collector_name (name) | The name of the garbage collector. | |
Copy link
Contributor

@codeboten codeboten Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a value in the data in parentheses? It seems to either include information that is already in the attribute name in some cases. I see further down some other metric attributes names (mysql receiver) don't have the suffix, should they include it?

The question is really around consistency of the metrics being generated. I'm happy to have this answered in a separate issue though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the (name) in parentheses is the actual attribute key that will be on the metrics produced, whereas the "collector_name" is the fully unique name required to generate metadata when you have multiple possible "name" attributes for different metrics in the same scraper. When there is no potential conflict, the attributes don't need a fully unique name to represent similarly named attributes with different enums/descriptions. Does that clarify?

@jpkrohling
Copy link
Member

I'll merge while this is still green :-)

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.

5 participants