Skip to content

Comments

feat: add Datadog RUM session tracking integration#20

Closed
jordane wants to merge 28 commits intomainfrom
jme/LFXV2-149
Closed

feat: add Datadog RUM session tracking integration#20
jordane wants to merge 28 commits intomainfrom
jme/LFXV2-149

Conversation

@jordane
Copy link
Member

@jordane jordane commented Jul 30, 2025

  • Install @datadog/browser-rum package for real user monitoring
  • Add configurable Datadog RUM service with full feature support
  • Configure environment variables for applicationId, clientToken, and env
  • Enable RUM for dev/staging/prod, disabled for local development
  • Integrate user context tracking for authenticated users
  • Support session tracking, replay, user interactions, and error monitoring
  • Use datadoghq.com site with lfx-projects-self-service service name

🤖 Generated with Claude Code

- Install @datadog/browser-rum package for real user monitoring
- Add configurable Datadog RUM service with full feature support
- Configure environment variables for applicationId, clientToken, and env
- Enable RUM for dev/staging/prod, disabled for local development
- Integrate user context tracking for authenticated users
- Support session tracking, replay, user interactions, and error monitoring
- Use datadoghq.com site with lfx-projects-self-service service name

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
Copilot AI review requested due to automatic review settings July 30, 2025 22:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Datadog Real User Monitoring (RUM) integration to track user sessions, performance, and errors across development, staging, and production environments. The integration is configurable via environment variables and includes user context tracking for authenticated users.

  • Adds @datadog/browser-rum package dependency
  • Creates a comprehensive DatadogRumService with full RUM feature support
  • Configures environment-specific settings with RUM disabled for local development

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

File Description
package.json Adds @datadog/browser-rum dependency
environment*.ts Configures Datadog settings for each environment (local disabled, dev/prod enabled)
datadog-rum.service.ts Implements RUM service with initialization, user tracking, and monitoring features
app.component.ts Integrates RUM service initialization and user context setting

Comment on lines +11 to +15
applicationId: process.env['DD_APPLICATION_ID'] || '',
clientToken: process.env['DD_CLIENT_TOKEN'] || '',
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: process.env['DD_ENV'] || 'prod',
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

Using process.env in browser environments exposes environment variables to client-side code. Consider using Angular's build-time environment replacement or a secure configuration service instead of runtime environment variables for sensitive tokens.

Suggested change
applicationId: process.env['DD_APPLICATION_ID'] || '',
clientToken: process.env['DD_CLIENT_TOKEN'] || '',
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: process.env['DD_ENV'] || 'prod',
applicationId: 'DD_APPLICATION_ID_PLACEHOLDER',
clientToken: 'DD_CLIENT_TOKEN_PLACEHOLDER',
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: 'DD_ENV_PLACEHOLDER',

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +15
applicationId: process.env['DD_APPLICATION_ID'] || '',
clientToken: process.env['DD_CLIENT_TOKEN'] || '',
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: process.env['DD_ENV'] || 'dev',
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

Using process.env in browser environments exposes environment variables to client-side code. Consider using Angular's build-time environment replacement or a secure configuration service instead of runtime environment variables for sensitive tokens.

Suggested change
applicationId: process.env['DD_APPLICATION_ID'] || '',
clientToken: process.env['DD_CLIENT_TOKEN'] || '',
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: process.env['DD_ENV'] || 'dev',
applicationId: 'dev-application-id', // Replace with actual dev value or placeholder
clientToken: 'dev-client-token', // Replace with actual dev value or placeholder
site: 'datadoghq.com',
service: 'lfx-projects-self-service',
env: 'dev', // Replace with actual dev value or placeholder

Copilot uses AI. Check for mistakes.
datadogRum.init({
applicationId: environment.datadog.applicationId,
clientToken: environment.datadog.clientToken,
site: environment.datadog.site as 'datadoghq.com',
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The type assertion 'as "datadoghq.com"' is brittle and could break if the site value changes. Consider using proper typing or validation to ensure the site value is a valid Datadog site.

Copilot uses AI. Check for mistakes.
site: environment.datadog.site as 'datadoghq.com',
service: environment.datadog.service,
env: environment.datadog.env,
version: '1.0.0',
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The version is hardcoded as '1.0.0'. Consider reading this from package.json or environment configuration to keep it synchronized with actual application versions.

Copilot uses AI. Check for mistakes.
asithade and others added 22 commits July 30, 2025 19:16
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
- Add weekly-e2e-tests.yml workflow for comprehensive browser testing
- Runs every Sunday at 2:00 AM UTC on main branch
- Tests all browsers (Chromium, Firefox, Mobile Chrome) in parallel
- Reuses existing e2e-tests.yml workflow for consistency
- Creates GitHub issues automatically on test failures
- Supports manual dispatch with browser/branch selection
- Re-enable E2E tests dependency in quality-check workflow

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <asithade@gmail.com>
- Replace complex participant management modal with streamlined add/edit participant form
- Add checkbox option to add multiple participants in sequence
- Implement participant deletion with confirmation dialog
- Move participant management actions to individual meeting cards
- Add real-time participant list refresh during modal operations
- Remove unused participant list and management modal components
- Update meeting service with participant update/delete endpoints
- Enhance checkbox component to support reactive forms

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <asithade@gmail.com>
- Add effect-based meeting input synchronization for better reactivity
- Implement refreshMeeting method to update meeting data after edits/deletes
- Simplify participant list refresh logic
- Update meeting modal delete method naming for consistency
- Remove unnecessary meetingUpdated event emissions

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <asithade@gmail.com>
- Rename refreshParticipantsList to initParticipantsList for consistency
- Fix duplicate participantsLoading.set(true) calls
- Implement real-time participant refresh using onChildComponentLoaded
- Update all participant list refresh calls to use consistent method naming

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <asithade@gmail.com>
- Add GitHub Actions workflows for Docker image builds:
  - docker-build-main.yml: builds on pushes to main branch
  - docker-build-tag.yml: builds on tag creation for releases
- Add complete Helm chart for Kubernetes deployment:
  - Chart.yaml with metadata and version info
  - Comprehensive values.yaml with environment configuration
  - Template files for all Kubernetes resources:
    - Deployment with configurable replicas and environment variables
    - Service with ClusterIP type and port configuration
    - Ingress with TLS support and path-based routing
    - ServiceAccount with RBAC configuration
  - Helper templates for consistent naming and labeling
- Configure environment variables for Auth0, Supabase, and PCC services
- Set up proper resource limits and health checks
- Include comprehensive README with deployment instructions

This enables containerized deployment to Kubernetes environments with
proper CI/CD integration for automated image builds.

Signed-off-by: Alan Sherman <asherman@linuxfoundation.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Alan Sherman <alan@alansherman.org>
Signed-off-by: Alan Sherman <asherman@linuxfoundation.org>
Signed-off-by: Alan Sherman <asherman@linuxfoundation.org>
test: add comprehensive E2E testing with Playwright and CI workflows
@github-actions
Copy link

✅ E2E Tests Passed

Browser: chromium
Status: passed

All E2E tests passed successfully.

Test Configuration

@asithade asithade closed this Aug 12, 2025
@asithade asithade deleted the jme/LFXV2-149 branch August 12, 2025 22:16
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