Skip to content

✨ Add angular router integration#4498

Draft
amortemousque wants to merge 12 commits intomainfrom
aymeric.mortemousque/angular-router-integration-2201
Draft

✨ Add angular router integration#4498
amortemousque wants to merge 12 commits intomainfrom
aymeric.mortemousque/angular-router-integration-2201

Conversation

@amortemousque
Copy link
Copy Markdown
Collaborator

Summary

Auto-generated router integration for angular using the router integration pipeline.

  • Router view tracking via startView() on route changes
  • Unit tests for view name computation and navigation filtering

Design Artifacts

Full design trail at docs/integrations/angular/:

  • 01-router-concepts.json — structured routing concepts extracted from framework docs
  • 02-design-decisions.json — hook selection, wrapping strategy, algorithm family decisions
  • 03-generation-manifest.md — list of generated files with lineage

Key Decisions

  • Hook: ResolveStart — unique survivor of the priority filter (afterCancellation:true, afterRedirects:true, afterFetch:false, afterRender:false). Guards have passed and redirects are applied, but resolvers/activation/render happen after — so resource fetches and long tasks are attributed to the new view.
  • Wrapping strategy: providerprovideDatadogRouter() returns a Provider[] registering an ENVIRONMENT_INITIALIZER that uses inject(Router) to subscribe to router.events. This is Angular's canonical DI integration pattern (mirrors provideHttpClient, provideAnimations) since Angular has no factory-wrapping convention analogous to vue-router's createRouter.
  • View name algorithm: matched-records — walks state.root's firstChild chain, concatenating non-empty routeConfig.path segments with /. Handles the ** catch-all by substituting the remaining segments of event.urlAfterRedirects. Same family as rum-vue and rum-react; strictly preferred over route-id (Angular has no parameterized-pattern string) and param-substitution (lossy).
  • Reference implementation: rum-vue — closest match on subscription pattern (router-instance hook), view-name algorithm (matched-records + catch-all substitution), and package shape (main entry + router subpath). rum-react wraps a router factory with no Angular equivalent.

Test plan

  • Review design artifacts in docs/integrations/angular/
  • Review generated code against reference implementations
  • Run yarn typecheck to verify type correctness
  • Run yarn test:unit --spec packages/rum-angular/ to verify tests pass
  • Manual review of computeViewName() edge cases

🤖 Generated with the router integration pipeline

amortemousque and others added 12 commits April 8, 2026 17:14
Design for a fully automated Claude Code skill pipeline that generates
draft Browser SDK router integration PRs from framework public docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Updated spec: skills use separate subdirectories (SKILL.md per dir)
- Plan covers 7 tasks: orchestrator + 5 stage skills + validation
- Each task has step-by-step instructions with exact file paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Six Claude Code skills forming an automated pipeline:
- router:pipeline — orchestrator chaining all stages
- router:fetch-docs — Stage 1: fetch & extract router concepts
- router:analyze — Stage 2: map to SDK patterns
- router:design — Stage 3: produce design decisions
- router:generate — Stage 4: generate package code
- router:pr — Stage 5: create draft PR

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Generated by the router integration pipeline.
Artifacts: router concepts, design decisions, generation manifest.
Auto-generated from framework documentation using the router integration pipeline.
See docs/integrations/angular/ for design artifacts and decision rationale.
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Apr 17, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 177.94 KiB 177.94 KiB 0 B 0.00%
Rum Profiler 6.16 KiB 6.16 KiB 0 B 0.00%
Rum Recorder 27.03 KiB 27.03 KiB 0 B 0.00%
Logs 56.40 KiB 56.40 KiB 0 B 0.00%
Rum Slim 133.81 KiB 133.81 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.97 KiB 27.70 KiB +1.73 KiB
RUM - add action 98.72 KiB 102.12 KiB +3.40 KiB
RUM - add timing 26.43 KiB 25.93 KiB -503 B
RUM - add error 85.28 KiB 99.58 KiB +14.31 KiB
RUM - start/stop session replay recording 26.30 KiB 25.55 KiB -764 B
RUM - start view 486.03 KiB 482.03 KiB -4.00 KiB
Logs - log message 92.85 KiB 96.13 KiB +3.28 KiB

🔗 RealWorld

@datadog-prod-us1-3
Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 64.86%
Overall Coverage: 77.54% (+0.51%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c5882a1 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

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.

1 participant