-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix missing gRPC/HTTP2 events #867
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 79.86% 78.16% -1.70%
==========================================
Files 117 120 +3
Lines 8054 8486 +432
==========================================
+ Hits 6432 6633 +201
- Misses 1217 1410 +193
- Partials 405 443 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,525 @@ | |||
// Copyright 2014 The Go Authors. All rights reserved. |
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.
Why copying the code instead of just doing:
import "golang.org/x/net/http2/hpack"
?
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.
I had to vendor it because it was failing on unknown fields. We want to ignore the unknown so that we can continue parsing until we find :method
and :path
.
The test for these missing metrics is involved, so I'm going to split this work in another PR. |
This PR adds the ability to parse gRPC/HTTP2 events even if we missed the original connection event. Namely Beyla can start after the applications sends the
PRI * HTTP/2.0
event and we will fail to register the http2 connection metadata. In this event Beyla will capture an unclassified TCP event.We add a HTTP2/gRPC detector to the unclassified events and use a channel to add the missing metadata in the eBPF maps. Subsequent streams will see the metadata and correctly report the gRPC events.