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(parsers.xpath): Add option to skip (header) bytes #11933

Merged
merged 7 commits into from
Oct 11, 2022

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Oct 4, 2022

resolves #11661

This PR allows to skip a number of bytes before trying to unmarshal the received protocol-buffer message. This is useful when dealing with protocols wrapping the protocol-buffer message e.g. to add a header containing the message length or similar. A popular case is the GRPC protocol which sends a Length-Prefixed-Message, containing a 5-byte header.

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins labels Oct 4, 2022
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Oct 6, 2022

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.

LGTM thank you!

@powersj powersj 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 Oct 11, 2022
@MyaLongmire MyaLongmire merged commit 8ca3b92 into influxdata:master Oct 11, 2022
dba-leshop pushed a commit to dba-leshop/telegraf that referenced this pull request Oct 30, 2022
@srebhan srebhan deleted the xpath_skip_bytes branch November 7, 2022 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser 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.

Parse error using http_listener_v2 to consume Promtail Protobuf stream
3 participants