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

[Wavefront Output Plugin] Allow option to truncate tag value if it is too long #7447

Closed
jhua-vmware opened this issue May 1, 2020 · 3 comments · Fixed by #7503
Closed

[Wavefront Output Plugin] Allow option to truncate tag value if it is too long #7447

jhua-vmware opened this issue May 1, 2020 · 3 comments · Fixed by #7503
Assignees
Labels
area/wavefront bug unexpected problem or unintended behavior
Milestone

Comments

@jhua-vmware
Copy link

Feature Request

Allow option to truncate tag value if it is too long. So that points won't be blocked by wavefront proxy.

Proposal:

introduce a new configurable allow_truncate_tag_value (true/false)

Current behavior:

We are using [[inputs.procstat]] with cmdline_tag = true

Currently, the points with very long cmdline tag will be blocked by wavefront proxy. According to https://docs.wavefront.com/wavefront_data_format.html on pointTags, the max len(key) + len(value) is 254.

Desired behavior:

Introduce a configurable plugin parameter allow_truncate_tag_value (false by default), when it is set to true, the warefront output plugin can truncate value as:
if w.AllowTruncateTagValue && len(key)+len(val) > 254 {
val = val[:254-len(key)]
}

Use case:

We need to use cmdline tag to identify the application processes for procstat meters, and many meters are blocked due to long cmdline without this feature.

@danielnelson
Copy link
Contributor

You can do this with the strings processor and it's "left" operation as a workaround, but we should update the wavefront output to do this automatically.

cc @prydin

@danielnelson danielnelson added area/wavefront bug unexpected problem or unintended behavior labels May 1, 2020
@jhua-vmware
Copy link
Author

@danielnelson Thanks for the workaround. We are able to move forward, and at mean time, we can wait for the plugin fix in the future release.

@prydin
Copy link
Contributor

prydin commented May 6, 2020

@danielnelson Can you assign this to me? I'll have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/wavefront bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants