-
Notifications
You must be signed in to change notification settings - Fork 170
[aws-xray] Update SamplerRulesApplier to recognize new HTTP/URL semconv. #1959
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
Changes from 2 commits
761d996
7bb457c
9f5c983
fd8fd81
846657b
cde8df7
1649fc0
a12a706
34defcc
9b5c5ab
da01369
2c33019
3f0db10
cb9e713
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,8 @@ | |
| import io.opentelemetry.sdk.trace.samplers.Sampler; | ||
| import io.opentelemetry.sdk.trace.samplers.SamplingDecision; | ||
| import io.opentelemetry.sdk.trace.samplers.SamplingResult; | ||
| import io.opentelemetry.semconv.HttpAttributes; | ||
| import io.opentelemetry.semconv.UrlAttributes; | ||
| import java.time.Duration; | ||
| import java.util.Collections; | ||
| import java.util.Date; | ||
|
|
@@ -181,11 +183,12 @@ boolean matches(Attributes attributes, Resource resource) { | |
| String host = null; | ||
|
|
||
| for (Map.Entry<AttributeKey<?>, Object> entry : attributes.asMap().entrySet()) { | ||
| if (entry.getKey().equals(HTTP_TARGET)) { | ||
| if (entry.getKey().equals(HTTP_TARGET) || entry.getKey().equals(UrlAttributes.URL_PATH)) { | ||
| httpTarget = (String) entry.getValue(); | ||
| } else if (entry.getKey().equals(HTTP_URL)) { | ||
| } else if (entry.getKey().equals(HTTP_URL) || entry.getKey().equals(UrlAttributes.URL_FULL)) { | ||
|
||
| httpUrl = (String) entry.getValue(); | ||
| } else if (entry.getKey().equals(HTTP_METHOD)) { | ||
| } else if (entry.getKey().equals(HTTP_METHOD) | ||
| || entry.getKey().equals(HttpAttributes.HTTP_REQUEST_METHOD)) { | ||
AsakerMohd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| httpMethod = (String) entry.getValue(); | ||
| } else if (entry.getKey().equals(NET_HOST_NAME)) { | ||
AsakerMohd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| host = (String) entry.getValue(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.