Skip to content

Conversation

@thomas-lebeau
Copy link
Collaborator

@thomas-lebeau thomas-lebeau commented Oct 3, 2025

Motivation

Various small improvements for the API documentation done during the Mob programming session.

Changes

  • Merge configuration and API categories to prevent composed name (i.e. API/RumGlobal, Configuration/RumInitConfiguration)
  • Improve React plugin categories: Main and Error
  • Rename RumGlobal to DatadogRum so that the name matches the export from NPM. (and the same for log)
  • Add some examples
  • Hide feature operation APIs
Before After
Screenshot 2025-10-03 at 16 07 31 Screenshot 2025-10-03 at 16 29 30

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@thomas-lebeau thomas-lebeau marked this pull request as ready for review October 3, 2025 14:18
@thomas-lebeau thomas-lebeau requested a review from a team as a code owner October 3, 2025 14:18
@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Oct 3, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 162.28 KiB 162.28 KiB 0 B 0.00%
Rum Recorder 19.92 KiB 19.92 KiB 0 B 0.00%
Rum Profiler 4.89 KiB 4.89 KiB 0 B 0.00%
Logs 55.96 KiB 55.96 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 119.25 KiB 119.25 KiB 0 B 0.00%
Worker 23.60 KiB 23.60 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.01 0.0085 -15.00%
RUM - add action 0.0421 0.0351 -16.63%
RUM - add error 0.0358 0.0275 -23.18%
RUM - add timing 0.0108 0.0066 -38.89%
RUM - start view 0.0075 0.0073 -2.67%
RUM - start/stop session replay recording 0.0013 0.0014 +7.69%
Logs - log message 0.0294 0.0286 -2.72%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.45 KiB 25.81 KiB +372 B
RUM - add action 45.86 KiB 46.08 KiB +228 B
RUM - add timing 24.76 KiB 24.55 KiB -215 B
RUM - add error 50.36 KiB 49.01 KiB -1.35 KiB
RUM - start/stop session replay recording 24.02 KiB 24.46 KiB +447 B
RUM - start view 422.08 KiB 430.90 KiB +8.82 KiB
Logs - log message 42.47 KiB 41.37 KiB -1.11 KiB

🔗 RealWorld

@datadog-official
Copy link

datadog-official bot commented Oct 3, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 92.68% (+0.00%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4c7b843 | Docs | Was this helpful? Give us feedback!

export { Logger, HandlerType } from '../domain/logger'
export { StatusType } from '../domain/logger/isAuthorized'
export type { LoggerConfiguration, LogsPublicApi as LogsGlobal } from '../boot/logsPublicApi'
export type { LoggerConfiguration, LogsPublicApi as DatadogLogs } from '../boot/logsPublicApi'
Copy link
Collaborator

Choose a reason for hiding this comment

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

❓ question: ‏Isn't it a breaking change?

Copy link
Member

Choose a reason for hiding this comment

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

We exported the LogsGlobal as deprecated a few lines below (same for RUM):

/**
 * @deprecated Use {@link DatadogLogs} instead
 */
export type LogsGlobal = LogsPublicApi

@thomas-lebeau thomas-lebeau merged commit 23438ff into main Oct 7, 2025
20 checks passed
@thomas-lebeau thomas-lebeau deleted the thomas.lebeau/mob-ts-doc branch October 7, 2025 09:29
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