Skip to content

✨ [RUM-15003] attach user-agent header to intake requests#35

Merged
bcaudan merged 5 commits into
mainfrom
bcaudan/user-agent
Mar 12, 2026
Merged

✨ [RUM-15003] attach user-agent header to intake requests#35
bcaudan merged 5 commits into
mainfrom
bcaudan/user-agent

Conversation

@bcaudan

@bcaudan bcaudan commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The SDK sends HTTP requests to Datadog intake without a User-Agent header.
Let's add one to attach environment information to the request.

Changes

  • Build a User-Agent string with app info, OS details and Electron/Chrome/Node versions.
  • Add User-Agent header to intake requests

Test instructions

RUM events in Datadog should have device and browser info.

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated related documentation.

@bcaudan bcaudan force-pushed the bcaudan/user-agent branch from 0401e35 to d182a21 Compare March 11, 2026 17:58
bcaudan added 2 commits March 11, 2026 19:27
- Add getUserAgent() with per-platform OS detection (async execFile on macOS)
- Include User-Agent header in BatchConsumer fetch call
@bcaudan bcaudan force-pushed the bcaudan/user-agent branch from d182a21 to 292c210 Compare March 11, 2026 18:33
@bcaudan bcaudan marked this pull request as ready for review March 12, 2026 09:07
@bcaudan bcaudan requested a review from cdn34dd as a code owner March 12, 2026 09:07
Comment thread src/transport/batch/BatchConsumer.ts Outdated
Comment thread src/transport/userAgent.ts Outdated
Comment thread src/transport/userAgent.ts Outdated
@bcaudan bcaudan requested a review from a team as a code owner March 12, 2026 15:57
@bcaudan bcaudan requested a review from cdn34dd March 12, 2026 15:59
@bcaudan bcaudan merged commit e09a391 into main Mar 12, 2026
12 checks passed
@bcaudan bcaudan deleted the bcaudan/user-agent branch March 12, 2026 16:04
@bcaudan bcaudan mentioned this pull request Mar 26, 2026
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.

2 participants