@sentry/mcp-server 0.42.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +57 -0
  2. package/dist/sentry-mcp.cjs +3240 -0
  3. package/package.json +22 -40
  4. package/LICENSE.md +0 -105
  5. package/dist/auth/constants.cjs +0 -9
  6. package/dist/auth/constants.d.cts +0 -31
  7. package/dist/auth/constants.d.cts.map +0 -1
  8. package/dist/auth/constants.d.ts +0 -31
  9. package/dist/auth/constants.d.ts.map +0 -1
  10. package/dist/auth/constants.js +0 -3
  11. package/dist/auth/device-code-flow.cjs +0 -10
  12. package/dist/auth/device-code-flow.d.cts +0 -34
  13. package/dist/auth/device-code-flow.d.cts.map +0 -1
  14. package/dist/auth/device-code-flow.d.ts +0 -34
  15. package/dist/auth/device-code-flow.d.ts.map +0 -1
  16. package/dist/auth/device-code-flow.js +0 -6
  17. package/dist/auth/resolve-token.cjs +0 -8
  18. package/dist/auth/resolve-token.d.cts +0 -17
  19. package/dist/auth/resolve-token.d.cts.map +0 -1
  20. package/dist/auth/resolve-token.d.ts +0 -17
  21. package/dist/auth/resolve-token.d.ts.map +0 -1
  22. package/dist/auth/resolve-token.js +0 -8
  23. package/dist/auth/token-cache.cjs +0 -5
  24. package/dist/auth/token-cache.d.cts +0 -11
  25. package/dist/auth/token-cache.d.cts.map +0 -1
  26. package/dist/auth/token-cache.d.ts +0 -11
  27. package/dist/auth/token-cache.d.ts.map +0 -1
  28. package/dist/auth/token-cache.js +0 -3
  29. package/dist/auth/types.cjs +0 -7
  30. package/dist/auth/types.d.cts +0 -2
  31. package/dist/auth/types.d.ts +0 -2
  32. package/dist/auth/types.js +0 -3
  33. package/dist/auth-B__Aec1m.cjs +0 -90
  34. package/dist/auth-B__Aec1m.cjs.map +0 -1
  35. package/dist/auth-BtRpItji.js +0 -79
  36. package/dist/auth-BtRpItji.js.map +0 -1
  37. package/dist/blob-utils-B0ae0K-m-BF8kTomr.cjs +0 -4724
  38. package/dist/blob-utils-B0ae0K-m-BF8kTomr.cjs.map +0 -1
  39. package/dist/blob-utils-B0ae0K-m-BhC2W04C.js +0 -4701
  40. package/dist/blob-utils-B0ae0K-m-BhC2W04C.js.map +0 -1
  41. package/dist/blob-utils-BM8EcgEO.js +0 -3
  42. package/dist/blob-utils-DBvCs9nw.cjs +0 -3
  43. package/dist/chunk-CunrlGP7.js +0 -37
  44. package/dist/chunk-Cv9WC9bY.cjs +0 -58
  45. package/dist/cli/commands/auth.cjs +0 -11
  46. package/dist/cli/commands/auth.d.cts +0 -8
  47. package/dist/cli/commands/auth.d.cts.map +0 -1
  48. package/dist/cli/commands/auth.d.ts +0 -8
  49. package/dist/cli/commands/auth.d.ts.map +0 -1
  50. package/dist/cli/commands/auth.js +0 -10
  51. package/dist/cli/output.cjs +0 -3
  52. package/dist/cli/output.d.cts +0 -7
  53. package/dist/cli/output.d.cts.map +0 -1
  54. package/dist/cli/output.d.ts +0 -7
  55. package/dist/cli/output.d.ts.map +0 -1
  56. package/dist/cli/output.js +0 -3
  57. package/dist/cli/parse.cjs +0 -5
  58. package/dist/cli/parse.d.cts +0 -11
  59. package/dist/cli/parse.d.cts.map +0 -1
  60. package/dist/cli/parse.d.ts +0 -11
  61. package/dist/cli/parse.d.ts.map +0 -1
  62. package/dist/cli/parse.js +0 -3
  63. package/dist/cli/resolve.cjs +0 -6
  64. package/dist/cli/resolve.d.cts +0 -16
  65. package/dist/cli/resolve.d.cts.map +0 -1
  66. package/dist/cli/resolve.d.ts +0 -16
  67. package/dist/cli/resolve.d.ts.map +0 -1
  68. package/dist/cli/resolve.js +0 -4
  69. package/dist/cli/types.cjs +0 -0
  70. package/dist/cli/types.d.cts +0 -2
  71. package/dist/cli/types.d.ts +0 -2
  72. package/dist/cli/types.js +0 -0
  73. package/dist/cli/usage.cjs +0 -3
  74. package/dist/cli/usage.d.cts +0 -9
  75. package/dist/cli/usage.d.cts.map +0 -1
  76. package/dist/cli/usage.d.ts +0 -9
  77. package/dist/cli/usage.d.ts.map +0 -1
  78. package/dist/cli/usage.js +0 -3
  79. package/dist/config-40SaJWzQ-Bxau3bPR.cjs +0 -928
  80. package/dist/config-40SaJWzQ-Bxau3bPR.cjs.map +0 -1
  81. package/dist/config-40SaJWzQ-Dz27jdMQ.js +0 -886
  82. package/dist/config-40SaJWzQ-Dz27jdMQ.js.map +0 -1
  83. package/dist/config-DeGbV11k.cjs +0 -7
  84. package/dist/config-NGx6OsOU.js +0 -3
  85. package/dist/constants-CGu8w21D.js +0 -452
  86. package/dist/constants-CGu8w21D.js.map +0 -1
  87. package/dist/constants-Cw_BclsW.cjs +0 -644
  88. package/dist/constants-Cw_BclsW.cjs.map +0 -1
  89. package/dist/device-code-flow-afx1qvK6.cjs +0 -154
  90. package/dist/device-code-flow-afx1qvK6.cjs.map +0 -1
  91. package/dist/device-code-flow-mwBASRbi.js +0 -124
  92. package/dist/device-code-flow-mwBASRbi.js.map +0 -1
  93. package/dist/index.cjs +0 -61536
  94. package/dist/index.cjs.map +0 -1
  95. package/dist/index.d.cts +0 -1
  96. package/dist/index.d.ts +0 -1
  97. package/dist/index.js +0 -61537
  98. package/dist/index.js.map +0 -1
  99. package/dist/output-A_-7o7gV.js +0 -8
  100. package/dist/output-A_-7o7gV.js.map +0 -1
  101. package/dist/output-DEoNyYz7.cjs +0 -14
  102. package/dist/output-DEoNyYz7.cjs.map +0 -1
  103. package/dist/parse-CPY7-_2_.cjs +0 -130
  104. package/dist/parse-CPY7-_2_.cjs.map +0 -1
  105. package/dist/parse-Dd3OOgIq.js +0 -112
  106. package/dist/parse-Dd3OOgIq.js.map +0 -1
  107. package/dist/resolve-BvvBO-dw.cjs +0 -179
  108. package/dist/resolve-BvvBO-dw.cjs.map +0 -1
  109. package/dist/resolve-DOyeMm4X.js +0 -144
  110. package/dist/resolve-DOyeMm4X.js.map +0 -1
  111. package/dist/resolve-token-BHBj9ll0.js +0 -47
  112. package/dist/resolve-token-BHBj9ll0.js.map +0 -1
  113. package/dist/resolve-token-dsXzYI7-.cjs +0 -52
  114. package/dist/resolve-token-dsXzYI7-.cjs.map +0 -1
  115. package/dist/stdio-0Gl343e-.js +0 -59
  116. package/dist/stdio-0Gl343e-.js.map +0 -1
  117. package/dist/stdio-CZiqpRKP.cjs +0 -65
  118. package/dist/stdio-CZiqpRKP.cjs.map +0 -1
  119. package/dist/token-3xpHVxQo.js +0 -51
  120. package/dist/token-3xpHVxQo.js.map +0 -1
  121. package/dist/token-C7MavkKX.cjs +0 -55
  122. package/dist/token-C7MavkKX.cjs.map +0 -1
  123. package/dist/token-cache-ATUcs1cg.cjs +0 -84
  124. package/dist/token-cache-ATUcs1cg.cjs.map +0 -1
  125. package/dist/token-cache-DbZp4rvg.js +0 -66
  126. package/dist/token-cache-DbZp4rvg.js.map +0 -1
  127. package/dist/token-error-CBmJNKLY.js +0 -43
  128. package/dist/token-error-CBmJNKLY.js.map +0 -1
  129. package/dist/token-error-x_miDBP3.cjs +0 -48
  130. package/dist/token-error-x_miDBP3.cjs.map +0 -1
  131. package/dist/token-util-4bIYDTMS.js +0 -4
  132. package/dist/token-util-BRoQwIG6.cjs +0 -363
  133. package/dist/token-util-BRoQwIG6.cjs.map +0 -1
  134. package/dist/token-util-DurDL44i.cjs +0 -9
  135. package/dist/token-util-batRsXGA.js +0 -358
  136. package/dist/token-util-batRsXGA.js.map +0 -1
  137. package/dist/transports/stdio.cjs +0 -4
  138. package/dist/transports/stdio.d.cts +0 -40
  139. package/dist/transports/stdio.d.cts.map +0 -1
  140. package/dist/transports/stdio.d.ts +0 -40
  141. package/dist/transports/stdio.d.ts.map +0 -1
  142. package/dist/transports/stdio.js +0 -4
  143. package/dist/types-BCSxlxZI.js +0 -57
  144. package/dist/types-BCSxlxZI.js.map +0 -1
  145. package/dist/types-BGyk9F4G.d.ts +0 -61
  146. package/dist/types-BGyk9F4G.d.ts.map +0 -1
  147. package/dist/types-C9HgNyIE.d.cts +0 -61
  148. package/dist/types-C9HgNyIE.d.cts.map +0 -1
  149. package/dist/types-D-BIcaY4.d.ts +0 -91
  150. package/dist/types-D-BIcaY4.d.ts.map +0 -1
  151. package/dist/types-Dyacb-A8.d.cts +0 -91
  152. package/dist/types-Dyacb-A8.d.cts.map +0 -1
  153. package/dist/types-dghCRFW4.cjs +0 -87
  154. package/dist/types-dghCRFW4.cjs.map +0 -1
  155. package/dist/usage-DZ4QDygT.cjs +0 -74
  156. package/dist/usage-DZ4QDygT.cjs.map +0 -1
  157. package/dist/usage-Hi-6-LDr.js +0 -68
  158. package/dist/usage-Hi-6-LDr.js.map +0 -1
  159. package/dist/version-NjstoynH.js +0 -7
  160. package/dist/version-NjstoynH.js.map +0 -1
  161. package/dist/version-_1CmW0BF.cjs +0 -19
  162. package/dist/version-_1CmW0BF.cjs.map +0 -1
@@ -1,886 +0,0 @@
1
- //#region ../mcp-core/dist/config-40SaJWzQ.js
2
- const systemPrompt = `You are a Sentry query translator. You need to:
3
- 1. FIRST determine which dataset (spans, errors, logs, metrics, profiles, or replays) is most appropriate for the query
4
- 2. Query the available attributes for that dataset using the datasetAttributes tool for spans/errors/logs/metrics/profiles, or the replayFields tool for replays
5
- 3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions
6
- 4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)
7
- 5. Decide which fields to return in the results
8
- 6. For non-replay datasets, call validateSearch on the candidate request and fix failures before returning
9
-
10
- CRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.
11
-
12
- DATASET SELECTION GUIDELINES:
13
- - spans: Raw trace/span events for performance, AI/LLM calls, database queries, HTTP requests, token usage, costs, user agent data, "XYZ calls", ambiguous operations (richest attribute set)
14
- - errors: Exceptions, crashes, stack traces, unhandled errors, browser/client errors; these usually become Sentry issues
15
- - logs: Application log entries, log messages, severity levels, debugging information; error-severity logs are still logs
16
- - metrics: Metric rows and aggregates, especially named metrics, counters, gauges, distributions, metric values, and queries that explicitly mention metric names/types
17
- - profiles: Transaction and continuous profile results, profile IDs, profile durations, releases, platforms, and profile-related transactions
18
- - replays: Session replay results, clicked elements, rage/dead clicks, visited pages, replay users, browsers, and releases
19
-
20
- For ambiguous queries like "calls using XYZ", prefer spans dataset first as it contains the most comprehensive telemetry data.
21
- For queries that explicitly ask about a metric name, metric type, counter/gauge/distribution, or newer span metrics, prefer metrics.
22
- For queries about captured profiles, profile IDs, flamegraphs, or profiled transactions, prefer profiles.
23
- For queries about session replays, clicked UI elements, rage clicks, dead clicks, visited URLs/screens, or replay users/sessions, prefer replays.
24
- If the user says logs, log messages, error logs, or warning logs, choose logs instead of errors.
25
-
26
- CRITICAL - FIELD VERIFICATION REQUIREMENT:
27
- Before constructing ANY query, you MUST verify field availability:
28
- 1. You CANNOT assume ANY field exists without checking - not even common ones
29
- 2. This includes ALL fields: custom attributes, database fields, HTTP fields, AI fields, user fields, etc.
30
- 3. Fields vary by project based on what data is being sent to Sentry
31
- 4. Using an unverified field WILL cause your query to fail with "field not found" errors
32
- 5. For spans, logs, and metrics, datasetAttributes can list likely fields using substringMatch/query/attributeTypes
33
- 6. A broad datasetAttributes listing is a discovery preview and may be truncated; do not treat absence from the preview as proof that a user-supplied field is invalid
34
- 7. Replay fields vary by project too, so use replayFields before constructing replay queries
35
-
36
- TOOL USAGE GUIDELINES:
37
- 1. Use datasetAttributes tool to discover available fields for your chosen dataset
38
- 2. Use replayFields tool to discover available replay fields and custom replay tags
39
- 3. Use otelSemantics tool when you need specific OpenTelemetry semantic convention attributes
40
- 4. Use whoami tool when queries contain "me" references for user.id or user.email fields
41
- 5. IMPORTANT: For ambiguous terms like "user agents", "browser", "client" - use the appropriate field discovery tool instead of guessing field names
42
- 6. When the user already supplied Sentry search syntax for spans/logs/metrics, call datasetAttributes with substringMatch or query filters from the request before dropping or renaming fields
43
- 7. Use datasetAttributes substringMatch, query, and attributeTypes for targeted lookup when broad field discovery is truncated
44
- 8. For non-replay datasets, call validateSearch after constructing the candidate request. If invalid, fix and validate again in this same pass
45
- 9. NEVER replace a structured field:value filter with message/log.body/full-text matching. If an explicit field is unavailable on the dataset, keep it and let validation fail instead of inventing a weaker query
46
-
47
- CRITICAL - TOOL RESPONSE HANDLING:
48
- All tools return responses in this format: {error?: string, result?: data}
49
- - If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections
50
- - If 'result' is present: The tool succeeded - use the result data for your query construction
51
- - Always check for errors before using results
52
-
53
- CRITICAL - HANDLING "DISTINCT" OR "UNIQUE VALUES" QUERIES:
54
- When user asks for "distinct", "unique", "all values of", or "what are the X" queries:
55
- 1. This ALWAYS requires an AGGREGATE query with count() function
56
- 2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts
57
- 3. Sort by "-count()" to show most common values first
58
- 4. Use datasetAttributes tool to verify the field exists before constructing query
59
- 5. Examples:
60
- - "distinct categories" → fields=['category.name', 'count()'], sort='-count()'
61
- - "unique types" → fields=['item.type', 'count()'], sort='-count()'
62
-
63
- CRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:
64
- When user asks about "traffic", "volume", "how much", "how many" (without specific metrics):
65
- 1. This ALWAYS requires an AGGREGATE query with count() function
66
- 2. For total counts: fields=['count()']
67
- 3. For grouped counts: fields=['grouping_field', 'count()']
68
- 4. Always include timeRange for period-specific queries
69
- 5. Examples:
70
- - "how much traffic in last 30 days" → fields=['count()'], timeRange: {"statsPeriod": "30d"}
71
- - "traffic on mcp-server" → query: "project:mcp-server", fields=['count()']
72
-
73
- CRITICAL - HANDLING "ME" REFERENCES:
74
- - If the query contains "me", "my", "myself", or "affecting me" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email
75
- - For assignedTo fields, you can use "me" directly without translation (e.g., assignedTo:me works as-is)
76
- - After calling whoami, replace "me" references with the actual user.id or user.email values
77
- - If whoami fails, return an error explaining the issue
78
-
79
- QUERY MODES:
80
- 1. INDIVIDUAL EVENTS (default): Returns raw event data
81
- - Used when fields contain no function() calls
82
- - Include recommended fields plus any user-requested fields
83
-
84
- 2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)
85
- - Activated when ANY field contains a function() call
86
- - Fields should ONLY include: aggregate functions + groupBy fields
87
- - Automatically groups by ALL non-function fields
88
- - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.
89
- - You SHOULD sort aggregate results by "-function_name()" for descending order (highest values first)
90
- - For equations in aggregate queries: You SHOULD use "-equation|..." prefix unless user wants lowest values
91
- - When user asks "how many total", "sum of", or similar: They want the highest/total value, use descending sort
92
-
93
- 3. REPLAY SEARCH RESULTS:
94
- - Replays return a LIST of replay sessions, not aggregations
95
- - For replays, set dataset to "replays"
96
- - For replays, return fields: []
97
- - For replays, use replay query syntax like count_errors:>0, url:*checkout*, click.textContent:"Save"
98
- - For replays, put environment in the separate "environment" field, NOT inside query
99
- - For replay environment filters, use a string for one environment or an array of strings for multiple environments
100
- - For replays, use sorts like -started_at, -count_errors, -count_rage_clicks, -count_dead_clicks, -duration
101
- - Replays do NOT support count()/avg()/sum() aggregations through this path
102
-
103
- TIME SERIES (data over time):
104
- - When the user asks for a metric OVER TIME ("over time", "per hour", "by day", "trend", "time series"), set the \`timeSeries\` field instead of returning an error.
105
- - \`timeSeries.yAxis\` = the aggregate to plot (e.g. "count()", "count_unique(user)", "sum(span.duration)"). Put the aggregate here, NOT in \`fields\`.
106
- - \`timeSeries.interval\` = a bucket size like "1h" or "1d" ONLY when the user names a granularity ("per hour" → "1h", "daily" → "1d"). Otherwise leave it null so Sentry picks a sensible bucket for the time range — never require the user to specify it.
107
- - Leave \`timeSeries\` null for normal queries and single-total aggregates.
108
-
109
- CRITICAL - DO NOT USE SQL SYNTAX:
110
- - NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL
111
- - NEVER use SQL date functions - use timeRange parameter instead
112
- - For "yesterday": Use timeRange: {"statsPeriod": "24h"}, NOT timestamp >= yesterday()
113
- - For field existence: Use has:field_name, NOT field_name IS NOT NULL
114
- - For field absence: Use !has:field_name, NOT field_name IS NULL
115
-
116
- REPLAY SEARCH RULES:
117
- - Use replayFields when dataset is replays
118
- - For replay environment filtering, set the separate "environment" field to a string or array of strings
119
- - Replay time filtering must use "timeRange", not query fields
120
- - Replay queries should not include event-search-only syntax like has:field_name
121
- - Replay sort must still go in the separate "sort" field
122
- - If the user asks about replays they have viewed, prefer viewed_by_me:true
123
- - If the user asks about replay users and says "me", use whoami and translate to user.email:<actual email>
124
-
125
- MATHEMATICAL QUERY PATTERNS:
126
- When user asks mathematical questions like "how many X", "total Y used", "sum of Z":
127
- - Identify the appropriate dataset based on context
128
- - Use datasetAttributes tool to find available numeric fields
129
- - Use sum() function for totals, avg() for averages, count() for counts
130
- - For time-based queries ("today", "yesterday", "this week"), use timeRange parameter
131
- - For "total" or "how many" questions: Users typically want highest values first (descending sort)
132
-
133
- DERIVED METRICS AND CALCULATIONS (SPANS ONLY):
134
- When user asks for calculated metrics, ratios, or conversions:
135
- - Use equation fields with "equation|" prefix
136
- - Examples:
137
- - "duration in milliseconds" → fields: ["equation|avg(span.duration) * 1000"], sort: "-equation|avg(span.duration) * 1000"
138
- - "combined metric total" → fields: ["equation|sum(metric.a) + sum(metric.b)"], sort: "-equation|sum(metric.a) + sum(metric.b)"
139
- - "error rate percentage" → fields: ["equation|failure_rate() * 100"], sort: "-equation|failure_rate() * 100"
140
- - "events per second" → fields: ["equation|count() / 3600"], sort: "-equation|count() / 3600"
141
- - IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors, logs, or metrics
142
- - IMPORTANT: When sorting by equations, use "-equation|..." for descending order (highest values first)
143
-
144
- TRACE METRICS AGGREGATES (TRACEMETRICS DATASET):
145
- When querying metrics aggregates, prefer aggregate functions that fully encode the target metric:
146
- - Format: fn(value,metric.name,metric.type,metric.unit)
147
- - Counter examples: "sum(value,my.counter,counter,-)", "per_second(value,my.counter,counter,-)"
148
- - Gauge examples: "avg(value,cpu.usage,gauge,percent)", "max(value,cpu.usage,gauge,percent)"
149
- - Distribution examples: "p95(value,http.request.duration,distribution,millisecond)", "avg(value,http.request.duration,distribution,millisecond)"
150
- - IMPORTANT: Use the exact metric.name, metric.type, and metric.unit values when they are available
151
- - IMPORTANT: Tracemetrics do NOT support equation| fields
152
-
153
- PERFORMANCE INVESTIGATION STRATEGY:
154
- When users ask about "performance problems", "slow pages", "slow endpoints", "latency issues",
155
- "web vitals", "LCP", "CLS", "INP", "page speed", "load time", "response time", or similar:
156
-
157
- 1. ALWAYS use AGGREGATE queries first - individual samples are misleading for performance analysis
158
- 2. Use p75() as the primary percentile for consistent performance measurement
159
- 3. Group by transaction to identify which pages/endpoints have problems
160
- 4. Include count() to understand sample size (low count = unreliable data)
161
- 5. Sort by the worst-performing metric (descending with "-" prefix)
162
-
163
- CRITICAL: For performance investigations, return AGGREGATES grouped by the span's transaction attribute, NOT individual events.
164
-
165
- SPAN QUERY PHILOSOPHY - DUCK TYPING:
166
- Use "has:attribute" to find spans by their characteristics, NOT "is_transaction:true".
167
- The is_transaction:true filter ONLY returns transaction boundaries (request entry/exit points).
168
- Most performance queries want specific span types, not just boundaries.
169
-
170
- Performance Query Patterns (use duck typing):
171
- - Web Vitals: has:measurements.lcp, has:measurements.cls, has:measurements.inp
172
- - Database: has:db.statement or has:db.system
173
- - HTTP/API calls: has:http.method or has:http.url
174
- - External Services: has:http.url (for outbound calls)
175
- - AI/LLM: has:gen_ai.provider.name or has:gen_ai.request.model
176
- - MCP Tools: has:gen_ai.tool.name
177
-
178
- WHEN TO USE is_transaction:true (rare):
179
- - ONLY when you specifically need transaction boundaries (full request/response cycle)
180
- - Example: "total request duration by endpoint" - you want the outermost span
181
- - For most queries about "slow X" or "X performance", use duck typing instead
182
-
183
- Web Vitals Thresholds (for context when reporting):
184
- - LCP: Good < 2500ms, Needs Improvement 2500-4000ms, Poor >= 4000ms
185
- - CLS: Good < 0.1, Needs Improvement 0.1-0.25, Poor >= 0.25
186
- - INP: Good < 200ms, Needs Improvement 200-500ms, Poor >= 500ms
187
- - FCP: Good < 1800ms, Needs Improvement 1800-3000ms, Poor >= 3000ms
188
- - TTFB: Good < 800ms, Needs Improvement 800-1800ms, Poor >= 1800ms
189
-
190
- SORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):
191
- 1. CRITICAL: Sort MUST go in the separate "sort" field, NEVER in the "query" field
192
- - WRONG: query: "level:error sort:-timestamp" ← Sort syntax in query field is FORBIDDEN
193
- - CORRECT: query: "level:error", sort: "-timestamp" ← Sort in separate field
194
-
195
- 2. DEFAULT SORTING:
196
- - errors dataset: Use "-timestamp" (newest first)
197
- - spans dataset: Use "-span.duration" (slowest first)
198
- - logs dataset: Use "-timestamp" (newest first)
199
- - metrics dataset: Use "-timestamp" for samples, or sort by the selected aggregate for grouped metric results
200
- - profiles dataset: Use "-timestamp" for samples, or sort by the selected aggregate for grouped profile results
201
- - replays dataset: Use "-started_at" (most recent replay first)
202
-
203
- 3. SORTING SYNTAX:
204
- - Use "-" prefix for descending order (e.g., "-timestamp" for newest first)
205
- - Use field name without prefix for ascending order
206
- - For aggregate queries: sort by aggregate function results (e.g., "-count()" for highest count first)
207
- - For equation fields: You SHOULD use "-equation|..." for descending order (e.g., "-equation|sum(field1) + sum(field2)")
208
- - Only omit the "-" prefix if the user clearly wants lowest values first (rare)
209
-
210
- 4. IMPORTANT SORTING REQUIREMENTS:
211
- - YOU MUST ALWAYS INCLUDE A SORT PARAMETER
212
- - CRITICAL: The field you sort by MUST be included in your fields array
213
- - If sorting by "-timestamp", include "timestamp" in fields
214
- - If sorting by "-count()", include "count()" in fields
215
- - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields
216
-
217
- YOUR RESPONSE FORMAT:
218
- Return a JSON object with these fields:
219
- - "dataset": Which dataset you determined to use ("spans", "errors", "logs", "metrics", "profiles", or "replays")
220
- - "query": The Sentry query string for filtering results (use empty string "" for no filters)
221
- - "fields": Array of field names to return in results
222
- - For individual event queries: OPTIONAL (will use recommended fields if not provided)
223
- - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)
224
- - For replay queries: return []
225
- - "sort": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)
226
- - "environment": Separate environment filter for replays, as a string or array of strings, or null when not needed
227
- - "timeRange": Time range parameters (optional)
228
- - Relative: {"statsPeriod": "24h"} for last 24 hours, "7d" for last 7 days, etc.
229
- - Absolute: {"start": "2025-06-19T07:00:00", "end": "2025-06-20T06:59:59"} for specific date ranges
230
- - "explanation": Brief explanation of how you translated this query
231
-
232
- CORRECT QUERY PATTERNS (FOLLOW THESE):
233
- - For field existence: Use has:field_name (NOT field_name IS NOT NULL)
234
- - For field absence: Use !has:field_name (NOT field_name IS NULL)
235
- - For time periods: Use timeRange parameter (NOT SQL date functions)
236
- - Example: "items processed yesterday" → query: "has:item.processed", timeRange: {"statsPeriod": "24h"}
237
-
238
- PROCESS:
239
- 1. Analyze the user's query
240
- 2. Determine appropriate dataset
241
- 3. Use datasetAttributes or replayFields to discover available fields
242
- 4. Use otelSemantics tool if needed for OpenTelemetry attributes
243
- 5. Construct the final query with proper fields, sort parameters, and replay environment when needed
244
- 6. For non-replay datasets, validateSearch the candidate and only return after it passes (or after you cannot fix it without weakening structured filters)
245
-
246
- COMMON ERRORS TO AVOID:
247
- - Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead
248
- - Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields
249
- - Using incorrect field names (use the otelSemantics tool to look up correct names)
250
- - Missing required fields in the fields array for aggregate queries
251
- - Invalid sort parameter not included in fields array
252
- - Putting replay environment filters inside the replay query instead of the separate environment field
253
- - For field existence: Use has:field_name (NOT field_name IS NOT NULL)
254
- - For field absence: Use !has:field_name (NOT field_name IS NULL)
255
- - For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;
256
- const BASE_COMMON_FIELDS = {
257
- project: "Project slug",
258
- timestamp: "When the event occurred",
259
- environment: "Deployment environment name (omit unless the user names one)",
260
- release: "Release version",
261
- platform: "Platform (javascript, python, etc.)",
262
- "user.id": "User ID",
263
- "user.email": "User email",
264
- "sdk.name": "SDK name",
265
- "sdk.version": "SDK version"
266
- };
267
- const NUMERIC_FIELDS = {
268
- spans: new Set([
269
- "span.duration",
270
- "span.self_time",
271
- "transaction.duration",
272
- "http.status_code",
273
- "gen_ai.usage.input_tokens",
274
- "gen_ai.usage.output_tokens",
275
- "gen_ai.request.max_tokens",
276
- "measurements.lcp",
277
- "measurements.cls",
278
- "measurements.inp",
279
- "measurements.fcp",
280
- "measurements.ttfb"
281
- ]),
282
- errors: new Set(["stack.lineno"]),
283
- logs: new Set(["severity_number", "sentry.observed_timestamp_nanos"]),
284
- tracemetrics: new Set([
285
- "value",
286
- "timestamp_precise",
287
- "observed_timestamp",
288
- "payload_size"
289
- ]),
290
- profiles: new Set(["profile.duration", "transaction.duration"])
291
- };
292
- const DATASET_FIELDS = {
293
- spans: {
294
- "span.op": "Span operation type (e.g., http.client, db.query, cache.get)",
295
- "span.description": "Detailed description of the span operation",
296
- "span.duration": "Duration of the span in milliseconds",
297
- "span.status": "Span status (ok, cancelled, unknown, etc.)",
298
- "span.self_time": "Time spent in this span excluding child spans",
299
- transaction: "Transaction name/route",
300
- "transaction.duration": "Total transaction duration in milliseconds",
301
- "transaction.op": "Transaction operation type",
302
- "transaction.status": "Transaction status",
303
- is_transaction: "Whether this span is a transaction (true/false)",
304
- trace: "Trace ID",
305
- "trace.span_id": "Span ID within the trace",
306
- "trace.parent_span_id": "Parent span ID",
307
- "http.method": "HTTP method (GET, POST, etc.)",
308
- "http.status_code": "HTTP response status code",
309
- "http.url": "Full HTTP URL",
310
- "db.system": "Database system (postgresql, mysql, etc.)",
311
- "db.operation": "Database operation (SELECT, INSERT, etc.)",
312
- "gen_ai.provider.name": "AI provider name (e.g., anthropic, openai)",
313
- "gen_ai.request.model": "Model name (e.g., claude-3-5-sonnet-20241022)",
314
- "gen_ai.operation.name": "Operation type (e.g., chat, completion)",
315
- "gen_ai.usage.input_tokens": "Number of input tokens (numeric)",
316
- "gen_ai.usage.output_tokens": "Number of output tokens (numeric)",
317
- "gen_ai.tool.name": "Tool name (e.g., search_issues, search_events)",
318
- "mcp.method.name": "MCP request or notification method",
319
- "mcp.protocol.version": "MCP protocol version",
320
- "mcp.resource.uri": "MCP resource URI",
321
- "mcp.session.id": "MCP session identifier",
322
- "measurements.lcp": "Largest Contentful Paint - time until largest content element is visible (ms). Good < 2500ms",
323
- "measurements.cls": "Cumulative Layout Shift - visual stability score (unitless). Good < 0.1",
324
- "measurements.inp": "Interaction to Next Paint - responsiveness to user input (ms). Good < 200ms",
325
- "measurements.fcp": "First Contentful Paint - time until first content is visible (ms). Good < 1800ms",
326
- "measurements.ttfb": "Time to First Byte - server response time (ms). Good < 800ms",
327
- "count()": "Count of spans",
328
- "count_unique(field)": "Count of unique values, e.g. count_unique(user.id)",
329
- "avg(field)": "Average of numeric field, e.g. avg(span.duration)",
330
- "sum(field)": "Sum of numeric field, e.g. sum(span.self_time)",
331
- "min(field)": "Minimum of numeric field, e.g. min(span.duration)",
332
- "max(field)": "Maximum of numeric field, e.g. max(span.duration)",
333
- "p50(field)": "50th percentile (median), e.g. p50(span.duration)",
334
- "p75(field)": "75th percentile - standard for performance analysis, e.g. p75(span.duration)",
335
- "p90(field)": "90th percentile, e.g. p90(span.duration)",
336
- "p95(field)": "95th percentile, e.g. p95(span.duration)",
337
- "p99(field)": "99th percentile, e.g. p99(span.duration)",
338
- "p100(field)": "100th percentile (max), e.g. p100(span.duration)",
339
- "epm()": "Events per minute rate",
340
- "failure_rate()": "Percentage of failed spans"
341
- },
342
- errors: {
343
- message: "Error message",
344
- level: "Error level (error, warning, info, debug)",
345
- "error.type": "Error type/exception class",
346
- "error.value": "Error value/description",
347
- "error.handled": "Whether the error was handled (true/false)",
348
- culprit: "Code location that caused the error",
349
- title: "Error title/grouping",
350
- "stack.filename": "File where error occurred",
351
- "stack.function": "Function where error occurred",
352
- "stack.module": "Module where error occurred",
353
- "stack.abs_path": "Absolute path to file",
354
- "os.name": "Operating system name",
355
- "browser.name": "Browser name",
356
- "device.family": "Device family",
357
- "count()": "Count of error events",
358
- "count_unique(field)": "Count of unique values, e.g. count_unique(user.id)",
359
- "count_if(field,equals,value)": "Conditional count, e.g. count_if(error.handled,equals,false)",
360
- "last_seen()": "Most recent timestamp of the group",
361
- "eps()": "Events per second rate",
362
- "epm()": "Events per minute rate"
363
- },
364
- logs: {
365
- message: "Log message",
366
- severity: "Log severity level (trace, debug, info, warn, error, fatal)",
367
- severity_number: "Numeric severity level",
368
- "sentry.item_id": "Sentry item ID",
369
- "sentry.observed_timestamp_nanos": "Observed timestamp in nanoseconds",
370
- trace: "Trace ID",
371
- "count()": "Count of log entries",
372
- "count_unique(field)": "Count of unique values, e.g. count_unique(user.id)",
373
- "avg(field)": "Average of numeric field, e.g. avg(severity_number)",
374
- "sum(field)": "Sum of numeric field",
375
- "min(field)": "Minimum of numeric field",
376
- "max(field)": "Maximum of numeric field",
377
- "p50(field)": "50th percentile (median)",
378
- "p75(field)": "75th percentile",
379
- "p90(field)": "90th percentile",
380
- "p95(field)": "95th percentile",
381
- "p99(field)": "99th percentile",
382
- "p100(field)": "100th percentile (max)",
383
- "epm()": "Events per minute rate"
384
- },
385
- tracemetrics: {
386
- "metric.name": "Metric name for the newer span metrics dataset",
387
- "metric.type": "Metric type (counter, gauge, distribution)",
388
- "metric.unit": "Metric unit if present (for example millisecond, byte, percent)",
389
- value: "Raw metric value (numeric)",
390
- trace: "Trace ID",
391
- span_id: "Span ID that emitted the metric",
392
- "trace.parent_span_id": "Parent span ID",
393
- timestamp: "When the metric sample occurred",
394
- timestamp_precise: "High precision timestamp (numeric)",
395
- observed_timestamp: "Observed timestamp (numeric)",
396
- "sum(value,metric.name,metric.type,metric.unit)": "Sum a specific metric, e.g. sum(value,request_count,counter,-)",
397
- "avg(value,metric.name,metric.type,metric.unit)": "Average a specific metric, e.g. avg(value,http.request.duration,distribution,millisecond)",
398
- "min(value,metric.name,metric.type,metric.unit)": "Minimum metric value for a specific metric",
399
- "max(value,metric.name,metric.type,metric.unit)": "Maximum metric value for a specific metric",
400
- "count(value,metric.name,metric.type,metric.unit)": "Count samples for a specific metric",
401
- "p50(value,metric.name,metric.type,metric.unit)": "Median for a distribution metric",
402
- "p75(value,metric.name,metric.type,metric.unit)": "75th percentile for a distribution metric",
403
- "p90(value,metric.name,metric.type,metric.unit)": "90th percentile for a distribution metric",
404
- "p95(value,metric.name,metric.type,metric.unit)": "95th percentile for a distribution metric",
405
- "p99(value,metric.name,metric.type,metric.unit)": "99th percentile for a distribution metric",
406
- "per_second(value,metric.name,metric.type,metric.unit)": "Per-second rate for a metric, typically counters",
407
- "per_minute(value,metric.name,metric.type,metric.unit)": "Per-minute rate for a metric, typically counters"
408
- },
409
- profiles: {
410
- "profile.id": "Transaction profile ID for a specific captured profile",
411
- "profiler.id": "Continuous profiler session ID for chunk-based profile captures",
412
- "thread.id": "Thread ID associated with a continuous profile result when available",
413
- timestamp: "When the profile was captured",
414
- transaction: "Transaction name associated with the profile when available",
415
- trace: "Trace ID linked to the profiled transaction",
416
- release: "Release version associated with the profile",
417
- environment: "Environment for the profile",
418
- project: "Project slug",
419
- "project.name": "Project name",
420
- "platform.name": "Runtime or SDK platform name",
421
- "device.model": "Device model for mobile or device-bound profiles",
422
- "device.classification": "Device performance classification",
423
- "device.arch": "Device architecture",
424
- "profile.duration": "Total profile duration in nanoseconds for a captured profile",
425
- "transaction.duration": "Transaction duration represented by the profile in nanoseconds",
426
- "precise.start_ts": "Continuous profile precise start timestamp when available",
427
- "precise.finish_ts": "Continuous profile precise finish timestamp when available",
428
- "count()": "Count of matching profiles",
429
- "last_seen()": "Most recent timestamp of the matching profile group",
430
- "p50()": "Median profile duration for the selected grouping",
431
- "p75()": "75th percentile profile duration",
432
- "p95()": "95th percentile profile duration",
433
- "p99()": "99th percentile profile duration"
434
- }
435
- };
436
- const DATASET_EXAMPLES = {
437
- spans: [
438
- {
439
- description: "web vitals performance problems",
440
- output: {
441
- query: "has:measurements.lcp",
442
- fields: [
443
- "transaction",
444
- "p75(measurements.lcp)",
445
- "p75(measurements.cls)",
446
- "p75(measurements.inp)",
447
- "count()"
448
- ],
449
- sort: "-p75(measurements.lcp)"
450
- }
451
- },
452
- {
453
- description: "slowest database queries",
454
- output: {
455
- query: "has:db.statement",
456
- fields: [
457
- "db.system",
458
- "db.statement",
459
- "count()",
460
- "p75(span.duration)",
461
- "p95(span.duration)"
462
- ],
463
- sort: "-p75(span.duration)"
464
- }
465
- },
466
- {
467
- description: "total request duration by endpoint (transaction boundaries)",
468
- output: {
469
- query: "is_transaction:true",
470
- fields: [
471
- "transaction",
472
- "count()",
473
- "avg(span.duration)",
474
- "p95(span.duration)"
475
- ],
476
- sort: "-avg(span.duration)"
477
- }
478
- },
479
- {
480
- description: "slow API calls over 5 seconds",
481
- output: {
482
- query: "has:request.url AND span.duration:>5000",
483
- fields: [
484
- "span.op",
485
- "span.description",
486
- "span.duration",
487
- "transaction",
488
- "timestamp",
489
- "trace"
490
- ],
491
- sort: "-span.duration"
492
- }
493
- },
494
- {
495
- description: "token usage by AI model",
496
- output: {
497
- query: "has:gen_ai.usage.input_tokens",
498
- fields: [
499
- "gen_ai.request.model",
500
- "sum(gen_ai.usage.input_tokens)",
501
- "sum(gen_ai.usage.output_tokens)",
502
- "count()"
503
- ],
504
- sort: "-sum(gen_ai.usage.input_tokens)"
505
- }
506
- },
507
- {
508
- description: "top MCP tool calls by usage",
509
- output: {
510
- query: "has:gen_ai.tool.name",
511
- fields: ["gen_ai.tool.name", "count()"],
512
- sort: "-count()"
513
- }
514
- },
515
- {
516
- description: "HTTP requests by user agent",
517
- output: {
518
- query: "has:http.method AND has:user_agent.original",
519
- fields: [
520
- "user_agent.original",
521
- "count()",
522
- "avg(span.duration)"
523
- ],
524
- sort: "-count()"
525
- }
526
- },
527
- {
528
- description: "frontend performance overview",
529
- output: {
530
- query: "has:measurements.lcp",
531
- fields: [
532
- "transaction",
533
- "p75(span.duration)",
534
- "p75(measurements.lcp)",
535
- "p75(measurements.fcp)",
536
- "p75(measurements.ttfb)",
537
- "count()"
538
- ],
539
- sort: "-p75(span.duration)"
540
- }
541
- }
542
- ],
543
- errors: [
544
- {
545
- description: "unhandled errors in production",
546
- output: {
547
- query: "error.handled:false AND environment:production",
548
- fields: [
549
- "issue",
550
- "title",
551
- "timestamp",
552
- "message",
553
- "error.type",
554
- "culprit"
555
- ],
556
- sort: "-timestamp"
557
- }
558
- },
559
- {
560
- description: "count errors by type",
561
- output: {
562
- query: "level:error",
563
- fields: [
564
- "error.type",
565
- "count()",
566
- "last_seen()"
567
- ],
568
- sort: "-count()"
569
- }
570
- },
571
- {
572
- description: "errors in specific file",
573
- output: {
574
- query: "stack.filename:\"**/Button.tsx\"",
575
- fields: [
576
- "issue",
577
- "title",
578
- "timestamp",
579
- "message",
580
- "stack.filename"
581
- ],
582
- sort: "-timestamp"
583
- }
584
- },
585
- {
586
- description: "most common errors",
587
- output: {
588
- query: "",
589
- fields: ["title", "count()"],
590
- sort: "-count()"
591
- }
592
- },
593
- {
594
- description: "unique users affected by errors",
595
- output: {
596
- query: "level:error",
597
- fields: [
598
- "error.type",
599
- "count()",
600
- "count_unique(user.id)"
601
- ],
602
- sort: "-count_unique(user.id)"
603
- }
604
- },
605
- {
606
- description: "errors by browser/user agent",
607
- output: {
608
- query: "level:error AND has:user_agent.original",
609
- fields: [
610
- "user_agent.original",
611
- "count()",
612
- "count_unique(user.id)"
613
- ],
614
- sort: "-count()"
615
- }
616
- }
617
- ],
618
- logs: [
619
- {
620
- description: "error logs about database",
621
- output: {
622
- query: "severity:error AND message:\"*database*\"",
623
- fields: [
624
- "timestamp",
625
- "message",
626
- "severity",
627
- "trace"
628
- ],
629
- sort: "-timestamp"
630
- }
631
- },
632
- {
633
- description: "count logs by severity",
634
- output: {
635
- query: "",
636
- fields: ["severity", "count()"],
637
- sort: "-count()"
638
- }
639
- },
640
- {
641
- description: "most common log messages",
642
- output: {
643
- query: "",
644
- fields: ["message", "count()"],
645
- sort: "-count()"
646
- }
647
- },
648
- {
649
- description: "log volume by project",
650
- output: {
651
- query: "",
652
- fields: [
653
- "project",
654
- "count()",
655
- "epm()"
656
- ],
657
- sort: "-count()"
658
- }
659
- },
660
- {
661
- description: "warning logs about memory",
662
- output: {
663
- query: "severity:warn AND message:\"*memory*\"",
664
- fields: [
665
- "timestamp",
666
- "message",
667
- "severity",
668
- "trace"
669
- ],
670
- sort: "-timestamp"
671
- }
672
- }
673
- ],
674
- tracemetrics: [
675
- {
676
- description: "request duration percentiles by route",
677
- output: {
678
- query: "",
679
- fields: [
680
- "transaction",
681
- "p75(value,http.request.duration,distribution,millisecond)",
682
- "p95(value,http.request.duration,distribution,millisecond)",
683
- "count(value,http.request.duration,distribution,millisecond)"
684
- ],
685
- sort: "-p95(value,http.request.duration,distribution,millisecond)"
686
- }
687
- },
688
- {
689
- description: "throughput by endpoint from a counter metric",
690
- output: {
691
- query: "",
692
- fields: ["transaction", "per_minute(value,http.server.request.count,counter,-)"],
693
- sort: "-per_minute(value,http.server.request.count,counter,-)"
694
- }
695
- },
696
- {
697
- description: "latest samples for a specific metric",
698
- output: {
699
- query: "metric.name:http.request.duration AND metric.type:distribution",
700
- fields: [
701
- "timestamp",
702
- "project",
703
- "metric.name",
704
- "metric.type",
705
- "metric.unit",
706
- "value",
707
- "trace"
708
- ],
709
- sort: "-timestamp"
710
- }
711
- },
712
- {
713
- description: "largest payload size metrics",
714
- output: {
715
- query: "metric.name:payload.size",
716
- fields: [
717
- "project",
718
- "max(value,payload.size,gauge,byte)",
719
- "avg(value,payload.size,gauge,byte)"
720
- ],
721
- sort: "-max(value,payload.size,gauge,byte)"
722
- }
723
- },
724
- {
725
- description: "metric value grouped by environment",
726
- output: {
727
- query: "metric.name:http.request.duration AND metric.type:distribution",
728
- fields: [
729
- "environment",
730
- "avg(value,http.request.duration,distribution,millisecond)",
731
- "count(value,http.request.duration,distribution,millisecond)"
732
- ],
733
- sort: "-avg(value,http.request.duration,distribution,millisecond)"
734
- }
735
- }
736
- ],
737
- profiles: [
738
- {
739
- description: "latest profiles for a transaction",
740
- output: {
741
- query: "transaction:/api/users",
742
- fields: [
743
- "project",
744
- "profile.id",
745
- "timestamp",
746
- "transaction",
747
- "transaction.duration",
748
- "release",
749
- "trace"
750
- ],
751
- sort: "-timestamp"
752
- }
753
- },
754
- {
755
- description: "count profiles by release",
756
- output: {
757
- query: "",
758
- fields: [
759
- "release",
760
- "count()",
761
- "last_seen()"
762
- ],
763
- sort: "-count()"
764
- }
765
- },
766
- {
767
- description: "slowest profiled transactions",
768
- output: {
769
- query: "",
770
- fields: [
771
- "transaction",
772
- "p95()",
773
- "count()"
774
- ],
775
- sort: "-p95()"
776
- }
777
- },
778
- {
779
- description: "continuous profiles for a profiler session",
780
- output: {
781
- query: "profiler.id:041bde57b9844e36b8b7e5734efae5f7",
782
- fields: [
783
- "project",
784
- "profiler.id",
785
- "thread.id",
786
- "timestamp",
787
- "precise.start_ts",
788
- "precise.finish_ts",
789
- "release"
790
- ],
791
- sort: "-timestamp"
792
- }
793
- },
794
- {
795
- description: "profiles grouped by environment",
796
- output: {
797
- query: "",
798
- fields: [
799
- "environment",
800
- "count()",
801
- "p95()"
802
- ],
803
- sort: "-count()"
804
- }
805
- }
806
- ]
807
- };
808
- const RECOMMENDED_FIELDS = {
809
- errors: {
810
- basic: [
811
- "issue",
812
- "title",
813
- "project",
814
- "timestamp",
815
- "level",
816
- "message",
817
- "error.type",
818
- "culprit",
819
- "user.email",
820
- "user.id"
821
- ],
822
- description: "Basic error information including issue ID, title, timestamp, severity, and location"
823
- },
824
- logs: {
825
- basic: [
826
- "timestamp",
827
- "project",
828
- "message",
829
- "severity",
830
- "trace"
831
- ],
832
- description: "Essential log entry information"
833
- },
834
- spans: {
835
- basic: [
836
- "id",
837
- "span.op",
838
- "span.description",
839
- "span.duration",
840
- "transaction",
841
- "timestamp",
842
- "project",
843
- "trace"
844
- ],
845
- description: "Core span/trace information including span ID, operation, duration, and trace context"
846
- },
847
- tracemetrics: {
848
- basic: [
849
- "id",
850
- "timestamp",
851
- "project",
852
- "trace",
853
- "metric.name",
854
- "metric.type",
855
- "metric.unit",
856
- "value"
857
- ],
858
- description: "Core trace metric sample information including metric identity, value, and trace context"
859
- },
860
- profiles: {
861
- basic: [
862
- "project",
863
- "profile.id",
864
- "profiler.id",
865
- "thread.id",
866
- "timestamp",
867
- "transaction",
868
- "transaction.duration",
869
- "release",
870
- "environment",
871
- "trace",
872
- "precise.start_ts",
873
- "precise.finish_ts"
874
- ],
875
- description: "Core profiling information including profile identifiers, transaction context, timing, and trace linkage"
876
- }
877
- };
878
- const TRACE_METRICS_SAMPLE_IDENTITY_FIELDS = [
879
- "metric.name",
880
- "metric.type",
881
- "metric.unit"
882
- ];
883
-
884
- //#endregion
885
- export { BASE_COMMON_FIELDS, DATASET_EXAMPLES, DATASET_FIELDS, NUMERIC_FIELDS, RECOMMENDED_FIELDS, TRACE_METRICS_SAMPLE_IDENTITY_FIELDS, systemPrompt };
886
- //# sourceMappingURL=config-40SaJWzQ-Dz27jdMQ.js.map