Conversation
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 01d4a6e | 408.89 ms | 451.35 ms | 42.45 ms |
| 3b96af0 | 364.39 ms | 486.10 ms | 121.72 ms |
| 461c657 | 405.82 ms | 430.92 ms | 25.10 ms |
| f4ffaaa | 395.13 ms | 479.50 ms | 84.37 ms |
| 7780810 | 442.00 ms | 507.36 ms | 65.36 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 01d4a6e | 1.65 MiB | 2.31 MiB | 677.61 KiB |
| 3b96af0 | 1.58 MiB | 2.21 MiB | 641.57 KiB |
| 461c657 | 1.65 MiB | 2.31 MiB | 677.61 KiB |
| f4ffaaa | 1.65 MiB | 2.31 MiB | 678.16 KiB |
| 7780810 | 1.58 MiB | 2.21 MiB | 641.09 KiB |
...entelemetry-core/src/main/java/io/sentry/opentelemetry/OpenTelemetryAttributesExtractor.java
Outdated
Show resolved
Hide resolved
...entelemetry-core/src/main/java/io/sentry/opentelemetry/OpenTelemetryAttributesExtractor.java
Outdated
Show resolved
Hide resolved
...entelemetry-core/src/main/java/io/sentry/opentelemetry/OpenTelemetryAttributesExtractor.java
Outdated
Show resolved
Hide resolved
...entelemetry-core/src/main/java/io/sentry/opentelemetry/OpenTelemetryAttributesExtractor.java
Outdated
Show resolved
Hide resolved
| ); | ||
|
|
||
| private final @NotNull List<String> attributeToRemoveByPrefix = | ||
| Arrays.asList("http.request.header."); |
There was a problem hiding this comment.
should we add response headers here as well?
There was a problem hiding this comment.
Would this mean that they would get removed and not sent to Sentry?
From what I see, HTTP client integrations don't usually send response headers.
There was a problem hiding this comment.
By default there's no response headers being sent with OTel but they can be enabled via OTel config.
Until now, if enabled we send them. The same was true for request headers which we now filter out in this PR.
This does however not affect other things like Sentry integrations sending headers or attributes we extracted into special places like request. For the response we currently have no extraction logic in place. We could add that in to OpenTelemetryAttributesExtractor in the future.
There was a problem hiding this comment.
Gotcha, thanks. If we filter the request headers due to Sentry's PII policies, then I'd say we should probably filter response headers by default as well.
📜 Description
Add HTTP headers in OpenTelemetry span attributes to
request.headers.No longer add headers (prefixed with
http.request.header.orhttp.response.header.) tocontexts/otel/attributes.To actually make this work, customers need to explicitly name the headers they want to see in Sentry in the OpenTelemetry config https://opentelemetry.io/docs/zero-code/java/agent/instrumentation/http/#capturing-http-request-and-response-headers
💡 Motivation and Context
Enable reporting of request headers.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps