Skip to content

RUM-14784: Network headers common instrumentation#3338

Merged
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-14784/network-headers-common-instrumentation
Apr 29, 2026
Merged

RUM-14784: Network headers common instrumentation#3338
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-14784/network-headers-common-instrumentation

Conversation

@kikoveiga
Copy link
Copy Markdown
Contributor

@kikoveiga kikoveiga commented Apr 6, 2026

What does this PR do?

  • Add trackResourceHeaders api in RumNetworkInstrumentationConfiguration.
  • Create ResourceHeadersExtractor#toResourceAttributes for better logic encapsulation and some cleanup.
  • Instrument both Sample App's okHttpClient and CronetEngine, both tested and working well.

Example Cronet resource with headers from the sample app here

Motivation

We want to support tracking resource headers for all network libraries (OkHttp & Cronet), configured with the new instrumentation coming in #3180.

This is the Part 2 of this feature, after instrumenting for OkHttp in DatadogInterceptor #3204.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch 5 times, most recently from 4038042 to 6d8c018 Compare April 6, 2026 14:49
@kikoveiga kikoveiga self-assigned this Apr 6, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.97%. Comparing base (e40c7d7) to head (15d75f6).

Files with missing lines Patch % Lines
...roid/rum/internal/net/RumNetworkInstrumentation.kt 80.00% 0 Missing and 2 partials ⚠️
...g/android/rum/resource/ResourceHeadersExtractor.kt 89.47% 0 Missing and 2 partials ⚠️
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 0.00% 1 Missing ⚠️
...n/com/datadog/android/okhttp/DatadogInterceptor.kt 90.91% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3338      +/-   ##
===========================================
- Coverage    72.01%   71.97%   -0.04%     
===========================================
  Files          960      960              
  Lines        35298    35309      +11     
  Branches      5848     5856       +8     
===========================================
- Hits         25417    25412       -5     
- Misses        8281     8290       +9     
- Partials      1600     1607       +7     
Files with missing lines Coverage Δ
...guration/RumNetworkInstrumentationConfiguration.kt 100.00% <100.00%> (ø)
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 65.22% <0.00%> (+2.72%) ⬆️
...n/com/datadog/android/okhttp/DatadogInterceptor.kt 81.11% <90.91%> (-0.86%) ⬇️
...roid/rum/internal/net/RumNetworkInstrumentation.kt 83.87% <80.00%> (-0.83%) ⬇️
...g/android/rum/resource/ResourceHeadersExtractor.kt 92.65% <89.47%> (-1.10%) ⬇️

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch 6 times, most recently from e1e4819 to 3f272ed Compare April 6, 2026 23:32
@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch from 926189a to f4bead1 Compare April 7, 2026 11:06
@satween satween force-pushed the tvaleev/feature/RUM-13441-Okhttp-instrumentation branch 3 times, most recently from 2a39a00 to c562706 Compare April 14, 2026 12:21
Base automatically changed from tvaleev/feature/RUM-13441-Okhttp-instrumentation to develop April 16, 2026 08:49
@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch 3 times, most recently from 2d19894 to a9e7e11 Compare April 16, 2026 13:58
@kikoveiga
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9e7e11a8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch from a9e7e11 to ae4f9d3 Compare April 16, 2026 14:49
@kikoveiga kikoveiga marked this pull request as ready for review April 16, 2026 14:50
@kikoveiga kikoveiga requested review from a team as code owners April 16, 2026 14:50
@kikoveiga kikoveiga requested a review from satween April 16, 2026 14:50
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae4f9d3f36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch 2 times, most recently from af9cab4 to cced335 Compare April 27, 2026 14:43
@kikoveiga kikoveiga force-pushed the kikoveiga/RUM-14784/network-headers-common-instrumentation branch from cced335 to 15d75f6 Compare April 28, 2026 09:26
@kikoveiga kikoveiga requested review from 0xnm and satween April 28, 2026 09:27
@kikoveiga kikoveiga merged commit 7a4cd87 into develop Apr 29, 2026
26 checks passed
@kikoveiga kikoveiga deleted the kikoveiga/RUM-14784/network-headers-common-instrumentation branch April 29, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants