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

feat(inputs.gnmi): Add option to create more descriptive tags #15278

Merged
merged 2 commits into from
May 3, 2024

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented May 2, 2024

Summary

While investigating an issue report I noticed that paths with multiple keys like

/openconfig-platform:components/component[name="LM-1"]/subcomponents/subcomponent[name="PORT-1-1"]/name

produce very bulky and undescriptive tags like /openconfig-platform:components/component/subcomponents/subcomponent/name=PORT-1-1,name=LM-1 because key-keys are usually named name.

The new prefix_tag_key_with_path would produce more descriptive tags component_name=LM-1,subcomponent_name=PORT-1-1 by prefixing the key with the path segment containing the key.

Checklist

  • No AI generated code was used in this PR

Related issues

@telegraf-tiger telegraf-tiger bot added area/gnmi feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 2, 2024
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label May 3, 2024
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks! Out of curiosity, do we need the full 28k line JSON file or could a more limited version be used?

@powersj powersj removed their assignment May 3, 2024
@srebhan
Copy link
Member Author

srebhan commented May 3, 2024

Not necessarily. Should I shorten it?

@powersj
Copy link
Contributor

powersj commented May 3, 2024

Not necessarily. Should I shorten it?

If it isn't straight forward, then we can keep as-is.

@srebhan
Copy link
Member Author

srebhan commented May 3, 2024

@powersj shortened to ~1k lines...

@powersj
Copy link
Contributor

powersj commented May 3, 2024

Fantastic, thank you very much!

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented May 3, 2024

@DStrand1 DStrand1 merged commit 7966827 into influxdata:master May 3, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gnmi feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants