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