|
| 1 | +// This file contains constants for fallback span names to be used, when no |
| 2 | +// better-suited, low-cardinality span name is available. |
| 3 | +// Only relevant when span streaming is enabled. |
| 4 | + |
| 5 | +/** |
| 6 | + * Fallback name for pageload spans when no better-suited span name is available. |
| 7 | + * @see https://getsentry.github.io/sentry-conventions/names/#browser-pageload |
| 8 | + */ |
| 9 | +export const PAGELOAD_SPAN_NAME_FALLBACK = 'Pageload'; |
| 10 | + |
| 11 | +/** |
| 12 | + * Fallback name for navigation spans when no better-suited span name is available. |
| 13 | + * @see https://getsentry.github.io/sentry-conventions/names/#browser-navigation |
| 14 | + */ |
| 15 | +export const NAVIGATION_SPAN_NAME_FALLBACK = 'Navigation'; |
| 16 | + |
| 17 | +/** |
| 18 | + * Fallback name for db spans when no better-suited span name is available. |
| 19 | + * @see https://getsentry.github.io/sentry-conventions/names/#db-queries |
| 20 | + */ |
| 21 | +export const DB_SPAN_NAME_FALLBACK = 'Database operation'; |
| 22 | + |
| 23 | +/** |
| 24 | + * Fallback name for gen_ai agent spans when no better-suited span name is available. |
| 25 | + * @see https://getsentry.github.io/sentry-conventions/names/#gen_ai-agent |
| 26 | + */ |
| 27 | +export const GEN_AI_AGENT_SPAN_NAME_FALLBACK = 'Generative AI agent operation'; |
| 28 | + |
| 29 | +/** |
| 30 | + * Fallback name for gen_ai model spans when no better-suited span name is available. |
| 31 | + * @see https://getsentry.github.io/sentry-conventions/names/#gen_ai-inference |
| 32 | + */ |
| 33 | +export const GEN_AI_INFERENCE_SPAN_NAME_FALLBACK = 'Generative AI model operation'; |
| 34 | + |
| 35 | +/** |
| 36 | + * Fallback name for graphql spans when no better-suited span name is available. |
| 37 | + * @see https://getsentry.github.io/sentry-conventions/names/#graphql-graphql |
| 38 | + */ |
| 39 | +export const GRAPHQL_SPAN_NAME_FALLBACK = 'GraphQL Operation'; |
| 40 | + |
| 41 | +/** |
| 42 | + * Fallback name for http.(client|server) spans when no better-suited span name is available. |
| 43 | + * @see https://getsentry.github.io/sentry-conventions/names/#http |
| 44 | + */ |
| 45 | +export const HTTP_SPAN_NAME_FALLBACK = 'HTTP'; |
| 46 | + |
| 47 | +/** |
| 48 | + * Fallback name for messaging spans when no better-suited span name is available. |
| 49 | + * @see https://getsentry.github.io/sentry-conventions/names/#messaging |
| 50 | + */ |
| 51 | +export const MESSAGING_SPAN_NAME_FALLBACK = 'Messaging'; |
| 52 | + |
| 53 | +/** |
| 54 | + * Fallback name for mcp server spans when no better-suited span name is available. |
| 55 | + * @see https://getsentry.github.io/sentry-conventions/names/#mcp-server |
| 56 | + */ |
| 57 | +export const MCP_SERVER_SPAN_NAME_FALLBACK = 'MCP server operation'; |
| 58 | + |
| 59 | +/** |
| 60 | + * Fallback name for mcp notification spans when no better-suited span name is available. |
| 61 | + * @see https://getsentry.github.io/sentry-conventions/names/#mcp-notification |
| 62 | + */ |
| 63 | +export const MCP_NOTIFICATION_SPAN_NAME_FALLBACK = 'MCP notification'; |
| 64 | + |
| 65 | +/** |
| 66 | + * Fallback name for resource spans when no better-suited span name is available. |
| 67 | + * @see https://getsentry.github.io/sentry-conventions/names/#resource-resources |
| 68 | + */ |
| 69 | +export const RESOURCE_SPAN_NAME_FALLBACK = 'Resource'; |
| 70 | + |
| 71 | +/** |
| 72 | + * Fallback name for router spans when no better-suited span name is available. |
| 73 | + * @see https://getsentry.github.io/sentry-conventions/names/#routing-router |
| 74 | + */ |
| 75 | +export const ROUTER_SPAN_NAME_FALLBACK = 'Router'; |
| 76 | + |
| 77 | +/** |
| 78 | + * Fallback name for request handler spans when no better-suited span name is available. |
| 79 | + * @see https://getsentry.github.io/sentry-conventions/names/#resource-resources |
| 80 | + */ |
| 81 | +export const REQUEST_HANDLER_SPAN_NAME_FALLBACK = 'Request Handler'; |
0 commit comments