[extension/encoding/googlecloudlogentryencoding] accept short ALPN protocol tokens (h2, h3)#47621
Open
alliasgher wants to merge 5 commits intoopen-telemetry:mainfrom
Open
[extension/encoding/googlecloudlogentryencoding] accept short ALPN protocol tokens (h2, h3)#47621alliasgher wants to merge 5 commits intoopen-telemetry:mainfrom
alliasgher wants to merge 5 commits intoopen-telemetry:mainfrom
Conversation
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better! |
…otocol tokens handleHTTPRequestField required exactly one "/" in the protocol string, rejecting tokens like "h2" that Google Cloud Load Balancers started using for HTTP/2 in late 2024. This silently dropped affected log entries. Relax the check: if the protocol string contains no "/", store it as-is in network.protocol.name and omit network.protocol.version. If a "/" is present the existing validation (both sides must be non-empty) still applies. Fixes open-telemetry#45214 Signed-off-by: alliasgher <alliasgher123@gmail.com>
45cc538 to
c774c90
Compare
constanca-m
reviewed
Apr 18, 2026
Replace the strings.Count pre-check with a single strings.Cut call, then use strings.Contains on the version component to detect extra slashes. This avoids scanning the string twice. Signed-off-by: Ali <alliasgher123@gmail.com>
constanca-m
approved these changes
Apr 21, 2026
Contributor
constanca-m
left a comment
There was a problem hiding this comment.
Thank you @alliasgher !
Contributor
|
/workflow-approve |
Contributor
|
Please add a changelog entry @alliasgher so the PR has all approvals to get merged |
tpilewicz
reviewed
Apr 21, 2026
…okens Map the bare HTTP/2 and HTTP/3 ALPN identifiers to the canonical (name, version) pair used for the "HTTP/1.1" form so telemetry stays consistent across protocol versions. Unknown short ALPN tokens fall back to the raw value as the protocol name. Signed-off-by: Ali <alliasgher123@gmail.com>
constanca-m
approved these changes
Apr 21, 2026
Contributor
constanca-m
left a comment
There was a problem hiding this comment.
Thanks, change looks good
Contributor
|
/workflow-approve |
Signed-off-by: Ali <alliasgher123@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #45214. handleHTTPRequestField required exactly one "/" in the protocol string, rejecting "h2" and similar short ALPN tokens that GCP Load Balancers send for HTTP/2. Relax the validation: strings without "/" are stored as the protocol name with no version attribute.