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
Docs: Update value_extractor
usage in logs-based metrics
#14339
base: main
Are you sure you want to change the base?
Conversation
** WARNING **: This repository is generated by https://github.com/GoogleCloudPlatform/magic-modules. Any changes made directly to this repository will likely be overwritten. If you have further questions, please feel free to ping your reviewer or, internal employees, reach out to one of the engineers. Thank you! |
Summary of changes: * Added clarification that value_extractor is required for distribution logs-based metrics * Provided examples for EXTRACT(field) and REGEXP_EXTRACT(field, regex) * Clarified the arguments for value_extractor - "field" and "regex" * Mentioned the requirement of correct regular expression for the "regex" argument Highlighted the requirement of `bucket_options` and `value_extractor` for DISTRIBUTION value type logs-based metrics
37cc18a
to
2f4dab6
Compare
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.
Thanks for your contribution! This file is managed by Magic Modules, so you'll need to contribute there: https://github.com/GoogleCloudPlatform/magic-modules Instructions are in the README.
@melinath |
Hi @sahya - Unfortunately I won't be able to migrate your proposed change myself. However, I can hopefully point you in the right direction! It looks like this resource is generated using magic modules, so the documentation is all coming from this file: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/products/logging/Metric.yaml For information about how to preview the results, see our new docsite: https://googlecloudplatform.github.io/magic-modules/develop/resource/#add-documentation |
@melinath I really appreciate your help! What the thing is really very helpful. I will give it a try when I have some time. |
What
This pull request updates the usage of
value_extractor
in logs-based metrics for distribution value type. The changes include:value_extractor
is required for distribution logs-based metricsEXTRACT(field)
andREGEXP_EXTRACT(field, regex)
value_extractor
- "field" and "regex"value_extractor
andbucket_options
for DISTRIBUTION value type logs-based metricsThese changes aim to improve the understanding and usage of
value_extractor
in logs-based metrics. Kindly review and provide feedback. Thank you.Why
When defining a distribution logs-based metric today, I encountered a confusing explanation and error. It was as follows.
REGEXP_EXTRACT
.Therefore, I just create this pull request. I would be happy if this PR becomes a guide to help someone not get lost on the road about this section.
If you find any incorrect notations in the documentation, such as backquotes or double quotes, I would appreciate it if you could correct them.