-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add gateway usage #479
base: main
Are you sure you want to change the base?
Add gateway usage #479
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #479 +/- ##
==========================================
+ Coverage 81.24% 81.26% +0.02%
==========================================
Files 48 49 +1
Lines 3668 3689 +21
==========================================
+ Hits 2980 2998 +18
- Misses 606 608 +2
- Partials 82 83 +1 ☔ View full report in Codecov by Sentry. |
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.
LGTM
@@ -143,16 +143,24 @@ func unsanitizedHostnameFromAttributes(attrs pcommon.Map) (string, bool) { | |||
return "", false | |||
} | |||
|
|||
// HostFromAttributesHandler calls OnHost when a hostname is extracted from attributes. | |||
type HostFromAttributesHandler interface { |
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.
Is there a reason for defining and using a new interface here instead of only using GatewayUsage
?
|
||
import "sync" | ||
|
||
type GatewayUsage struct { |
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.
Could you add a comment describing GatewayUsage
here?
import "sync" | ||
|
||
type GatewayUsage struct { | ||
fistHostname string |
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.
firstHostname
?
What does this PR do?
This PR adds a way to know if OTEL is used in a gateway setup.
In order to do so, it checks if
datadog.host.name
was sent with two different values.See #479 for additional context.
Motivation