-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dd): allowed tracing urls #17446
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. WalkthroughThe pull request modifies the user monitoring configuration in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)libs/user-monitoring/src/lib/user-monitoring.ts (1)Pattern
🔇 Additional comments (5)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/user-monitoring/src/lib/user-monitoring.ts (1)
Line range hint
1-36
: Enhance library reusability with configuration validationAs this code is in the
libs/
directory, consider these improvements for better reusability:
- Add runtime validation for the configuration parameters
- Export TypeScript types for the configuration options
- Add JSDoc documentation for the exported functions
Example implementation:
import { z } from 'zod' /** Configuration for Datadog RUM initialization */ export interface DdRumConfig { /** Datadog application ID */ applicationId: string // ... other fields } const configSchema = z.object({ applicationId: z.string().min(1), // ... other validations }) /** Initializes Datadog RUM with the provided configuration */ export const initDdRum = (params: DdRumConfig): void => { const config = configSchema.parse(params) // ... existing implementation }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
libs/user-monitoring/src/lib/user-monitoring.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
libs/user-monitoring/src/lib/user-monitoring.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
🔇 Additional comments (2)
libs/user-monitoring/src/lib/user-monitoring.ts (2)
Line range hint
24-29
: LGTM: URL patterns cover all environmentsThe URL configuration is well-structured with:
- Production domain (island.is)
- Subdomains (.island.is)
- Development environments (.devland.is)
- Local development (localhost)
21-23
: Verify the impact of RUM configuration changesThe changes reduce the sample rate to 20% while enabling interaction tracking. This trade-off needs verification:
- Confirm that 20% sampling provides sufficient monitoring coverage for your use case
- Verify that enabling interaction tracking doesn't significantly impact client-side performance
Run this script to check for any performance monitoring or error tracking dependencies that might be affected:
✅ Verification successful
RUM configuration changes are safely isolated
The reduced sample rate and interaction tracking changes are confined to the centralized configuration in
libs/user-monitoring/src/lib/user-monitoring.ts
. No other files in the codebase override these settings, making the changes safe to implement.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for files that might be affected by RUM configuration rg -l "datadogRum" | xargs rg -l "performance|error|monitoring"Length of output: 63
Script:
#!/bin/bash # Search for Datadog RUM related files and configurations echo "=== Searching for Datadog RUM files ===" rg -l "@datadog|initRum|datadogRum" echo -e "\n=== Searching for RUM configuration patterns ===" rg "sampleRate|sessionReplay|trackInteractions" -A 3 -B 3 echo -e "\n=== Checking for monitoring initialization ===" ast-grep --pattern 'init($$$)'Length of output: 1472
Datadog ReportAll test runs ✅ 10 Total Test Services: 0 Failed, 10 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (3) |
Fix RUM end2end tracing
allowedTracingOrigins
should beallowedTracingUrls
see docstrackInteractions
Summary by CodeRabbit