BugSnag: Set Network Endpoint Groupings
bugsnag_set_network_endpoint_groupingsGroup network spans by URL patterns using OpenAPI path templating and wildcards, consolidating similar endpoints for cleaner performance monitoring.
Instructions
Set the network endpoint grouping rules for a project
Toolset: Performance
Parameters:
projectId (string): Unique identifier of the project. This is optional if a current project is set and is used to set the current project for BugSnag tools.
endpoints (array) required: Array of URL patterns by which network spans are grouped. Endpoints follow OpenAPI path templating syntax (https://swagger.io/specification/#path-templating) where path parameters use curly braces (e.g., /users/{id}). If you encounter colon-prefixed parameters (e.g., :userId from Express/React Router), convert them to curly braces (e.g., {userId}). Wildcards () can be used in domains (e.g., https://.example.com) to match multiple subdomains.
Use Cases: 1. Consolidate similar API endpoints into single span groups 2. Group dynamic URLs using path parameters (e.g., /api/users/{userId} groups /api/users/123, /api/users/456) 3. Match multiple subdomains using wildcards (e.g., https://*.example.com groups api.example.com, cdn.example.com) 4. Simplify performance monitoring by reducing span group clutter
Examples:
Group API endpoints with path parameters
{
"endpoints": [
"/api/users/{userId}",
"/api/products/{productId}",
"/api/orders/{orderId}/items/{itemId}"
]
}Expected Output: Success response confirming the update
Group endpoints with domain wildcards and path parameters
{
"endpoints": [
"https://*.example.com/api/v1/{resourceId}",
"https://api.example.com/v2/users/{userId}",
"/graphql"
]
}Expected Output: Success response confirming the update
Convert colon-prefixed parameters to curly braces (e.g., from Express/React Router)
{
"endpoints": [
"/{organizationSlug}/{projectSlug}/performance/view-load",
"/api/{version}/items/{itemId}"
]
}Expected Output: Success response confirming the update
Hints: 1. Use Get Network Grouping first to see current patterns 2. Use OpenAPI path templating with curly braces for path parameters: /users/{userId}, /orders/{orderId}/items/{itemId} 3. Convert colon-prefixed parameters to curly braces: :organizationSlug becomes {organizationSlug}, :projectSlug becomes {projectSlug} 4. Wildcards () can be used in domains to match subdomains: https://.example.com/api 5. This replaces all existing patterns - include all patterns you want to keep 6. Well-designed patterns reduce noise in performance monitoring
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoints | Yes | Array of URL patterns by which network spans are grouped. Endpoints follow OpenAPI path templating syntax (https://swagger.io/specification/#path-templating) where path parameters use curly braces (e.g., /users/{id}). If you encounter colon-prefixed parameters (e.g., :userId from Express/React Router), convert them to curly braces (e.g., {userId}). Wildcards (*) can be used in domains (e.g., https://*.example.com) to match multiple subdomains. | |
| projectId | No | Unique identifier of the project. This is optional if a current project is set and is used to set the current project for BugSnag tools. |