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rE+uB,EAAM,qDAEC/uB,EAAM,YAAc,WAC7B+uB,EAAM,sBACFC,GAAqBhvB,EAAM,KAAK,GAClC+uB,EAAM,iDAEC/uB,EAAM,YAAc,UAC7B+uB,EAAM,yBAIV,MAAkB,iCAAkCA,CAAK,CAC3D,OAASrrB,EAAP,CACA,QAAQ,MAAM,kCAAmCA,CAAK,CACxD,CACF,EAEMsrB,GAAwBlvB,IACpB,MAAM,QAAQA,CAAG,EAAIA,EAAM,CAACA,CAAG,GAAG,KAAMC,MAAM,MAAe,EAAE,iBAAiBA,CAAC,CAAC,EC/E/E,GAAS,IAAI,KAAiBkP,EAAe,EACvD,eAAe+c,EAAe,EAC9B,gBAAgBmC,EAAY,EAC5B,mBAAmB1tB,EAAU,KAGhC,MAAa,EAAE,UAA4C,KAAsBiuB,EAAwB,C","sources":["webpack://grafana/./node_modules/@grafana/experimental/dist/esm/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js","webpack://grafana/./packages/grafana-o11y-ds-frontend/src/NodeGraph/NodeGraphSettings.tsx","webpack://grafana/./packages/grafana-o11y-ds-frontend/src/TraceToMetrics/TraceToMetricsSettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/CheatSheet.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/loki/languageUtils.ts","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/loki/monaco-query-field/MonacoQueryFieldLazy.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/loki/monaco-query-field/MonacoQueryFieldWrapper.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/loki/LokiQueryField.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/utils.ts","webpack://grafana/./public/app/plugins/datasource/tempo/LokiSearch.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/actions/types/appNotifications.ts","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/actions/appNotification.ts","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/core/errors.ts","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/core/appNotification.ts","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/store.ts","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/traceql.ts","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/utils.ts","webpack://grafana/./public/app/plugins/datasource/tempo/VariableQueryEditor.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/language_provider.ts","webpack://grafana/./public/app/plugins/datasource/tempo/metricsSummary.ts","webpack://grafana/./public/app/plugins/datasource/tempo/streaming.ts","webpack://grafana/./public/app/plugins/datasource/tempo/variables.ts","webpack://grafana/./public/app/plugins/datasource/tempo/datasource.ts","webpack://grafana/./public/app/plugins/datasource/tempo/NativeSearch/TagsField/autocomplete.ts","webpack://grafana/./public/app/plugins/datasource/tempo/NativeSearch/TagsField/syntax.ts","webpack://grafana/./public/app/plugins/datasource/tempo/NativeSearch/TagsField/TagsField.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/NativeSearch/NativeSearch.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/QueryOptionGroup.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/TempoQueryBuilderOptions.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/DurationInput.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/InlineSearchField.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/GroupByField.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/SearchField.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/TagsInput.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/SearchTraceQLEditor/TraceQLSearch.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/AdHocFilterKey.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/AdHocFilterValue.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/OperatorSegment.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/AdHocFilterRenderer.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/AdHocFilterBuilder.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/ConditionSegment.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/_importedDependencies/components/AdHocFilter/AdHocFilter.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/ServiceGraphSection.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/types.ts","webpack://grafana/./packages/grafana-o11y-ds-frontend/src/TemporaryAlert.tsx","webpack://grafana/./node_modules/@grafana/lezer-traceql/index.es.js","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/situation.ts","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/autocomplete.ts","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/highlighting.ts","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/TraceQLEditor.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/traceql/QueryEditor.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/QueryField.tsx","webpack://grafana/./packages/grafana-o11y-ds-frontend/src/pyroscope/ProfileTypesCascader.tsx","webpack://grafana/./packages/grafana-o11y-ds-frontend/src/TraceToProfiles/TraceToProfilesSettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/QuerySettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/LokiSearchSettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/ServiceGraphSettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/TraceQLSearchTags.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/TraceQLSearchSettings.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx","webpack://grafana/./public/app/plugins/datasource/tempo/tracking.ts","webpack://grafana/./public/app/plugins/datasource/tempo/module.ts"],"sourcesContent":["import React__default from 'react';\nimport { css, cx } from '@emotion/css';\nimport { InlineField, TagsInput, Input } from '@grafana/ui';\nimport { ConfigSubSection } from '../ConfigSection/ConfigSubSection.js';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst AdvancedHttpSettings = ({\n config,\n onChange,\n className\n}) => {\n const onCookiesChange = (cookies) => {\n onChange(__spreadProps(__spreadValues({}, config), {\n jsonData: __spreadProps(__spreadValues({}, config.jsonData), {\n keepCookies: cookies\n })\n }));\n };\n const onTimeoutChange = (event) => {\n onChange(__spreadProps(__spreadValues({}, config), {\n jsonData: __spreadProps(__spreadValues({}, config.jsonData), {\n timeout: parseInt(event.currentTarget.value, 10)\n })\n }));\n };\n const styles = {\n container: css({\n maxWidth: 578\n })\n };\n return /* @__PURE__ */ React__default.createElement(ConfigSubSection, { title: \"Advanced HTTP settings\", className: cx(styles.container, className) }, /* @__PURE__ */ React__default.createElement(\n InlineField,\n {\n htmlFor: \"advanced-http-cookies\",\n label: \"Allowed cookies\",\n labelWidth: 24,\n tooltip: \"Grafana proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source.\",\n disabled: config.readOnly,\n grow: true\n },\n /* @__PURE__ */ React__default.createElement(\n TagsInput,\n {\n id: \"advanced-http-cookies\",\n placeholder: \"New cookie (hit enter to add)\",\n tags: config.jsonData.keepCookies,\n onChange: onCookiesChange\n }\n )\n ), /* @__PURE__ */ React__default.createElement(\n InlineField,\n {\n htmlFor: \"advanced-http-timeout\",\n label: \"Timeout\",\n labelWidth: 24,\n tooltip: \"HTTP request timeout in seconds\",\n disabled: config.readOnly,\n grow: true\n },\n /* @__PURE__ */ React__default.createElement(\n Input,\n {\n id: \"advanced-http-timeout\",\n type: \"number\",\n min: 0,\n placeholder: \"Timeout in seconds\",\n \"aria-label\": \"Timeout in seconds\",\n value: config.jsonData.timeout,\n onChange: onTimeoutChange\n }\n )\n ));\n};\n\nexport { AdvancedHttpSettings };\n//# sourceMappingURL=AdvancedHttpSettings.js.map\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport {\n DataSourceJsonData,\n DataSourcePluginOptionsEditorProps,\n GrafanaTheme2,\n updateDatasourcePluginJsonDataOption,\n} from '@grafana/data';\nimport { ConfigDescriptionLink, ConfigSubSection } from '@grafana/experimental';\nimport { InlineField, InlineFieldRow, InlineSwitch, useStyles2 } from '@grafana/ui';\n\nexport interface NodeGraphOptions {\n enabled?: boolean;\n}\n\nexport interface NodeGraphData extends DataSourceJsonData {\n nodeGraph?: NodeGraphOptions;\n}\n\ninterface Props extends DataSourcePluginOptionsEditorProps<NodeGraphData> {}\n\nexport function NodeGraphSettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles.container}>\n <InlineFieldRow className={styles.row}>\n <InlineField\n tooltip=\"Displays the node graph above the trace view. Default: disabled\"\n label=\"Enable node graph\"\n labelWidth={26}\n >\n <InlineSwitch\n id=\"enableNodeGraph\"\n value={options.jsonData.nodeGraph?.enabled}\n onChange={(event: React.SyntheticEvent<HTMLInputElement>) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'nodeGraph', {\n ...options.jsonData.nodeGraph,\n enabled: event.currentTarget.checked,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n </div>\n );\n}\n\nexport const NodeGraphSection = ({ options, onOptionsChange }: DataSourcePluginOptionsEditorProps) => {\n let suffix = options.type;\n suffix += options.type === 'tempo' ? '/configure-tempo-data-source/#node-graph' : '/#node-graph';\n\n return (\n <ConfigSubSection\n title=\"Node graph\"\n description={\n <ConfigDescriptionLink\n description=\"Show or hide the node graph visualization.\"\n suffix={suffix}\n feature=\"the node graph\"\n />\n }\n >\n <NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSubSection>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n infoText: css({\n label: 'infoText',\n paddingBottom: theme.spacing(2),\n color: theme.colors.text.secondary,\n }),\n container: css({\n label: 'container',\n width: '100%',\n }),\n row: css({\n label: 'row',\n alignItems: 'baseline',\n }),\n});\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport {\n DataSourceInstanceSettings,\n DataSourceJsonData,\n DataSourcePluginOptionsEditorProps,\n GrafanaTheme2,\n updateDatasourcePluginJsonDataOption,\n} from '@grafana/data';\nimport { ConfigDescriptionLink, ConfigSection } from '@grafana/experimental';\nimport { DataSourcePicker } from '@grafana/runtime';\nimport { Button, InlineField, InlineFieldRow, Input, useStyles2 } from '@grafana/ui';\n\nimport { IntervalInput } from '../IntervalInput/IntervalInput';\nimport { TagMappingInput } from '../TraceToLogs/TagMappingInput';\nimport { getTimeShiftLabel, getTimeShiftTooltip, invalidTimeShiftError } from '../TraceToLogs/TraceToLogsSettings';\n\nexport interface TraceToMetricsOptions {\n datasourceUid?: string;\n tags?: Array<{ key: string; value: string }>;\n queries: TraceToMetricQuery[];\n spanStartTimeShift?: string;\n spanEndTimeShift?: string;\n}\n\nexport interface TraceToMetricQuery {\n name?: string;\n query?: string;\n}\n\nexport interface TraceToMetricsData extends DataSourceJsonData {\n tracesToMetrics?: TraceToMetricsOptions;\n}\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TraceToMetricsData> {}\n\nexport function TraceToMetricsSettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n\n return (\n <div className={css({ width: '100%' })}>\n <InlineFieldRow className={styles.row}>\n <InlineField\n tooltip=\"The Prometheus data source the trace is going to navigate to\"\n label=\"Data source\"\n labelWidth={26}\n >\n <DataSourcePicker\n inputId=\"trace-to-metrics-data-source-picker\"\n pluginId=\"prometheus\"\n current={options.jsonData.tracesToMetrics?.datasourceUid}\n noDefault={true}\n width={40}\n onChange={(ds: DataSourceInstanceSettings) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n datasourceUid: ds.uid,\n })\n }\n />\n </InlineField>\n {options.jsonData.tracesToMetrics?.datasourceUid ? (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n fill=\"text\"\n onClick={() => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n datasourceUid: undefined,\n });\n }}\n >\n Clear\n </Button>\n ) : null}\n </InlineFieldRow>\n\n <InlineFieldRow>\n <IntervalInput\n label={getTimeShiftLabel('start')}\n tooltip={getTimeShiftTooltip('start', '-2m')}\n value={options.jsonData.tracesToMetrics?.spanStartTimeShift || ''}\n onChange={(val) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n spanStartTimeShift: val,\n });\n }}\n placeholder={'-2m'}\n isInvalidError={invalidTimeShiftError}\n />\n </InlineFieldRow>\n\n <InlineFieldRow>\n <IntervalInput\n label={getTimeShiftLabel('end')}\n tooltip={getTimeShiftTooltip('end', '2m')}\n value={options.jsonData.tracesToMetrics?.spanEndTimeShift || ''}\n onChange={(val) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n spanEndTimeShift: val,\n });\n }}\n placeholder={'2m'}\n isInvalidError={invalidTimeShiftError}\n />\n </InlineFieldRow>\n\n <InlineFieldRow>\n <InlineField tooltip=\"Tags that will be used in the metrics query\" label=\"Tags\" labelWidth={26}>\n <TagMappingInput\n values={options.jsonData.tracesToMetrics?.tags ?? []}\n onChange={(v) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n tags: v,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n\n {options.jsonData.tracesToMetrics?.queries?.map((query, i) => (\n <div key={i} className={styles.queryRow}>\n <InlineField label=\"Link Label\" labelWidth={26} tooltip=\"Descriptive label for the linked query\">\n <Input\n label=\"Link Label\"\n type=\"text\"\n allowFullScreen\n value={query.name}\n width={40}\n onChange={(e) => {\n const newQueries = (options.jsonData.tracesToMetrics?.queries ?? []).map(\n (traceToMetricQuery, index) => {\n return index === i ? { ...traceToMetricQuery, name: e.currentTarget.value } : traceToMetricQuery;\n }\n );\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n queries: newQueries,\n });\n }}\n />\n </InlineField>\n <InlineField\n label=\"Query\"\n labelWidth={10}\n tooltip=\"The Prometheus query that will run when navigating from a trace to metrics. Interpolate tags using the `$__tags` keyword\"\n grow\n >\n <Input\n label=\"Query\"\n type=\"text\"\n allowFullScreen\n value={query.query}\n onChange={(e) => {\n const updatedQueries = (options.jsonData.tracesToMetrics?.queries ?? []).map(\n (traceToMetricQuery, index) => {\n return index === i ? { ...traceToMetricQuery, query: e.currentTarget.value } : traceToMetricQuery;\n }\n );\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n queries: updatedQueries,\n });\n }}\n />\n </InlineField>\n\n <Button\n variant=\"destructive\"\n title=\"Remove query\"\n icon=\"times\"\n type=\"button\"\n onClick={() => {\n const newQueries = options.jsonData.tracesToMetrics?.queries.filter((_, index) => index !== i);\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n queries: newQueries,\n });\n }}\n />\n </div>\n ))}\n\n <Button\n variant=\"secondary\"\n title=\"Add query\"\n icon=\"plus\"\n type=\"button\"\n onClick={() => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {\n ...options.jsonData.tracesToMetrics,\n queries: [...(options.jsonData.tracesToMetrics?.queries ?? []), { query: '' }],\n });\n }}\n >\n Add query\n </Button>\n </div>\n );\n}\n\nexport const TraceToMetricsSection = ({ options, onOptionsChange }: DataSourcePluginOptionsEditorProps) => {\n let suffix = options.type;\n suffix += options.type === 'tempo' ? '/configure-tempo-data-source/#trace-to-metrics' : '/#trace-to-metrics';\n\n return (\n <ConfigSection\n title=\"Trace to metrics\"\n description={\n <ConfigDescriptionLink\n description=\"Navigate from a trace span to the selected data source's metrics.\"\n suffix={suffix}\n feature=\"trace to metrics\"\n />\n }\n isCollapsible={true}\n isInitiallyOpen={true}\n >\n <TraceToMetricsSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSection>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n infoText: {\n paddingBottom: theme.spacing(2),\n color: theme.colors.text.secondary,\n },\n row: css({\n label: 'row',\n alignItems: 'baseline',\n }),\n queryRow: css({\n label: 'queryRow',\n display: 'flex',\n flexFlow: 'wrap',\n }),\n});\n","import React from 'react';\n\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { TextLink } from '@grafana/ui';\n\nexport default function CheatSheet() {\n reportInteraction('grafana_traces_cheatsheet_clicked', {\n datasourceType: 'tempo',\n grafana_version: config.buildInfo.version,\n });\n\n return (\n <>\n <h2>Tempo Cheat Sheet</h2>\n <p>\n <TextLink href={'https://grafana.com/docs/tempo/latest/'} external={true}>\n Grafana Tempo\n </TextLink>{' '}\n is an open source, easy-to-use, and high-volume distributed tracing backend.\n </p>\n <p>\n Tempo implements{' '}\n <TextLink href={'https://grafana.com/docs/tempo/latest/traceql'} external={true}>\n TraceQL\n </TextLink>\n , a traces-first query language inspired by LogQL and PromQL. This query language allows users to precisely and\n easily select spans and jump directly to the spans fulfilling the specified conditions.\n </p>\n <p>\n You can compose TraceQL queries using either the Search tab (the TraceQL query builder) or the TraceQL tab (the\n TraceQL query editor). Both of these methods let you build queries and drill-down into result sets. (\n <TextLink href={'https://grafana.com/docs/grafana/latest/datasources/tempo/query-editor/'} external={true}>\n Learn more\n </TextLink>\n )\n </p>\n </>\n );\n}\n","import { TimeRange } from '@grafana/data';\n\nfunction roundMsToMin(milliseconds: number): number {\n return roundSecToMin(milliseconds / 1000);\n}\n\nfunction roundSecToMin(seconds: number): number {\n return Math.floor(seconds / 60);\n}\n\nexport function shouldRefreshLabels(range?: TimeRange, prevRange?: TimeRange): boolean {\n if (range && prevRange) {\n const sameMinuteFrom = roundMsToMin(range.from.valueOf()) === roundMsToMin(prevRange.from.valueOf());\n const sameMinuteTo = roundMsToMin(range.to.valueOf()) === roundMsToMin(prevRange.to.valueOf());\n // If both are same, don't need to refresh\n return !(sameMinuteFrom && sameMinuteTo);\n }\n return false;\n}\n\n// Loki regular-expressions use the RE2 syntax (https://github.com/google/re2/wiki/Syntax),\n// so every character that matches something in that list has to be escaped.\n// the list of meta characters is: *+?()|\\.[]{}^$\n// we make a javascript regular expression that matches those characters:\nconst RE2_METACHARACTERS = /[*+?()|\\\\.\\[\\]{}^$]/g;\nfunction escapeLokiRegexp(value: string): string {\n return value.replace(RE2_METACHARACTERS, '\\\\$&');\n}\n\n// based on the openmetrics-documentation, the 3 symbols we have to handle are:\n// - \\n ... the newline character\n// - \\ ... the backslash character\n// - \" ... the double-quote character\nexport function escapeLabelValueInExactSelector(labelValue: string): string {\n return labelValue.replace(/\\\\/g, '\\\\\\\\').replace(/\\n/g, '\\\\n').replace(/\"/g, '\\\\\"');\n}\n\nexport function unescapeLabelValue(labelValue: string): string {\n return labelValue.replace(/\\\\n/g, '\\n').replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, '\\\\');\n}\n\nexport function escapeLabelValueInRegexSelector(labelValue: string): string {\n return escapeLabelValueInExactSelector(escapeLokiRegexp(labelValue));\n}\n\nexport function escapeLabelValueInSelector(labelValue: string, selector?: string): string {\n return isRegexSelector(selector)\n ? escapeLabelValueInRegexSelector(labelValue)\n : escapeLabelValueInExactSelector(labelValue);\n}\n\nexport function isRegexSelector(selector?: string) {\n if (selector && (selector.includes('=~') || selector.includes('!~'))) {\n return true;\n }\n return false;\n}\n\nexport function isBytesString(string: string) {\n const BYTES_KEYWORDS = [\n 'b',\n 'kib',\n 'Kib',\n 'kb',\n 'KB',\n 'mib',\n 'Mib',\n 'mb',\n 'MB',\n 'gib',\n 'Gib',\n 'gb',\n 'GB',\n 'tib',\n 'Tib',\n 'tb',\n 'TB',\n 'pib',\n 'Pib',\n 'pb',\n 'PB',\n 'eib',\n 'Eib',\n 'eb',\n 'EB',\n ];\n const regex = new RegExp(`^(?:-?\\\\d+(?:\\\\.\\\\d+)?)(?:${BYTES_KEYWORDS.join('|')})$`);\n const match = string.match(regex);\n return !!match;\n}\n","import React, { Suspense } from 'react';\n\nimport { Props } from './MonacoQueryFieldProps';\n\nconst Field = React.lazy(() => import(/* webpackChunkName: \"loki-query-field\" */ './MonacoQueryField'));\n\nexport const MonacoQueryFieldLazy = (props: Props) => {\n return (\n <Suspense fallback={null}>\n <Field {...props} />\n </Suspense>\n );\n};\n","import React, { useRef } from 'react';\n\nimport { MonacoQueryFieldLazy } from './MonacoQueryFieldLazy';\nimport { Props as MonacoProps } from './MonacoQueryFieldProps';\n\nexport type Props = Omit<MonacoProps, 'onRunQuery' | 'onBlur'> & {\n onChange: (query: string) => void;\n onRunQuery: () => void;\n onQueryType?: (query: string) => void;\n};\n\nexport const MonacoQueryFieldWrapper = (props: Props) => {\n const lastRunValueRef = useRef<string | null>(null);\n const { onRunQuery, onChange, ...rest } = props;\n\n const handleRunQuery = (value: string) => {\n lastRunValueRef.current = value;\n onChange(value);\n onRunQuery();\n };\n\n const handleBlur = (value: string) => {\n onChange(value);\n };\n\n return <MonacoQueryFieldLazy onRunQuery={handleRunQuery} onBlur={handleBlur} onChange={onChange} {...rest} />;\n};\n","import React, { ReactNode } from 'react';\n\nimport { QueryEditorProps } from '@grafana/data';\n\nimport { shouldRefreshLabels } from './languageUtils';\nimport { MonacoQueryFieldWrapper } from './monaco-query-field/MonacoQueryFieldWrapper';\nimport { LokiQuery, LokiOptions, LokiDatasource } from './types';\n\nexport interface LokiQueryFieldProps extends QueryEditorProps<LokiDatasource, LokiQuery, LokiOptions> {\n ExtraFieldElement?: ReactNode;\n placeholder?: string;\n 'data-testid'?: string;\n}\n\ninterface LokiQueryFieldState {\n labelsLoaded: boolean;\n}\n\nexport class LokiQueryField extends React.PureComponent<LokiQueryFieldProps, LokiQueryFieldState> {\n _isMounted = false;\n\n constructor(props: LokiQueryFieldProps) {\n super(props);\n\n this.state = { labelsLoaded: false };\n }\n\n async componentDidMount() {\n this._isMounted = true;\n await this.props.datasource.languageProvider.start();\n if (this._isMounted) {\n this.setState({ labelsLoaded: true });\n }\n }\n\n componentWillUnmount() {\n this._isMounted = false;\n }\n\n componentDidUpdate(prevProps: LokiQueryFieldProps) {\n const {\n range,\n datasource: { languageProvider },\n } = this.props;\n const refreshLabels = shouldRefreshLabels(range, prevProps.range);\n // We want to refresh labels when range changes (we round up intervals to a minute)\n if (refreshLabels) {\n languageProvider.fetchLabels();\n }\n }\n\n onChangeQuery = (value: string, override?: boolean) => {\n // Send text change to parent\n const { query, onChange, onRunQuery } = this.props;\n if (onChange) {\n const nextQuery = { ...query, expr: value };\n onChange(nextQuery);\n\n if (override && onRunQuery) {\n onRunQuery();\n }\n }\n };\n\n render() {\n const { ExtraFieldElement, query, datasource, history, onRunQuery } = this.props;\n const placeholder = this.props.placeholder ?? 'Enter a Loki query (run with Shift+Enter)';\n\n return (\n <>\n <div\n className=\"gf-form-inline gf-form-inline--xs-view-flex-column flex-grow-1\"\n data-testid={this.props['data-testid']}\n >\n <div className=\"gf-form--grow flex-shrink-1 min-width-15\">\n <MonacoQueryFieldWrapper\n datasource={datasource}\n history={history ?? []}\n onChange={this.onChangeQuery}\n onRunQuery={onRunQuery}\n initialValue={query.expr ?? ''}\n placeholder={placeholder}\n />\n </div>\n </div>\n {ExtraFieldElement}\n </>\n );\n }\n}\n","import { DataSourceApi } from '@grafana/data';\nimport { getDataSourceSrv } from '@grafana/runtime';\n\nexport const getErrorMessage = (message: string | undefined, prefix?: string) => {\n const err = message ? ` (${message})` : '';\n let errPrefix = prefix ? prefix : 'Error';\n return `${errPrefix}${err}. Please check the server logs for more details.`;\n};\n\nexport async function getDS(uid?: string): Promise<DataSourceApi | undefined> {\n if (!uid) {\n return undefined;\n }\n\n const dsSrv = getDataSourceSrv();\n try {\n return await dsSrv.get(uid);\n } catch (error) {\n console.error('Failed to load data source', error);\n return undefined;\n }\n}\n","import React from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { InlineLabel } from '@grafana/ui';\n\nimport { LokiQueryField } from './_importedDependencies/datasources/loki/LokiQueryField';\nimport { LokiDatasource, LokiQuery } from './_importedDependencies/datasources/loki/types';\nimport { TempoQuery } from './types';\nimport { getDS } from './utils';\n\ninterface LokiSearchProps {\n logsDatasourceUid?: string;\n onChange: (value: LokiQuery) => void;\n onRunQuery: () => void;\n query: TempoQuery;\n}\n\nexport function LokiSearch({ logsDatasourceUid, onChange, onRunQuery, query }: LokiSearchProps) {\n const dsState = useAsync(() => getDS(logsDatasourceUid), [logsDatasourceUid]);\n if (dsState.loading) {\n return null;\n }\n\n const ds = dsState.value as LokiDatasource;\n\n if (ds) {\n return (\n <>\n <InlineLabel>Tempo uses {ds.name} to find traces.</InlineLabel>\n <LokiQueryField\n datasource={ds}\n onChange={onChange}\n onRunQuery={onRunQuery}\n query={query.linkedQuery ?? ({ refId: 'linked' } as LokiQuery)}\n history={[]}\n />\n </>\n );\n }\n\n if (!logsDatasourceUid) {\n return <div className=\"text-warning\">Please set up a Loki search datasource in the datasource settings.</div>;\n }\n\n if (logsDatasourceUid && !ds) {\n return (\n <div className=\"text-warning\">\n Loki search datasource is configured but the data source no longer exists. Please configure existing data source\n to use the search.\n </div>\n );\n }\n\n return null;\n}\n","export interface AppNotification {\n id: string;\n severity: AppNotificationSeverity;\n icon: string;\n title: string;\n text: string;\n traceId?: string;\n component?: React.ReactElement;\n showing: boolean;\n timestamp: number;\n}\n\nexport enum AppNotificationSeverity {\n Success = 'success',\n Warning = 'warning',\n Error = 'error',\n Info = 'info',\n}\n\nexport enum AppNotificationTimeout {\n Success = 3000,\n Warning = 5000,\n Error = 7000,\n}\n\nexport const timeoutMap = {\n [AppNotificationSeverity.Success]: AppNotificationTimeout.Success,\n [AppNotificationSeverity.Warning]: AppNotificationTimeout.Warning,\n [AppNotificationSeverity.Error]: AppNotificationTimeout.Error,\n [AppNotificationSeverity.Info]: AppNotificationTimeout.Success,\n};\n\nexport interface AppNotificationsState {\n byId: Record<string, AppNotification>;\n lastRead: number;\n}\n","import { createSelector, createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nimport { AppNotification, AppNotificationSeverity, AppNotificationsState } from './types/appNotifications';\n\nconst MAX_STORED_NOTIFICATIONS = 25;\nexport const STORAGE_KEY = 'notifications';\nexport const NEW_NOTIFS_KEY = `${STORAGE_KEY}/lastRead`;\ntype StoredNotification = Omit<AppNotification, 'component'>;\n\nexport const initialState: AppNotificationsState = {\n byId: deserializeNotifications(),\n lastRead: Number.parseInt(window.localStorage.getItem(NEW_NOTIFS_KEY) ?? `${Date.now()}`, 10),\n};\n\n/**\n * Reducer and action to show toast notifications of various types (success, warnings, errors etc). Use to show\n * transient info to user, like errors that cannot be otherwise handled or success after an action.\n *\n * Use factory functions in core/copy/appNotifications to create the payload.\n */\nconst appNotificationsSlice = createSlice({\n name: 'appNotifications',\n initialState,\n reducers: {\n notifyApp: (state, { payload: newAlert }: PayloadAction<AppNotification>) => {\n if (Object.values(state.byId).some((alert) => isSimilar(newAlert, alert) && alert.showing)) {\n return;\n }\n\n state.byId[newAlert.id] = newAlert;\n serializeNotifications(state.byId);\n },\n hideAppNotification: (state, { payload: alertId }: PayloadAction<string>) => {\n if (!(alertId in state.byId)) {\n return;\n }\n\n state.byId[alertId].showing = false;\n serializeNotifications(state.byId);\n },\n clearNotification: (state, { payload: alertId }: PayloadAction<string>) => {\n delete state.byId[alertId];\n serializeNotifications(state.byId);\n },\n clearAllNotifications: (state) => {\n state.byId = {};\n serializeNotifications(state.byId);\n },\n readAllNotifications: (state, { payload: timestamp }: PayloadAction<number>) => {\n state.lastRead = timestamp;\n },\n },\n});\n\nexport const { notifyApp, hideAppNotification, clearNotification, clearAllNotifications, readAllNotifications } =\n appNotificationsSlice.actions;\n\nexport const appNotificationsReducer = appNotificationsSlice.reducer;\n\n// Selectors\n\nexport const selectLastReadTimestamp = (state: AppNotificationsState) => state.lastRead;\nexport const selectById = (state: AppNotificationsState) => state.byId;\nexport const selectAll = createSelector(selectById, (byId) =>\n Object.values(byId).sort((a, b) => b.timestamp - a.timestamp)\n);\nexport const selectWarningsAndErrors = createSelector(selectAll, (all) => all.filter(isAtLeastWarning));\nexport const selectVisible = createSelector(selectById, (byId) => Object.values(byId).filter((n) => n.showing));\n\n// Helper functions\n\nfunction isSimilar(a: AppNotification, b: AppNotification): boolean {\n return a.icon === b.icon && a.severity === b.severity && a.text === b.text && a.title === b.title;\n}\n\nfunction isAtLeastWarning(notif: AppNotification) {\n return notif.severity === AppNotificationSeverity.Warning || notif.severity === AppNotificationSeverity.Error;\n}\n\nfunction isStoredNotification(obj: unknown): obj is StoredNotification {\n return typeof obj === 'object' && obj !== null && 'id' in obj && 'icon' in obj && 'title' in obj && 'text' in obj;\n}\n\n// (De)serialization\n\nexport function deserializeNotifications(): Record<string, StoredNotification> {\n const storedNotifsRaw = window.localStorage.getItem(STORAGE_KEY);\n if (!storedNotifsRaw) {\n return {};\n }\n\n const parsed = JSON.parse(storedNotifsRaw);\n if (!Object.values(parsed).every((v) => isStoredNotification(v))) {\n return {};\n }\n\n return parsed;\n}\n\nfunction serializeNotifications(notifs: Record<string, StoredNotification>) {\n const reducedNotifs = Object.values(notifs)\n .filter(isAtLeastWarning)\n .sort((a, b) => b.timestamp - a.timestamp)\n .slice(0, MAX_STORED_NOTIFICATIONS)\n .reduce<Record<string, StoredNotification>>((prev, cur) => {\n prev[cur.id] = {\n id: cur.id,\n severity: cur.severity,\n icon: cur.icon,\n title: cur.title,\n text: cur.text,\n traceId: cur.traceId,\n timestamp: cur.timestamp,\n // we don't care about still showing toasts after refreshing\n // https://github.com/grafana/grafana/issues/71932\n showing: false,\n };\n\n return prev;\n }, {});\n\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(reducedNotifs));\n } catch (err) {\n console.error('Unable to persist notifications to local storage');\n console.error(err);\n }\n}\n","import { isFetchError } from '@grafana/runtime';\n\nexport function getMessageFromError(err: unknown): string {\n if (typeof err === 'string') {\n return err;\n }\n\n if (err) {\n if (err instanceof Error) {\n return err.message;\n } else if (isFetchError(err)) {\n if (err.data && err.data.message) {\n return err.data.message;\n } else if (err.statusText) {\n return err.statusText;\n }\n }\n }\n\n return JSON.stringify(err);\n}\n","import { v4 as uuidv4 } from 'uuid';\n\nimport { AppNotification, AppNotificationSeverity } from '../actions/types';\n\nimport { getMessageFromError } from './errors';\n\nconst defaultSuccessNotification = {\n title: '',\n text: '',\n severity: AppNotificationSeverity.Success,\n icon: 'check',\n};\n\nconst defaultErrorNotification = {\n title: '',\n text: '',\n severity: AppNotificationSeverity.Error,\n icon: 'exclamation-triangle',\n};\n\nexport const createSuccessNotification = (title: string, text = '', traceId?: string): AppNotification => ({\n ...defaultSuccessNotification,\n title,\n text,\n id: uuidv4(),\n timestamp: Date.now(),\n showing: true,\n});\n\nexport const createErrorNotification = (\n title: string,\n text: string | Error = '',\n traceId?: string,\n component?: React.ReactElement\n): AppNotification => {\n return {\n ...defaultErrorNotification,\n text: getMessageFromError(text),\n title,\n id: uuidv4(),\n traceId,\n component,\n timestamp: Date.now(),\n showing: true,\n };\n};\n","import { Store } from 'redux';\n\nexport let store: Store<StoreState>;\nexport const initialKeyedVariablesState: any = { keys: {} };\n\ntype StoreState = ReturnType<ReturnType<any>>;\n\nexport function setStore(newStore: Store<StoreState>) {\n store = newStore;\n}\n\nexport function getState(): StoreState {\n if (!store || !store.getState) {\n return { templating: { ...initialKeyedVariablesState, lastKey: 'key' } } as StoreState; // used by tests\n }\n\n return store.getState();\n}\n\n// This was `any` before\nexport function dispatch(action: any) {\n if (!store || !store.getState) {\n return;\n }\n\n return store.dispatch(action);\n}\n","import type { languages } from 'monaco-editor';\nimport { Grammar } from 'prismjs';\n\nexport const languageConfiguration: languages.LanguageConfiguration = {\n // the default separators except `@$`\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!#%^&*()\\-=+\\[{\\]}\\\\|;:'\",.<>\\/?\\s]+)/g,\n brackets: [\n ['{', '}'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n folding: {},\n};\n\nexport const operators = ['=', '!=', '>', '<', '>=', '<=', '=~', '!~'];\nexport const keywordOperators = ['=', '!='];\nexport const stringOperators = ['=', '!=', '=~', '!~'];\nexport const numberOperators = ['=', '!=', '>', '<', '>=', '<='];\n\nexport const intrinsics = [\n 'duration',\n 'kind',\n 'name',\n 'rootName',\n 'rootServiceName',\n 'status',\n 'statusMessage',\n 'traceDuration',\n];\nexport const scopes: string[] = ['resource', 'span'];\n\nexport const functions = ['avg', 'min', 'max', 'sum', 'count', 'by'];\n\nconst keywords = intrinsics.concat(scopes);\n\nconst statusValues = ['ok', 'unset', 'error', 'false', 'true'];\n\nconst language: languages.IMonarchLanguage = {\n ignoreCase: false,\n defaultToken: '',\n tokenPostfix: '.traceql',\n\n keywords,\n operators,\n statusValues,\n functions,\n\n symbols: /[=><!~?:&|+\\-*\\/^%]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n\n tokenizer: {\n root: [\n // comments\n [/\\/\\/.*/, 'comment'], // line comment\n [/\\/\\*.*\\*\\//, 'comment'], // block comment\n\n // durations\n [/[0-9]+(.[0-9]+)?(us|µs|ns|ms|s|m|h)/, 'number'],\n\n // trace ID\n [/^\\s*[0-9A-Fa-f]+\\s*$/, 'tag'],\n\n // keywords\n [\n // match only predefined keywords\n `(?:${keywords.join('|')})`,\n {\n cases: {\n '@keywords': 'keyword',\n '@default': 'tag', // fallback, but should never happen\n },\n },\n ],\n\n // functions and predefined values\n [\n // Inside (double) quotes, all characters are allowed, with the exception of `\\` and `\"` that must be escaped (`\\\\` and `\\\"`).\n // Outside quotes, some more characters are prohibited, such as `!` and `=`.\n /(?:\\w|^[^{}()=~!<>&|,\" ]|\"(?:\\\\\"|\\\\\\\\|[^\\\\\"])*\")+/,\n {\n cases: {\n '@functions': 'predefined',\n '@statusValues': 'type',\n '@default': 'tag', // fallback, used for tag names\n },\n },\n ],\n\n // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], // non-teminated string\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'], // non-teminated string\n [/([^\\w])(\")/, [{ token: '' }, { token: 'string', next: '@string_double' }]],\n [/([^\\w])(')/, [{ token: '' }, { token: 'string', next: '@string_single' }]],\n [/([^\\w])(`)/, [{ token: '' }, { token: 'string', next: '@string_back' }]],\n\n // delimiters and operators\n [/[{}()\\[\\]]/, 'delimiter.bracket'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': 'delimiter',\n '@default': '',\n },\n },\n ],\n\n // numbers\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, 'number.float'],\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, 'number.float'],\n [/0(@octaldigits)[Ll]?/, 'number.octal'],\n [/0[bB](@binarydigits)[Ll]?/, 'number.binary'],\n [/(@digits)[fFdD]/, 'number.float'],\n [/(@digits)[lL]?/, 'number'],\n ],\n\n string_double: [\n [/[^\\\\\"]+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/\"/, 'string', '@pop'],\n ],\n\n string_single: [\n [/[^\\\\']+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/'/, 'string', '@pop'],\n ],\n\n string_back: [\n [/[^\\\\`]+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/`/, 'string', '@pop'],\n ],\n },\n};\n\n// For \"TraceQL\" tab (Monarch editor for TraceQL)\nexport const languageDefinition = {\n id: 'traceql',\n extensions: ['.traceql'],\n aliases: ['tempo', 'traceql'],\n mimetypes: [],\n def: {\n language,\n languageConfiguration,\n },\n};\n\n// For \"Search\" tab (query builder)\nexport const traceqlGrammar: Grammar = {\n comment: {\n pattern: /\\/\\/.*/,\n },\n 'span-set': {\n pattern: /\\{[^}]*}/,\n inside: {\n filter: {\n pattern: /([\\w.\\/-]+)?(\\s*)(([!=+\\-<>~]+)\\s*(\"([^\"\\n&]+)?\"?|([^\"\\n\\s&|}]+))?)/g,\n inside: {\n comment: {\n pattern: /#.*/,\n },\n 'label-key': {\n pattern: /[a-z_.][\\w./_-]*(?=\\s*(=|!=|>|<|>=|<=|=~|!~))/,\n alias: 'attr-name',\n },\n 'label-value': {\n pattern: /(\"(?:\\\\.|[^\\\\\"])*\")|(\\w+)/,\n alias: 'attr-value',\n },\n },\n },\n punctuation: /[}{&|]/,\n },\n },\n number: /\\b-?\\d+((\\.\\d*)?([eE][+-]?\\d+)?)?\\b/,\n operator: new RegExp(`/[-+*/=%^~]|&&?|\\\\|?\\\\||!=?|<(?:=>?|<|>)?|>[>=]?|`, 'i'),\n punctuation: /[{};()`,.]/,\n};\n","import { startCase, uniq } from 'lodash';\n\nimport { SelectableValue } from '@grafana/data';\n\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { intrinsics } from '../traceql/traceql';\nimport { Scope } from '../types';\n\nexport const generateQueryFromFilters = (filters: TraceqlFilter[]) => {\n return `{${filters\n .filter((f) => f.tag && f.operator && f.value?.length)\n .map((f) => `${scopeHelper(f)}${tagHelper(f, filters)}${f.operator}${valueHelper(f)}`)\n .join(' && ')}}`;\n};\n\nconst valueHelper = (f: TraceqlFilter) => {\n if (Array.isArray(f.value) && f.value.length > 1) {\n return `\"${f.value.join('|')}\"`;\n }\n if (f.valueType === 'string') {\n return `\"${f.value}\"`;\n }\n return f.value;\n};\nconst scopeHelper = (f: TraceqlFilter) => {\n // Intrinsic fields don't have a scope\n if (intrinsics.find((t) => t === f.tag)) {\n return '';\n }\n return (\n (f.scope === TraceqlSearchScope.Resource || f.scope === TraceqlSearchScope.Span ? f.scope?.toLowerCase() : '') + '.'\n );\n};\nconst tagHelper = (f: TraceqlFilter, filters: TraceqlFilter[]) => {\n if (f.tag === 'duration') {\n const durationType = filters.find((f) => f.id === 'duration-type');\n if (durationType) {\n return durationType.value === 'trace' ? 'traceDuration' : 'duration';\n }\n return f.tag;\n }\n return f.tag;\n};\n\nexport const filterScopedTag = (f: TraceqlFilter) => {\n return scopeHelper(f) + f.tag;\n};\n\nexport const filterTitle = (f: TraceqlFilter) => {\n // Special case for the intrinsic \"name\" since a label called \"Name\" isn't explicit\n if (f.tag === 'name') {\n return 'Span Name';\n }\n // Special case for the resource service name\n if (f.tag === 'service.name' && f.scope === TraceqlSearchScope.Resource) {\n return 'Service Name';\n }\n return startCase(filterScopedTag(f));\n};\n\nexport const getFilteredTags = (tags: string[], staticTags: Array<string | undefined>) => {\n return [...intrinsics, ...tags].filter((t) => !staticTags.includes(t));\n};\n\nexport const getUnscopedTags = (scopes: Scope[]) => {\n return uniq(\n scopes.map((scope: Scope) => (scope.name && scope.name !== 'intrinsic' && scope.tags ? scope.tags : [])).flat()\n );\n};\n\nexport const getAllTags = (scopes: Scope[]) => {\n return uniq(scopes.map((scope: Scope) => (scope.tags ? scope.tags : [])).flat());\n};\n\nexport const getTagsByScope = (scopes: Scope[], scope: TraceqlSearchScope | string) => {\n return uniq(scopes.map((s: Scope) => (s.name && s.name === scope && s.tags ? s.tags : [])).flat());\n};\n\nexport function replaceAt<T>(array: T[], index: number, value: T) {\n const ret = array.slice(0);\n ret[index] = value;\n return ret;\n}\n\nexport const operatorSelectableValue = (op: string) => {\n const result: SelectableValue = { label: op, value: op };\n switch (op) {\n case '=':\n result.description = 'Equals';\n break;\n case '!=':\n result.description = 'Not equals';\n break;\n case '>':\n result.description = 'Greater';\n break;\n case '>=':\n result.description = 'Greater or Equal';\n break;\n case '<':\n result.description = 'Less';\n break;\n case '<=':\n result.description = 'Less or Equal';\n break;\n case '=~':\n result.description = 'Matches regex';\n break;\n case '!~':\n result.description = 'Does not match regex';\n break;\n }\n return result;\n};\n","import React, { useEffect, useState } from 'react';\n\nimport { DataQuery, SelectableValue } from '@grafana/data';\nimport { InlineField, InlineFieldRow, Select } from '@grafana/ui';\n\nimport { TempoDatasource } from './datasource';\n\nexport enum TempoVariableQueryType {\n LabelNames,\n LabelValues,\n}\n\nexport interface TempoVariableQuery extends DataQuery {\n type: TempoVariableQueryType;\n label?: string;\n stream?: string;\n}\n\nconst variableOptions = [\n { label: 'Label names', value: TempoVariableQueryType.LabelNames },\n { label: 'Label values', value: TempoVariableQueryType.LabelValues },\n];\n\nconst refId = 'TempoDatasourceVariableQueryEditor-VariableQuery';\n\nexport type TempoVariableQueryEditorProps = {\n onChange: (value: TempoVariableQuery) => void;\n query: TempoVariableQuery;\n datasource: TempoDatasource;\n};\n\nexport const TempoVariableQueryEditor = ({ onChange, query, datasource }: TempoVariableQueryEditorProps) => {\n const [label, setLabel] = useState(query.label || '');\n const [type, setType] = useState<number | undefined>(query.type);\n const [labelOptions, setLabelOptions] = useState<Array<SelectableValue<string>>>([]);\n\n useEffect(() => {\n if (type === TempoVariableQueryType.LabelValues) {\n datasource.labelNamesQuery().then((labelNames: Array<{ text: string }>) => {\n setLabelOptions(labelNames.map(({ text }) => ({ label: text, value: text })));\n });\n }\n }, [datasource, query, type]);\n\n const onQueryTypeChange = (newType: SelectableValue<TempoVariableQueryType>) => {\n setType(newType.value);\n if (newType.value !== undefined) {\n onChange({\n type: newType.value,\n label,\n refId,\n });\n }\n };\n\n const onLabelChange = (newLabel: SelectableValue<string>) => {\n const newLabelValue = newLabel.value || '';\n setLabel(newLabelValue);\n if (type !== undefined) {\n onChange({\n type,\n label: newLabelValue,\n refId,\n });\n }\n };\n\n const handleBlur = () => {\n if (type !== undefined) {\n onChange({ type, label, refId });\n }\n };\n\n return (\n <>\n <InlineFieldRow>\n <InlineField label=\"Query type\" labelWidth={20}>\n <Select\n aria-label=\"Query type\"\n onChange={onQueryTypeChange}\n onBlur={handleBlur}\n value={type}\n options={variableOptions}\n width={32}\n />\n </InlineField>\n </InlineFieldRow>\n\n {type === TempoVariableQueryType.LabelValues && (\n <InlineFieldRow>\n <InlineField label=\"Label\" labelWidth={20}>\n <Select\n aria-label=\"Label\"\n onChange={onLabelChange}\n onBlur={handleBlur}\n value={{ label, value: label }}\n options={labelOptions}\n width={32}\n allowCustomValue\n />\n </InlineField>\n </InlineFieldRow>\n )}\n </>\n );\n};\n","import { LanguageProvider, SelectableValue } from '@grafana/data';\n\nimport { getAllTags, getTagsByScope, getUnscopedTags } from './SearchTraceQLEditor/utils';\nimport { TraceqlSearchScope } from './dataquery.gen';\nimport { TempoDatasource } from './datasource';\nimport { Scope } from './types';\n\nexport default class TempoLanguageProvider extends LanguageProvider {\n datasource: TempoDatasource;\n tagsV1?: string[];\n tagsV2?: Scope[];\n constructor(datasource: TempoDatasource, initialValues?: any) {\n super();\n\n this.datasource = datasource;\n Object.assign(this, initialValues);\n }\n\n request = async (url: string, params = {}) => {\n const res = await this.datasource.metadataRequest(url, params);\n return res?.data;\n };\n\n start = async () => {\n if (!this.startTask) {\n this.startTask = this.fetchTags().then(() => {\n return [];\n });\n }\n\n return this.startTask;\n };\n\n async fetchTags() {\n let v1Resp, v2Resp;\n try {\n v2Resp = await this.request('/api/v2/search/tags', []);\n } catch (error) {\n v1Resp = await this.request('/api/search/tags', []);\n }\n\n if (v2Resp && v2Resp.scopes) {\n this.setV2Tags(v2Resp.scopes);\n } else if (v1Resp) {\n this.setV1Tags(v1Resp.tagNames);\n }\n }\n\n setV1Tags = (tags: string[]) => {\n this.tagsV1 = tags;\n };\n\n setV2Tags = (tags: Scope[]) => {\n this.tagsV2 = tags;\n };\n\n getTags = (scope?: TraceqlSearchScope) => {\n if (this.tagsV2 && scope) {\n if (scope === TraceqlSearchScope.Unscoped) {\n return getUnscopedTags(this.tagsV2);\n }\n return getTagsByScope(this.tagsV2, scope);\n } else if (this.tagsV1) {\n // This is needed because the /api/v2/search/tag/${tag}/values API expects \"status\" and the v1 API expects \"status.code\"\n // so Tempo doesn't send anything and we inject it here for the autocomplete\n if (!this.tagsV1.find((t) => t === 'status')) {\n this.tagsV1.push('status');\n }\n return this.tagsV1;\n }\n return [];\n };\n\n getMetricsSummaryTags = (scope?: TraceqlSearchScope) => {\n if (this.tagsV2 && scope) {\n if (scope === TraceqlSearchScope.Unscoped) {\n return getUnscopedTags(this.tagsV2);\n }\n return getTagsByScope(this.tagsV2, scope);\n } else if (this.tagsV1) {\n return this.tagsV1;\n }\n return [];\n };\n\n getTraceqlAutocompleteTags = (scope?: string) => {\n if (this.tagsV2) {\n if (!scope) {\n // have not typed a scope yet || unscoped (.) typed\n return getUnscopedTags(this.tagsV2);\n } else if (scope === TraceqlSearchScope.Unscoped) {\n return getUnscopedTags(this.tagsV2);\n }\n return getTagsByScope(this.tagsV2, scope);\n } else if (this.tagsV1) {\n // This is needed because the /api/v2/search/tag/${tag}/values API expects \"status\" and the v1 API expects \"status.code\"\n // so Tempo doesn't send anything and we inject it here for the autocomplete\n if (!this.tagsV1.find((t) => t === 'status')) {\n this.tagsV1.push('status');\n }\n return this.tagsV1;\n }\n return [];\n };\n\n getAutocompleteTags = () => {\n if (this.tagsV2) {\n return getAllTags(this.tagsV2);\n } else if (this.tagsV1) {\n // This is needed because the /api/search/tag/${tag}/values API expects \"status.code\" and the v2 API expects \"status\"\n // so Tempo doesn't send anything and we inject it here for the autocomplete\n if (!this.tagsV1.find((t) => t === 'status.code')) {\n this.tagsV1.push('status.code');\n }\n return this.tagsV1;\n }\n return [];\n };\n\n async getOptionsV1(tag: string): Promise<Array<SelectableValue<string>>> {\n const encodedTag = this.encodeTag(tag);\n const response = await this.request(`/api/search/tag/${encodedTag}/values`);\n let options: Array<SelectableValue<string>> = [];\n if (response && response.tagValues) {\n options = response.tagValues.map((v: string) => ({\n value: v,\n label: v,\n }));\n }\n return options;\n }\n\n async getOptionsV2(tag: string, query?: string): Promise<Array<SelectableValue<string>>> {\n const encodedTag = this.encodeTag(tag);\n const response = await this.request(`/api/v2/search/tag/${encodedTag}/values`, query ? { q: query } : {});\n let options: Array<SelectableValue<string>> = [];\n if (response && response.tagValues) {\n response.tagValues.forEach((v: { type: string; value?: string }) => {\n if (v.value) {\n options.push({\n type: v.type,\n value: v.value,\n label: v.value,\n });\n }\n });\n }\n return options;\n }\n\n /**\n * Encode (serialize) a given tag for use in a URL.\n *\n * @param tag the tag to encode\n * @returns the encoded tag\n */\n private encodeTag = (tag: string): string => {\n // If we call `encodeURIComponent` only once, we still get an error when issuing a request to the backend\n // Reference: https://stackoverflow.com/a/37456192\n return encodeURIComponent(encodeURIComponent(tag));\n };\n}\n","import {\n createDataFrame,\n DataSourceInstanceSettings,\n FieldDTO,\n FieldType,\n MutableDataFrame,\n sortDataFrame,\n} from '@grafana/data';\n\nexport type MetricsSummary = {\n spanCount: string;\n errorSpanCount?: string;\n p50: string;\n p90: string;\n p95: string;\n p99: string;\n series: Series[];\n};\n\ntype Series = {\n key: string;\n value: {\n type: number;\n n?: number;\n f?: number;\n s?: string;\n b?: string;\n d?: string;\n status?: number;\n kind?: number;\n };\n};\n\ntype MetricsData = {\n spanCount: number;\n errorPercentage: number | string;\n p50: number;\n p90: number;\n p95: number;\n p99: number;\n [key: string]: string | number;\n};\n\nexport function createTableFrameFromMetricsSummaryQuery(\n data: MetricsSummary[],\n targetQuery: string,\n instanceSettings: DataSourceInstanceSettings\n) {\n let frame;\n\n if (!data.length) {\n return emptyResponse;\n }\n\n const dynamicMetrics: Record<string, FieldDTO> = {};\n data.forEach((res: MetricsSummary) => {\n const configQuery = getConfigQuery(res.series, targetQuery);\n res.series.forEach((series: Series) => {\n dynamicMetrics[series.key] = {\n name: `${series.key}`,\n type: FieldType.string,\n config: getConfig(series, configQuery, instanceSettings),\n values: [],\n };\n });\n });\n\n frame = createDataFrame({\n name: 'Metrics Summary',\n refId: 'metrics-summary',\n fields: [\n ...Object.values(dynamicMetrics).sort((a, b) => a.name.localeCompare(b.name)),\n {\n name: 'kind',\n type: FieldType.string,\n config: { displayNameFromDS: 'Kind', custom: { width: 150 } },\n },\n {\n name: 'spanCount',\n type: FieldType.number,\n config: { displayNameFromDS: 'Span count', custom: { width: 150 } },\n },\n {\n name: 'errorPercentage',\n type: FieldType.number,\n config: { displayNameFromDS: 'Error', unit: 'percent', custom: { width: 150 } },\n },\n getPercentileRow('p50'),\n getPercentileRow('p90'),\n getPercentileRow('p95'),\n getPercentileRow('p99'),\n ],\n meta: {\n preferredVisualisationType: 'table',\n },\n });\n\n const metricsData = data.map(transformToMetricsData);\n frame.length = metricsData.length;\n for (const trace of metricsData) {\n for (const field of frame.fields) {\n field.values.push(trace[field.name]);\n }\n }\n frame = sortDataFrame(frame, 0);\n\n return [frame];\n}\n\nexport const transformToMetricsData = (data: MetricsSummary) => {\n const errorPercentage = data.errorSpanCount\n ? (getNumberForMetric(data.errorSpanCount) / getNumberForMetric(data.spanCount)) * 100\n : '0%';\n\n const metricsData: MetricsData = {\n kind: 'server', // so the user knows all results are of kind = server\n spanCount: getNumberForMetric(data.spanCount),\n errorPercentage,\n p50: getNumberForMetric(data.p50),\n p90: getNumberForMetric(data.p90),\n p95: getNumberForMetric(data.p95),\n p99: getNumberForMetric(data.p99),\n };\n\n data.series.forEach((series: Series) => {\n metricsData[`${series.key}`] = getMetricValue(series) || '';\n });\n\n return metricsData;\n};\n\nexport const getConfigQuery = (series: Series[], targetQuery: string) => {\n const queryParts = series.map((x: Series) => {\n const isNumber = x.value.type === 3 || x.value.type === 4;\n const isIntrinsic = x.value.type === 8 || x.value.type === 9;\n const surround = isNumber || isIntrinsic ? '' : '\"';\n return `${x.key}=${surround}` + '${__data.fields[\"' + x.key + '\"]}' + `${surround}`;\n });\n\n let configQuery = '';\n const closingBracketIndex = targetQuery.indexOf('}');\n\n if (closingBracketIndex !== -1) {\n const queryAfterClosingBracket = targetQuery.substring(closingBracketIndex + 1);\n configQuery = targetQuery.substring(0, closingBracketIndex);\n if (queryParts.length > 0) {\n configQuery += targetQuery.replace(/\\s/g, '').includes('{}') ? '' : ' && ';\n configQuery += `${queryParts.join(' && ')} && kind=server`;\n configQuery += `}`;\n }\n configQuery += `${queryAfterClosingBracket}`;\n } else {\n configQuery = `{${queryParts.join(' && ')} && kind=server} | ${targetQuery}`;\n }\n\n return configQuery;\n};\n\nconst getConfig = (series: Series, query: string, instanceSettings: DataSourceInstanceSettings) => {\n const commonConfig = {\n displayNameFromDS: series.key,\n noValue: '<no value>',\n links: [\n {\n title: 'Query in explore',\n url: '',\n internal: {\n datasourceUid: instanceSettings.uid,\n datasourceName: instanceSettings.name,\n query: {\n query,\n queryType: 'traceql',\n },\n },\n },\n ],\n };\n\n if (series.value.type === 7) {\n return {\n ...commonConfig,\n unit: 'ns',\n };\n }\n return { ...commonConfig };\n};\n\nconst NO_VALUE = '';\n\nconst getMetricValue = (series: Series) => {\n if (!series.value.type) {\n return NO_VALUE;\n }\n\n switch (series.value.type) {\n case 3:\n return series.value.n;\n case 4:\n return series.value.f;\n case 5:\n return series.value.s;\n case 6:\n return series.value.b;\n case 7:\n return series.value.d;\n case 8:\n return getSpanStatusCode(series.value.status);\n case 9:\n return getSpanKind(series.value.kind);\n default:\n return NO_VALUE;\n }\n};\n\n// Values set according to Tempo enum: https://github.com/grafana/tempo/blob/main/pkg/traceql/enum_statics.go\nconst getSpanStatusCode = (statusCode: number | undefined) => {\n if (!statusCode) {\n return NO_VALUE;\n }\n\n switch (statusCode) {\n case 0:\n return 'error';\n case 1:\n return 'ok';\n default:\n return 'unset';\n }\n};\n\n// Values set according to Tempo enum: https://github.com/grafana/tempo/blob/main/pkg/traceql/enum_statics.go\nconst getSpanKind = (kind: number | undefined) => {\n if (!kind) {\n return NO_VALUE;\n }\n\n switch (kind) {\n case 1:\n return 'internal';\n case 2:\n return 'client';\n case 3:\n return 'server';\n case 4:\n return 'producer';\n case 5:\n return 'consumer';\n default:\n return 'unspecified';\n }\n};\n\nconst getPercentileRow = (name: string) => {\n return {\n name: name,\n type: FieldType.number,\n config: {\n displayNameFromDS: name,\n unit: 'ns',\n custom: {\n width: 150,\n },\n },\n };\n};\n\nconst getNumberForMetric = (metric: string) => {\n const number = parseInt(metric, 10);\n return isNaN(number) ? 0 : number;\n};\n\nexport const emptyResponse = new MutableDataFrame({\n name: 'Metrics Summary',\n refId: 'metrics-summary',\n fields: [],\n meta: {\n preferredVisualisationType: 'table',\n },\n});\n","import { capitalize } from 'lodash';\nimport { map, Observable, takeWhile } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n DataFrame,\n DataQueryRequest,\n DataQueryResponse,\n DataSourceInstanceSettings,\n FieldType,\n LiveChannelScope,\n LoadingState,\n MutableDataFrame,\n ThresholdsConfig,\n ThresholdsMode,\n} from '@grafana/data';\nimport { getGrafanaLiveSrv } from '@grafana/runtime';\n\nimport { SearchStreamingState } from './dataquery.gen';\nimport { DEFAULT_SPSS, TempoDatasource } from './datasource';\nimport { formatTraceQLResponse } from './resultTransformer';\nimport { SearchMetrics, TempoJsonData, TempoQuery } from './types';\nfunction getLiveStreamKey(): string {\n return uuidv4();\n}\n\nexport function doTempoChannelStream(\n query: TempoQuery,\n ds: TempoDatasource,\n options: DataQueryRequest<TempoQuery>,\n instanceSettings: DataSourceInstanceSettings<TempoJsonData>\n): Observable<DataQueryResponse> {\n const range = options.range;\n\n let frames: DataFrame[] | undefined = undefined;\n let state: LoadingState = LoadingState.NotStarted;\n const requestTime = performance.now();\n\n return getGrafanaLiveSrv()\n .getStream<MutableDataFrame>({\n scope: LiveChannelScope.DataSource,\n namespace: ds.uid,\n path: `search/${getLiveStreamKey()}`,\n data: {\n ...query,\n SpansPerSpanSet: query.spss ?? DEFAULT_SPSS,\n timeRange: {\n from: range.from.toISOString(),\n to: range.to.toISOString(),\n },\n },\n })\n .pipe(\n takeWhile((evt) => {\n if ('message' in evt && evt?.message) {\n const frameState: SearchStreamingState = evt.message.data.values[2][0];\n if (frameState === SearchStreamingState.Done || frameState === SearchStreamingState.Error) {\n return false;\n }\n }\n return true;\n }, true)\n )\n .pipe(\n map((evt) => {\n if ('message' in evt && evt?.message) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - requestTime;\n // Schema should be [traces, metrics, state, error]\n const traces = evt.message.data.values[0][0];\n const metrics = evt.message.data.values[1][0];\n const frameState: SearchStreamingState = evt.message.data.values[2][0];\n const error = evt.message.data.values[3][0];\n\n switch (frameState) {\n case SearchStreamingState.Done:\n state = LoadingState.Done;\n break;\n case SearchStreamingState.Streaming:\n state = LoadingState.Streaming;\n break;\n case SearchStreamingState.Error:\n throw new Error(error);\n }\n\n frames = [\n metricsDataFrame(metrics, frameState, elapsedTime),\n ...formatTraceQLResponse(traces, instanceSettings, query.tableType),\n ];\n }\n return {\n data: frames || [],\n state,\n };\n })\n );\n}\n\nfunction metricsDataFrame(metrics: SearchMetrics, state: SearchStreamingState, elapsedTime: number) {\n const progressThresholds: ThresholdsConfig = {\n steps: [\n {\n color: 'blue',\n value: -Infinity,\n },\n {\n color: 'green',\n value: 75,\n },\n ],\n mode: ThresholdsMode.Absolute,\n };\n\n const frame: DataFrame = {\n refId: 'streaming-progress',\n name: 'Streaming Progress',\n length: 1,\n fields: [\n {\n name: 'state',\n type: FieldType.string,\n values: [capitalize(state.toString())],\n config: {\n displayNameFromDS: 'State',\n },\n },\n {\n name: 'elapsedTime',\n type: FieldType.number,\n values: [elapsedTime],\n config: {\n unit: 'ms',\n displayNameFromDS: 'Elapsed Time',\n },\n },\n {\n name: 'totalBlocks',\n type: FieldType.number,\n values: [metrics.totalBlocks],\n config: {\n displayNameFromDS: 'Total Blocks',\n },\n },\n {\n name: 'completedJobs',\n type: FieldType.number,\n values: [metrics.completedJobs],\n config: {\n displayNameFromDS: 'Completed Jobs',\n },\n },\n {\n name: 'totalJobs',\n type: FieldType.number,\n values: [metrics.totalJobs],\n config: {\n displayNameFromDS: 'Total Jobs',\n },\n },\n {\n name: 'progress',\n type: FieldType.number,\n values: [\n state === SearchStreamingState.Done ? 100 : ((metrics.completedJobs || 0) / (metrics.totalJobs || 1)) * 100,\n ],\n config: {\n displayNameFromDS: 'Progress',\n unit: 'percent',\n min: 0,\n max: 100,\n custom: {\n cellOptions: {\n type: 'gauge',\n mode: 'gradient',\n },\n },\n thresholds: progressThresholds,\n },\n },\n ],\n meta: {\n preferredVisualisationType: 'table',\n },\n };\n return frame;\n}\n","import { from, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { DataQueryRequest, CustomVariableSupport, MetricFindValue } from '@grafana/data';\n\nimport { TempoVariableQuery, TempoVariableQueryEditor } from './VariableQueryEditor';\nimport { TempoDatasource } from './datasource';\n\nexport class TempoVariableSupport extends CustomVariableSupport<TempoDatasource, TempoVariableQuery> {\n editor = TempoVariableQueryEditor;\n\n constructor(private datasource: TempoDatasource) {\n super();\n }\n\n query(request: DataQueryRequest<TempoVariableQuery>): Observable<{ data: MetricFindValue[] }> {\n if (!this.datasource) {\n throw new Error('Datasource not initialized');\n }\n\n const result = this.datasource.executeVariableQuery(request.targets[0]);\n return from(result).pipe(map((data) => ({ data })));\n }\n}\n","import { groupBy, identity, pick, pickBy, startCase } from 'lodash';\nimport { EMPTY, from, lastValueFrom, merge, Observable, of, throwError } from 'rxjs';\nimport { catchError, concatMap, map, mergeMap, toArray } from 'rxjs/operators';\nimport semver from 'semver';\n\nimport {\n CoreApp,\n DataFrame,\n DataFrameDTO,\n DataQueryRequest,\n DataQueryResponse,\n DataQueryResponseData,\n DataSourceApi,\n DataSourceInstanceSettings,\n dateTime,\n FieldType,\n isValidGoDuration,\n LoadingState,\n rangeUtil,\n ScopedVars,\n SelectableValue,\n TestDataSourceResponse,\n urlUtil,\n} from '@grafana/data';\nimport { NodeGraphOptions, SpanBarOptions, TraceToLogsOptions } from '@grafana/o11y-ds-frontend';\nimport {\n BackendSrvRequest,\n config,\n DataSourceWithBackend,\n getBackendSrv,\n getDataSourceSrv,\n getTemplateSrv,\n reportInteraction,\n TemplateSrv,\n} from '@grafana/runtime';\nimport { BarGaugeDisplayMode, TableCellDisplayMode, VariableFormatID } from '@grafana/schema';\n\nimport { generateQueryFromFilters } from './SearchTraceQLEditor/utils';\nimport { TempoVariableQuery, TempoVariableQueryType } from './VariableQueryEditor';\nimport { LokiOptions } from './_importedDependencies/datasources/loki/types';\nimport { PrometheusDatasource, PromQuery } from './_importedDependencies/datasources/prometheus/types';\nimport { TraceqlFilter, TraceqlSearchScope } from './dataquery.gen';\nimport {\n defaultTableFilter,\n durationMetric,\n errorRateMetric,\n failedMetric,\n histogramMetric,\n mapPromMetricsToServiceMap,\n rateMetric,\n serviceMapMetrics,\n totalsMetric,\n} from './graphTransform';\nimport TempoLanguageProvider from './language_provider';\nimport { createTableFrameFromMetricsSummaryQuery, emptyResponse, MetricsSummary } from './metricsSummary';\nimport {\n createTableFrameFromSearch,\n formatTraceQLMetrics,\n formatTraceQLResponse,\n transformFromOTLP as transformFromOTEL,\n transformTrace,\n transformTraceList,\n} from './resultTransformer';\nimport { doTempoChannelStream } from './streaming';\nimport { SearchQueryParams, TempoJsonData, TempoQuery } from './types';\nimport { getErrorMessage } from './utils';\nimport { TempoVariableSupport } from './variables';\n\nexport const DEFAULT_LIMIT = 20;\nexport const DEFAULT_SPSS = 3; // spans per span set\n\nenum FeatureName {\n streaming = 'streaming',\n}\n\n/* Map, for each feature (e.g., streaming), the minimum Tempo version required to have that\n ** feature available. If the running Tempo instance on the user's backend is older than the\n ** target version, the feature is disabled in Grafana (frontend).\n */\nconst featuresToTempoVersion = {\n [FeatureName.streaming]: '2.2.0',\n};\n\n// The version that we use as default in case we cannot retrieve it from the backend.\n// This is the last minor version of Tempo that does not expose the endpoint for build information.\nconst defaultTempoVersion = '2.1.0';\n\ninterface ServiceMapQueryResponse {\n nodes: DataFrame;\n edges: DataFrame;\n}\n\ninterface ServiceMapQueryResponseWithRates {\n rates: Array<DataFrame | DataFrameDTO>;\n nodes: DataFrame;\n edges: DataFrame;\n}\n\nexport class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJsonData> {\n tracesToLogs?: TraceToLogsOptions;\n serviceMap?: {\n datasourceUid?: string;\n };\n search?: {\n hide?: boolean;\n filters?: TraceqlFilter[];\n };\n nodeGraph?: NodeGraphOptions;\n lokiSearch?: {\n datasourceUid?: string;\n };\n traceQuery?: {\n timeShiftEnabled?: boolean;\n spanStartTimeShift?: string;\n spanEndTimeShift?: string;\n };\n uploadedJson?: string | null = null;\n spanBar?: SpanBarOptions;\n languageProvider: TempoLanguageProvider;\n\n // The version of Tempo running on the backend. `null` if we cannot retrieve it for whatever reason\n tempoVersion?: string | null;\n\n constructor(\n private instanceSettings: DataSourceInstanceSettings<TempoJsonData>,\n private readonly templateSrv: TemplateSrv = getTemplateSrv()\n ) {\n super(instanceSettings);\n\n this.tracesToLogs = instanceSettings.jsonData.tracesToLogs;\n this.serviceMap = instanceSettings.jsonData.serviceMap;\n this.search = instanceSettings.jsonData.search;\n this.nodeGraph = instanceSettings.jsonData.nodeGraph;\n this.lokiSearch = instanceSettings.jsonData.lokiSearch;\n this.traceQuery = instanceSettings.jsonData.traceQuery;\n this.languageProvider = new TempoLanguageProvider(this);\n\n if (!this.search?.filters) {\n this.search = {\n ...this.search,\n filters: [\n {\n id: 'service-name',\n tag: 'service.name',\n operator: '=',\n scope: TraceqlSearchScope.Resource,\n },\n { id: 'span-name', tag: 'name', operator: '=', scope: TraceqlSearchScope.Span },\n ],\n };\n }\n\n this.variables = new TempoVariableSupport(this);\n }\n\n async executeVariableQuery(query: TempoVariableQuery) {\n // Avoid failing if the user did not select the query type (label names, label values, etc.)\n if (query.type === undefined) {\n return new Promise<Array<{ text: string }>>(() => []);\n }\n\n switch (query.type) {\n case TempoVariableQueryType.LabelNames: {\n return await this.labelNamesQuery();\n }\n case TempoVariableQueryType.LabelValues: {\n return this.labelValuesQuery(query.label);\n }\n default: {\n throw Error('Invalid query type: ' + query.type);\n }\n }\n }\n\n async labelNamesQuery(): Promise<Array<{ text: string }>> {\n await this.languageProvider.fetchTags();\n const tags = this.languageProvider.getAutocompleteTags();\n return tags.filter((tag) => tag !== undefined).map((tag) => ({ text: tag }));\n }\n\n async labelValuesQuery(labelName?: string): Promise<Array<{ text: string }>> {\n if (!labelName) {\n return [];\n }\n\n let options;\n try {\n // Retrieve the scope of the tag\n // Example: given `http.status_code`, we want scope `span`\n // Note that we ignore possible name clashes, e.g., `http.status_code` in both `span` and `resource`\n const scope: string | undefined = (this.languageProvider.tagsV2 || [])\n // flatten the Scope objects\n .flatMap((tagV2) => tagV2.tags.map((tag) => ({ scope: tagV2.name, name: tag })))\n // find associated scope\n .find((tag) => tag.name === labelName)?.scope;\n if (!scope) {\n throw Error(`Scope for tag ${labelName} not found`);\n }\n\n // For V2, we need to send scope and tag name, e.g. `span.http.status_code`,\n // unless the tag has intrinsic scope\n const scopeAndTag = scope === 'intrinsic' ? labelName : `${scope}.${labelName}`;\n options = await this.languageProvider.getOptionsV2(scopeAndTag);\n } catch {\n // For V1, the tag name (e.g. `http.status_code`) is enough\n options = await this.languageProvider.getOptionsV1(labelName);\n }\n\n return options.flatMap((option: SelectableValue<string>) =>\n option.value !== undefined ? [{ text: option.value }] : []\n );\n }\n\n init = async () => {\n const response = await lastValueFrom(\n this._request('/api/status/buildinfo').pipe(\n map((response) => response),\n catchError((error) => {\n console.error('Failure in retrieving build information', error.data.message);\n return of({ error, data: { version: null } }); // unknown version\n })\n )\n );\n this.tempoVersion = response.data.version;\n };\n\n /**\n * Check, for the given feature, whether it is available in Grafana.\n *\n * The check is done based on the version of the Tempo instance running on the backend and\n * the minimum version required by the given feature to work.\n *\n * @param featureName - the name of the feature to consider\n * @return true if the feature is available, false otherwise\n */\n private isFeatureAvailable(featureName: FeatureName) {\n // We know for old Tempo instances we don't know their version, so resort to default\n const actualVersion = this.tempoVersion ?? defaultTempoVersion;\n\n try {\n return semver.gte(actualVersion, featuresToTempoVersion[featureName]);\n } catch {\n // We assume we are on a development and recent branch, thus we enable all features\n return true;\n }\n }\n\n query(options: DataQueryRequest<TempoQuery>): Observable<DataQueryResponse> {\n const subQueries: Array<Observable<DataQueryResponse>> = [];\n const filteredTargets = options.targets.filter((target) => !target.hide);\n const targets: { [type: string]: TempoQuery[] } = groupBy(filteredTargets, (t) => t.queryType || 'traceql');\n\n if (targets.clear) {\n return of({ data: [], state: LoadingState.Done });\n }\n\n const logsDatasourceUid = this.getLokiSearchDS();\n\n // Run search queries on linked datasource\n if (logsDatasourceUid && targets.search?.length > 0) {\n reportInteraction('grafana_traces_loki_search_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n hasLinkedQueryExpr:\n targets.search[0].linkedQuery?.expr && targets.search[0].linkedQuery?.expr !== '' ? true : false,\n });\n\n const dsSrv = getDataSourceSrv();\n subQueries.push(\n from(dsSrv.get(logsDatasourceUid)).pipe(\n mergeMap((linkedDatasource: DataSourceApi) => {\n // Wrap linked query into a data request based on original request\n const linkedRequest: DataQueryRequest = { ...options, targets: targets.search.map((t) => t.linkedQuery!) };\n // Find trace matchers in derived fields of the linked datasource that's identical to this datasource\n const settings: DataSourceInstanceSettings<LokiOptions> = (linkedDatasource as TempoDatasource)\n .instanceSettings;\n const traceLinkMatcher: string[] =\n settings.jsonData.derivedFields\n ?.filter((field) => field.datasourceUid === this.uid && field.matcherRegex)\n .map((field) => field.matcherRegex) || [];\n\n if (!traceLinkMatcher || traceLinkMatcher.length === 0) {\n return throwError(\n () =>\n new Error(\n 'No Loki datasource configured for search. Set up Derived Fields for traces in a Loki datasource settings and link it to this Tempo datasource.'\n )\n );\n } else {\n const response = linkedDatasource.query(linkedRequest);\n return from(response).pipe(\n map((response) =>\n response.error ? response : transformTraceList(response, this.uid, this.name, traceLinkMatcher)\n )\n );\n }\n })\n )\n );\n }\n\n if (targets.nativeSearch?.length) {\n try {\n reportInteraction('grafana_traces_search_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n hasServiceName: targets.nativeSearch[0].serviceName ? true : false,\n hasSpanName: targets.nativeSearch[0].spanName ? true : false,\n resultLimit: targets.nativeSearch[0].limit ?? '',\n hasSearch: targets.nativeSearch[0].search ? true : false,\n minDuration: targets.nativeSearch[0].minDuration ?? '',\n maxDuration: targets.nativeSearch[0].maxDuration ?? '',\n });\n\n const timeRange = { startTime: options.range.from.unix(), endTime: options.range.to.unix() };\n const query = this.applyVariables(targets.nativeSearch[0], options.scopedVars);\n const searchQuery = this.buildSearchQuery(query, timeRange);\n subQueries.push(\n this._request('/api/search', searchQuery).pipe(\n map((response) => {\n return {\n data: [createTableFrameFromSearch(response.data.traces, this.instanceSettings)],\n };\n }),\n catchError((err) => {\n return of({ error: { message: getErrorMessage(err.data.message) }, data: [] });\n })\n )\n );\n } catch (error) {\n return of({ error: { message: error instanceof Error ? error.message : 'Unknown error occurred' }, data: [] });\n }\n }\n\n if (targets.traceql?.length) {\n try {\n const appliedQuery = this.applyVariables(targets.traceql[0], options.scopedVars);\n const queryValue = appliedQuery?.query || '';\n // Check whether this is a trace ID or traceQL query by checking if it only contains hex characters\n if (this.isTraceIdQuery(queryValue)) {\n // There's only hex characters so let's assume that this is a trace ID\n reportInteraction('grafana_traces_traceID_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n hasQuery: queryValue !== '' ? true : false,\n });\n\n subQueries.push(this.handleTraceIdQuery(options, targets.traceql));\n } else {\n if (this.isTraceQlMetricsQuery(queryValue)) {\n reportInteraction('grafana_traces_traceql_metrics_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n query: queryValue ?? '',\n });\n subQueries.push(this.handleTraceQlMetricsQuery(options, queryValue));\n } else {\n reportInteraction('grafana_traces_traceql_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n query: queryValue ?? '',\n streaming: config.featureToggles.traceQLStreaming,\n });\n subQueries.push(this.handleTraceQlQuery(options, targets, queryValue));\n }\n }\n } catch (error) {\n return of({ error: { message: error instanceof Error ? error.message : 'Unknown error occurred' }, data: [] });\n }\n }\n\n if (targets.traceqlSearch?.length) {\n try {\n if (config.featureToggles.metricsSummary) {\n const target = targets.traceqlSearch.find((t) => this.hasGroupBy(t));\n if (target) {\n const appliedQuery = this.applyVariables(target, options.scopedVars);\n subQueries.push(\n this.handleMetricsSummary(appliedQuery, generateQueryFromFilters(appliedQuery.filters), options)\n );\n }\n }\n\n const traceqlSearchTargets = config.featureToggles.metricsSummary\n ? targets.traceqlSearch.filter((t) => !this.hasGroupBy(t))\n : targets.traceqlSearch;\n if (traceqlSearchTargets.length > 0) {\n const appliedQuery = this.applyVariables(traceqlSearchTargets[0], options.scopedVars);\n const queryValueFromFilters = generateQueryFromFilters(appliedQuery.filters);\n\n reportInteraction('grafana_traces_traceql_search_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n query: queryValueFromFilters ?? '',\n streaming: config.featureToggles.traceQLStreaming,\n });\n\n if (config.featureToggles.traceQLStreaming && this.isFeatureAvailable(FeatureName.streaming)) {\n subQueries.push(this.handleStreamingSearch(options, traceqlSearchTargets, queryValueFromFilters));\n } else {\n subQueries.push(\n this._request('/api/search', {\n q: queryValueFromFilters,\n limit: options.targets[0].limit ?? DEFAULT_LIMIT,\n spss: options.targets[0].spss ?? DEFAULT_SPSS,\n start: options.range.from.unix(),\n end: options.range.to.unix(),\n }).pipe(\n map((response) => {\n return {\n data: formatTraceQLResponse(\n response.data.traces,\n this.instanceSettings,\n targets.traceqlSearch[0].tableType\n ),\n };\n }),\n catchError((err) => {\n return of({ error: { message: getErrorMessage(err.data.message) }, data: [] });\n })\n )\n );\n }\n }\n } catch (error) {\n return of({ error: { message: error instanceof Error ? error.message : 'Unknown error occurred' }, data: [] });\n }\n }\n\n if (targets.upload?.length) {\n if (this.uploadedJson) {\n reportInteraction('grafana_traces_json_file_uploaded', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n });\n\n const jsonData = JSON.parse(this.uploadedJson);\n const isTraceData = jsonData.batches;\n const isServiceGraphData =\n Array.isArray(jsonData) && jsonData.some((df) => df?.meta?.preferredVisualisationType === 'nodeGraph');\n\n if (isTraceData) {\n subQueries.push(of(transformFromOTEL(jsonData.batches, this.nodeGraph?.enabled)));\n } else if (isServiceGraphData) {\n subQueries.push(of({ data: jsonData, state: LoadingState.Done }));\n } else {\n subQueries.push(of({ error: { message: 'Unable to parse uploaded data.' }, data: [] }));\n }\n } else {\n subQueries.push(of({ data: [], state: LoadingState.Done }));\n }\n }\n\n if (this.serviceMap?.datasourceUid && targets.serviceMap?.length > 0) {\n reportInteraction('grafana_traces_service_graph_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n hasServiceMapQuery: targets.serviceMap[0].serviceMapQuery ? true : false,\n });\n\n const dsId = this.serviceMap.datasourceUid;\n const tempoDsUid = this.uid;\n subQueries.push(\n serviceMapQuery(options, dsId, tempoDsUid).pipe(\n concatMap((result) =>\n rateQuery(options, result, dsId).pipe(\n concatMap((result) => errorAndDurationQuery(options, result, dsId, tempoDsUid))\n )\n )\n )\n );\n }\n\n return merge(...subQueries);\n }\n\n isTraceQlMetricsQuery(query: string): boolean {\n // Check whether this is a metrics query by checking if it contains a metrics function\n const metricsFnRegex =\n /\\|\\s*(rate|count_over_time|avg_over_time|max_over_time|min_over_time|quantile_over_time)\\s*\\(/;\n return !!query.trim().match(metricsFnRegex);\n }\n\n isTraceIdQuery(query: string): boolean {\n const hexOnlyRegex = /^[0-9A-Fa-f]*$/;\n // Check whether this is a trace ID or traceQL query by checking if it only contains hex characters\n return !!query.trim().match(hexOnlyRegex);\n }\n\n applyTemplateVariables(query: TempoQuery, scopedVars: ScopedVars) {\n return this.applyVariables(query, scopedVars);\n }\n\n interpolateVariablesInQueries(queries: TempoQuery[], scopedVars: ScopedVars): TempoQuery[] {\n if (!queries || queries.length === 0) {\n return [];\n }\n\n return queries.map((query) => {\n return {\n ...query,\n datasource: this.getRef(),\n ...this.applyVariables(query, scopedVars),\n };\n });\n }\n\n applyVariables(query: TempoQuery, scopedVars: ScopedVars) {\n const expandedQuery = { ...query };\n\n if (query.linkedQuery) {\n expandedQuery.linkedQuery = {\n ...query.linkedQuery,\n expr: this.templateSrv.replace(query.linkedQuery?.expr ?? '', scopedVars),\n };\n }\n\n if (query.filters) {\n expandedQuery.filters = query.filters.map((filter) => {\n const updatedFilter = {\n ...filter,\n tag: this.templateSrv.replace(filter.tag ?? '', scopedVars),\n };\n\n if (filter.value) {\n updatedFilter.value =\n typeof filter.value === 'string'\n ? this.templateSrv.replace(filter.value ?? '', scopedVars, VariableFormatID.Pipe)\n : filter.value.map((v) => this.templateSrv.replace(v ?? '', scopedVars, VariableFormatID.Pipe));\n }\n\n return updatedFilter;\n });\n }\n\n return {\n ...expandedQuery,\n query: this.templateSrv.replace(query.query ?? '', scopedVars, VariableFormatID.Pipe),\n serviceName: this.templateSrv.replace(query.serviceName ?? '', scopedVars),\n spanName: this.templateSrv.replace(query.spanName ?? '', scopedVars),\n search: this.templateSrv.replace(query.search ?? '', scopedVars),\n minDuration: this.templateSrv.replace(query.minDuration ?? '', scopedVars),\n maxDuration: this.templateSrv.replace(query.maxDuration ?? '', scopedVars),\n serviceMapQuery: Array.isArray(query.serviceMapQuery)\n ? query.serviceMapQuery.map((query) => this.templateSrv.replace(query, scopedVars))\n : this.templateSrv.replace(query.serviceMapQuery ?? '', scopedVars),\n };\n }\n\n handleMetricsSummary = (target: TempoQuery, query: string, options: DataQueryRequest<TempoQuery>) => {\n reportInteraction('grafana_traces_metrics_summary_queried', {\n datasourceType: 'tempo',\n app: options.app ?? '',\n grafana_version: config.buildInfo.version,\n filterCount: target.groupBy?.length ?? 0,\n });\n\n if (query === '{}') {\n return of({\n error: {\n message:\n 'Please ensure you do not have an empty query. This is so filters are applied and the metrics summary is not generated from all spans.',\n },\n data: emptyResponse,\n });\n }\n\n const groupBy = target.groupBy ? this.formatGroupBy(target.groupBy) : '';\n return this._request('/api/metrics/summary', {\n q: query,\n groupBy,\n start: options.range.from.unix(),\n end: options.range.to.unix(),\n }).pipe(\n map((response) => {\n if (!response.data.summaries) {\n return {\n error: {\n message: getErrorMessage(\n `No summary data for '${groupBy}'. Note: the metrics summary API only considers spans of kind = server. You can check if the attributes exist by running a TraceQL query like { attr_key = attr_value && kind = server }`\n ),\n },\n data: emptyResponse,\n };\n }\n // Check if any of the results have series data as older versions of Tempo placed the series data in a different structure\n const hasSeries = response.data.summaries.some((summary: MetricsSummary) => summary.series.length > 0);\n if (!hasSeries) {\n return {\n error: {\n message: getErrorMessage(`No series data. Ensure you are using an up to date version of Tempo`),\n },\n data: emptyResponse,\n };\n }\n return {\n data: createTableFrameFromMetricsSummaryQuery(response.data.summaries, query, this.instanceSettings),\n };\n }),\n catchError((error) => {\n return of({\n error: { message: getErrorMessage(error.data.message) },\n data: emptyResponse,\n });\n })\n );\n };\n\n formatGroupBy = (groupBy: TraceqlFilter[]) => {\n return groupBy\n ?.filter((f) => f.tag)\n .map((f) => {\n if (f.scope === TraceqlSearchScope.Unscoped) {\n return `.${f.tag}`;\n }\n return f.scope !== TraceqlSearchScope.Intrinsic ? `${f.scope}.${f.tag}` : f.tag;\n })\n .join(', ');\n };\n\n hasGroupBy = (query: TempoQuery) => {\n return query.groupBy?.find((gb) => gb.tag);\n };\n\n /**\n * Handles the simplest of the queries where we have just a trace id and return trace data for it.\n * @param options\n * @param targets\n * @private\n */\n handleTraceIdQuery(options: DataQueryRequest<TempoQuery>, targets: TempoQuery[]): Observable<DataQueryResponse> {\n const validTargets = targets\n .filter((t) => t.query)\n .map((t): TempoQuery => ({ ...t, query: t.query?.trim(), queryType: 'traceId' }));\n if (!validTargets.length) {\n return EMPTY;\n }\n\n const traceRequest = this.traceIdQueryRequest(options, validTargets);\n\n return super.query(traceRequest).pipe(\n map((response) => {\n if (response.error) {\n return response;\n }\n return transformTrace(response, this.instanceSettings, this.nodeGraph?.enabled);\n })\n );\n }\n\n handleTraceQlQuery = (\n options: DataQueryRequest<TempoQuery>,\n targets: {\n [type: string]: TempoQuery[];\n },\n queryValue: string\n ): Observable<DataQueryResponse> => {\n if (config.featureToggles.traceQLStreaming && this.isFeatureAvailable(FeatureName.streaming)) {\n return this.handleStreamingSearch(options, targets.traceql, queryValue);\n } else {\n return this._request('/api/search', {\n q: queryValue,\n limit: options.targets[0].limit ?? DEFAULT_LIMIT,\n spss: options.targets[0].spss ?? DEFAULT_SPSS,\n start: options.range.from.unix(),\n end: options.range.to.unix(),\n }).pipe(\n map((response) => {\n return {\n data: formatTraceQLResponse(response.data.traces, this.instanceSettings, targets.traceql[0].tableType),\n };\n }),\n catchError((err) => {\n return of({ error: { message: getErrorMessage(err.data.message) }, data: [] });\n })\n );\n }\n };\n\n handleTraceQlMetricsQuery = (\n options: DataQueryRequest<TempoQuery>,\n queryValue: string\n ): Observable<DataQueryResponse> => {\n return this._request('/api/metrics/query_range', {\n query: queryValue,\n start: options.range.from.unix(),\n end: options.range.to.unix(),\n }).pipe(\n map((response) => {\n return {\n data: formatTraceQLMetrics(queryValue, response.data),\n };\n }),\n catchError((err) => {\n return of({ error: { message: getErrorMessage(err.data.message) }, data: [] });\n })\n );\n };\n\n traceIdQueryRequest(options: DataQueryRequest<TempoQuery>, targets: TempoQuery[]): DataQueryRequest<TempoQuery> {\n const request = {\n ...options,\n targets,\n };\n\n if (this.traceQuery?.timeShiftEnabled) {\n request.range = options.range && {\n ...options.range,\n from: options.range.from.subtract(\n rangeUtil.intervalToMs(this.traceQuery?.spanStartTimeShift || '30m'),\n 'milliseconds'\n ),\n to: options.range.to.add(rangeUtil.intervalToMs(this.traceQuery?.spanEndTimeShift || '30m'), 'milliseconds'),\n };\n } else {\n request.range = { from: dateTime(0), to: dateTime(0), raw: { from: dateTime(0), to: dateTime(0) } };\n }\n\n return request;\n }\n\n // This function can probably be simplified by avoiding passing both `targets` and `query`,\n // since `query` is built from `targets`, if you look at how this function is currently called\n handleStreamingSearch(\n options: DataQueryRequest<TempoQuery>,\n targets: TempoQuery[],\n query: string\n ): Observable<DataQueryResponse> {\n if (query === '') {\n return EMPTY;\n }\n\n return merge(\n ...targets.map((target) =>\n doTempoChannelStream(\n { ...target, query },\n this, // the datasource\n options,\n this.instanceSettings\n )\n )\n );\n }\n\n async metadataRequest(url: string, params = {}) {\n return await lastValueFrom(this._request(url, params, { method: 'GET', hideFromInspector: true }));\n }\n\n private _request(\n apiUrl: string,\n data?: unknown,\n options?: Partial<BackendSrvRequest>\n ): Observable<Record<string, any>> {\n const params = data ? urlUtil.serializeParams(data) : '';\n const url = `${this.instanceSettings.url}${apiUrl}${params.length ? `?${params}` : ''}`;\n const req = { ...options, url };\n\n return getBackendSrv().fetch(req);\n }\n\n async testDatasource(): Promise<TestDataSourceResponse> {\n const options: BackendSrvRequest = {\n headers: {},\n method: 'GET',\n url: `${this.instanceSettings.url}/api/echo`,\n };\n\n return await lastValueFrom(\n getBackendSrv()\n .fetch(options)\n .pipe(\n mergeMap(() => {\n return of({ status: 'success', message: 'Data source successfully connected.' });\n }),\n catchError((err) => {\n return of({ status: 'error', message: getErrorMessage(err.data.message, 'Unable to connect with Tempo') });\n })\n )\n );\n }\n\n getQueryDisplayText(query: TempoQuery) {\n if (query.queryType !== 'nativeSearch') {\n return query.query ?? '';\n }\n\n const keys: Array<\n keyof Pick<TempoQuery, 'serviceName' | 'spanName' | 'search' | 'minDuration' | 'maxDuration' | 'limit'>\n > = ['serviceName', 'spanName', 'search', 'minDuration', 'maxDuration', 'limit'];\n return keys\n .filter((key) => query[key])\n .map((key) => `${startCase(key)}: ${query[key]}`)\n .join(', ');\n }\n\n buildSearchQuery(query: TempoQuery, timeRange?: { startTime: number; endTime?: number }): SearchQueryParams {\n let tags = query.search ?? '';\n\n let tempoQuery = pick(query, ['minDuration', 'maxDuration', 'limit']);\n // Remove empty properties\n tempoQuery = pickBy(tempoQuery, identity);\n\n if (query.serviceName) {\n tags += ` service.name=\"${query.serviceName}\"`;\n }\n if (query.spanName) {\n tags += ` name=\"${query.spanName}\"`;\n }\n\n // Set default limit\n if (!tempoQuery.limit) {\n tempoQuery.limit = DEFAULT_LIMIT;\n }\n\n // Validate query inputs and remove spaces if valid\n if (tempoQuery.minDuration) {\n tempoQuery.minDuration = this.templateSrv.replace(tempoQuery.minDuration ?? '');\n if (!isValidGoDuration(tempoQuery.minDuration)) {\n throw new Error('Please enter a valid min duration.');\n }\n tempoQuery.minDuration = tempoQuery.minDuration.replace(/\\s/g, '');\n }\n if (tempoQuery.maxDuration) {\n tempoQuery.maxDuration = this.templateSrv.replace(tempoQuery.maxDuration ?? '');\n if (!isValidGoDuration(tempoQuery.maxDuration)) {\n throw new Error('Please enter a valid max duration.');\n }\n tempoQuery.maxDuration = tempoQuery.maxDuration.replace(/\\s/g, '');\n }\n\n if (!Number.isInteger(tempoQuery.limit) || tempoQuery.limit <= 0) {\n throw new Error('Please enter a valid limit.');\n }\n\n let searchQuery: SearchQueryParams = { tags, ...tempoQuery };\n\n if (timeRange) {\n searchQuery.start = timeRange.startTime;\n searchQuery.end = timeRange.endTime;\n }\n\n return searchQuery;\n }\n\n // Get linked loki search datasource. Fall back to legacy loki search/trace to logs config\n getLokiSearchDS = (): string | undefined => {\n const legacyLogsDatasourceUid =\n this.tracesToLogs?.lokiSearch !== false && this.lokiSearch === undefined\n ? this.tracesToLogs?.datasourceUid\n : undefined;\n return this.lokiSearch?.datasourceUid ?? legacyLogsDatasourceUid;\n };\n}\n\nfunction queryPrometheus(request: DataQueryRequest<PromQuery>, datasourceUid: string) {\n return from(getDataSourceSrv().get(datasourceUid)).pipe(\n mergeMap((ds) => {\n return (ds as PrometheusDatasource).query(request);\n })\n );\n}\n\nfunction serviceMapQuery(\n request: DataQueryRequest<TempoQuery>,\n datasourceUid: string,\n tempoDatasourceUid: string\n): Observable<ServiceMapQueryResponse> {\n const serviceMapRequest = makePromServiceMapRequest(request);\n\n return queryPrometheus(serviceMapRequest, datasourceUid).pipe(\n // Just collect all the responses first before processing into node graph data\n toArray(),\n map((responses: DataQueryResponse[]) => {\n const errorRes = responses.find((res) => !!res.error);\n if (errorRes) {\n throw new Error(getErrorMessage(errorRes.error?.message));\n }\n\n const { nodes, edges } = mapPromMetricsToServiceMap(responses, request.range);\n if (nodes.fields.length > 0 && edges.fields.length > 0) {\n const nodeLength = nodes.fields[0].values.length;\n const edgeLength = edges.fields[0].values.length;\n\n reportInteraction('grafana_traces_service_graph_size', {\n datasourceType: 'tempo',\n grafana_version: config.buildInfo.version,\n nodeLength,\n edgeLength,\n });\n }\n\n // No handling of multiple targets assume just one. NodeGraph does not support it anyway, but still should be\n // fixed at some point.\n const { serviceMapIncludeNamespace, refId } = request.targets[0];\n nodes.refId = refId;\n edges.refId = refId;\n\n if (serviceMapIncludeNamespace) {\n nodes.fields[0].config = getFieldConfig(\n datasourceUid, // datasourceUid\n tempoDatasourceUid, // tempoDatasourceUid\n '__data.fields.title', // targetField\n '__data.fields[0]', // tempoField\n undefined, // sourceField\n { targetNamespace: '__data.fields.subtitle' }\n );\n\n edges.fields[0].config = getFieldConfig(\n datasourceUid, // datasourceUid\n tempoDatasourceUid, // tempoDatasourceUid\n '__data.fields.targetName', // targetField\n '__data.fields.target', // tempoField\n '__data.fields.sourceName', // sourceField\n { targetNamespace: '__data.fields.targetNamespace', sourceNamespace: '__data.fields.sourceNamespace' }\n );\n } else {\n nodes.fields[0].config = getFieldConfig(\n datasourceUid,\n tempoDatasourceUid,\n '__data.fields.id',\n '__data.fields[0]'\n );\n edges.fields[0].config = getFieldConfig(\n datasourceUid,\n tempoDatasourceUid,\n '__data.fields.target',\n '__data.fields.target',\n '__data.fields.source'\n );\n }\n\n return {\n nodes,\n edges,\n state: LoadingState.Done,\n };\n })\n );\n}\n\nfunction rateQuery(\n request: DataQueryRequest<TempoQuery>,\n serviceMapResponse: ServiceMapQueryResponse,\n datasourceUid: string\n): Observable<ServiceMapQueryResponseWithRates> {\n const serviceMapRequest = makePromServiceMapRequest(request);\n serviceMapRequest.targets = makeServiceGraphViewRequest([buildExpr(rateMetric, defaultTableFilter, request)]);\n\n return queryPrometheus(serviceMapRequest, datasourceUid).pipe(\n toArray(),\n map((responses: DataQueryResponse[]) => {\n const errorRes = responses.find((res) => !!res.error);\n if (errorRes) {\n throw new Error(getErrorMessage(errorRes.error?.message));\n }\n return {\n rates: responses[0]?.data ?? [],\n nodes: serviceMapResponse.nodes,\n edges: serviceMapResponse.edges,\n };\n })\n );\n}\n\n// we need the response from the rate query to get the rate span_name(s),\n// -> which determine the errorRate/duration span_name(s) we need to query\nfunction errorAndDurationQuery(\n request: DataQueryRequest<TempoQuery>,\n rateResponse: ServiceMapQueryResponseWithRates,\n datasourceUid: string,\n tempoDatasourceUid: string\n) {\n let serviceGraphViewMetrics = [];\n let errorRateBySpanName = '';\n let durationsBySpanName: string[] = [];\n\n let labels = [];\n if (rateResponse.rates[0] && request.app === CoreApp.Explore) {\n const spanNameField = rateResponse.rates[0].fields.find((field) => field.name === 'span_name');\n if (spanNameField && spanNameField.values) {\n labels = spanNameField.values;\n }\n } else if (rateResponse.rates) {\n rateResponse.rates.map((df: DataFrame | DataFrameDTO) => {\n const spanNameLabels = df.fields.find((field) => field.labels?.['span_name']);\n if (spanNameLabels) {\n labels.push(spanNameLabels.labels?.['span_name']);\n }\n });\n }\n const spanNames = getEscapedSpanNames(labels);\n\n if (spanNames.length > 0) {\n errorRateBySpanName = buildExpr(errorRateMetric, 'span_name=~\"' + spanNames.join('|') + '\"', request);\n serviceGraphViewMetrics.push(errorRateBySpanName);\n spanNames.map((name: string) => {\n const metric = buildExpr(durationMetric, 'span_name=~\"' + name + '\"', request);\n durationsBySpanName.push(metric);\n serviceGraphViewMetrics.push(metric);\n });\n }\n\n const serviceMapRequest = makePromServiceMapRequest(request);\n serviceMapRequest.targets = makeServiceGraphViewRequest(serviceGraphViewMetrics);\n\n return queryPrometheus(serviceMapRequest, datasourceUid).pipe(\n // Just collect all the responses first before processing into node graph data\n toArray(),\n map((errorAndDurationResponse: DataQueryResponse[]) => {\n const errorRes = errorAndDurationResponse.find((res) => !!res.error);\n if (errorRes) {\n throw new Error(getErrorMessage(errorRes.error?.message));\n }\n\n const serviceGraphView = getServiceGraphView(\n request,\n rateResponse,\n errorAndDurationResponse[0],\n errorRateBySpanName,\n durationsBySpanName,\n datasourceUid,\n tempoDatasourceUid\n );\n\n if (serviceGraphView.fields.length === 0) {\n return {\n data: [rateResponse.nodes, rateResponse.edges],\n state: LoadingState.Done,\n };\n }\n\n return {\n data: [serviceGraphView, rateResponse.nodes, rateResponse.edges],\n state: LoadingState.Done,\n };\n })\n );\n}\n\nfunction makePromLink(title: string, expr: string, datasourceUid: string, instant: boolean) {\n return {\n url: '',\n title,\n internal: {\n query: {\n expr: expr,\n range: !instant,\n exemplar: !instant,\n instant: instant,\n },\n datasourceUid,\n datasourceName: getDataSourceSrv().getInstanceSettings(datasourceUid)?.name ?? '',\n },\n };\n}\n\nexport function getEscapedSpanNames(values: string[]) {\n return values.map((value: string) => value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\\\\\$&'));\n}\n\nexport function getFieldConfig(\n datasourceUid: string,\n tempoDatasourceUid: string,\n targetField: string,\n tempoField: string,\n sourceField?: string,\n namespaceFields?: { targetNamespace: string; sourceNamespace?: string }\n) {\n let source = sourceField ? `client=\"\\${${sourceField}}\",` : '';\n let target = `server=\"\\${${targetField}}\"`;\n let serverSumBy = 'server';\n\n if (namespaceFields !== undefined) {\n const { targetNamespace } = namespaceFields;\n target += `,server_service_namespace=\"\\${${targetNamespace}}\"`;\n serverSumBy += ', server_service_namespace';\n\n if (source) {\n const { sourceNamespace } = namespaceFields;\n source += `client_service_namespace=\"\\${${sourceNamespace}}\",`;\n serverSumBy += ', client_service_namespace';\n }\n }\n\n return {\n links: [\n makePromLink(\n 'Request rate',\n `sum by (client, ${serverSumBy})(rate(${totalsMetric}{${source}${target}}[$__rate_interval]))`,\n datasourceUid,\n false\n ),\n makePromLink(\n 'Request histogram',\n `histogram_quantile(0.9, sum(rate(${histogramMetric}{${source}${target}}[$__rate_interval])) by (le, client, ${serverSumBy}))`,\n datasourceUid,\n false\n ),\n makePromLink(\n 'Failed request rate',\n `sum by (client, ${serverSumBy})(rate(${failedMetric}{${source}${target}}[$__rate_interval]))`,\n datasourceUid,\n false\n ),\n makeTempoLink('View traces', `\\${${tempoField}}`, '', tempoDatasourceUid),\n ],\n };\n}\n\nexport function makeTempoLink(title: string, serviceName: string, spanName: string, datasourceUid: string) {\n let query: TempoQuery = { refId: 'A', queryType: 'traceqlSearch', filters: [] };\n if (serviceName !== '') {\n query.filters.push({\n id: 'service-name',\n scope: TraceqlSearchScope.Resource,\n tag: 'service.name',\n value: serviceName,\n operator: '=',\n valueType: 'string',\n });\n }\n if (spanName !== '') {\n query.filters.push({\n id: 'span-name',\n scope: TraceqlSearchScope.Span,\n tag: 'name',\n value: spanName,\n operator: '=',\n valueType: 'string',\n });\n }\n\n return {\n url: '',\n title,\n internal: {\n query,\n datasourceUid,\n datasourceName: getDataSourceSrv().getInstanceSettings(datasourceUid)?.name ?? '',\n },\n };\n}\n\nfunction makePromServiceMapRequest(options: DataQueryRequest<TempoQuery>): DataQueryRequest<PromQuery> {\n return {\n ...options,\n targets: serviceMapMetrics.map((metric) => {\n const { serviceMapQuery, serviceMapIncludeNamespace: serviceMapIncludeNamespace } = options.targets[0];\n const extraSumByFields = serviceMapIncludeNamespace ? ', client_service_namespace, server_service_namespace' : '';\n const queries = Array.isArray(serviceMapQuery) ? serviceMapQuery : [serviceMapQuery];\n const subExprs = queries.map(\n (query) => `sum by (client, server${extraSumByFields}) (rate(${metric}${query || ''}[$__range]))`\n );\n return {\n format: 'table',\n refId: metric,\n // options.targets[0] is not correct here, but not sure what should happen if you have multiple queries for\n // service map at the same time anyway\n expr: subExprs.join(' OR '),\n instant: true,\n };\n }),\n };\n}\n\nfunction getServiceGraphView(\n request: DataQueryRequest<TempoQuery>,\n rateResponse: ServiceMapQueryResponseWithRates,\n secondResponse: DataQueryResponse,\n errorRateBySpanName: string,\n durationsBySpanName: string[],\n datasourceUid: string,\n tempoDatasourceUid: string\n) {\n let df: any = { fields: [] };\n\n const rate = rateResponse.rates.filter((x) => {\n return x.refId === buildExpr(rateMetric, defaultTableFilter, request);\n });\n const errorRate = secondResponse.data.filter((x) => {\n return x.refId === errorRateBySpanName;\n });\n const duration = secondResponse.data.filter((x) => {\n return durationsBySpanName.includes(x.refId ?? '');\n });\n\n if (rate.length > 0 && rate[0].fields?.length > 2) {\n df.fields.push({\n ...rate[0].fields[1],\n name: 'Name',\n config: {\n filterable: false,\n },\n });\n\n df.fields.push({\n ...rate[0].fields[2],\n name: 'Rate',\n config: {\n links: [\n makePromLink(\n 'Rate',\n buildLinkExpr(buildExpr(rateMetric, 'span_name=\"${__data.fields[0]}\"', request)),\n datasourceUid,\n false\n ),\n ],\n decimals: 2,\n },\n });\n\n df.fields.push({\n ...rate[0].fields[2],\n name: ' ',\n labels: null,\n config: {\n color: {\n mode: 'continuous-BlPu',\n },\n custom: {\n cellOptions: {\n mode: BarGaugeDisplayMode.Lcd,\n type: TableCellDisplayMode.Gauge,\n },\n },\n decimals: 3,\n },\n });\n }\n\n if (errorRate.length > 0 && errorRate[0].fields?.length > 2) {\n const errorRateNames = errorRate[0].fields[1]?.values ?? [];\n const errorRateValues = errorRate[0].fields[2]?.values ?? [];\n let errorRateObj: any = {};\n errorRateNames.map((name: string, index: number) => {\n errorRateObj[name] = { value: errorRateValues[index] };\n });\n\n const values = getRateAlignedValues({ ...rate }, errorRateObj);\n\n df.fields.push({\n ...errorRate[0].fields[2],\n name: 'Error Rate',\n values: values,\n config: {\n links: [\n makePromLink(\n 'Error Rate',\n buildLinkExpr(buildExpr(errorRateMetric, 'span_name=\"${__data.fields[0]}\"', request)),\n datasourceUid,\n false\n ),\n ],\n decimals: 2,\n },\n });\n\n df.fields.push({\n ...errorRate[0].fields[2],\n name: ' ',\n values: values,\n labels: null,\n config: {\n color: {\n mode: 'continuous-RdYlGr',\n },\n custom: {\n cellOptions: {\n mode: BarGaugeDisplayMode.Lcd,\n type: TableCellDisplayMode.Gauge,\n },\n },\n decimals: 3,\n },\n });\n }\n\n if (duration.length > 0) {\n let durationObj: any = {};\n duration.forEach((d) => {\n if (d.fields.length > 1) {\n const delimiter = d.refId?.includes('span_name=~\"') ? 'span_name=~\"' : 'span_name=\"';\n const name = d.refId?.split(delimiter)[1].split('\"}')[0];\n durationObj[name!] = { value: d.fields[1].values[0] };\n }\n });\n if (Object.keys(durationObj).length > 0) {\n df.fields.push({\n ...duration[0].fields[1],\n name: 'Duration (p90)',\n values: getRateAlignedValues({ ...rate }, durationObj),\n config: {\n links: [\n makePromLink(\n 'Duration',\n buildLinkExpr(buildExpr(durationMetric, 'span_name=\"${__data.fields[0]}\"', request)),\n datasourceUid,\n false\n ),\n ],\n unit: 's',\n },\n });\n }\n }\n\n if (df.fields.length > 0 && df.fields[0].values) {\n df.fields.push({\n name: 'Links',\n type: FieldType.string,\n values: df.fields[0].values.map(() => {\n return 'Tempo';\n }),\n config: {\n links: [makeTempoLink('Tempo', '', `\\${__data.fields[0]}`, tempoDatasourceUid)],\n },\n });\n }\n\n return df;\n}\n\nexport function buildExpr(\n metric: { expr: string; params: string[]; topk?: number },\n extraParams: string,\n request: DataQueryRequest<TempoQuery>\n): string {\n let serviceMapQuery = request.targets[0]?.serviceMapQuery ?? '';\n const serviceMapQueries = Array.isArray(serviceMapQuery) ? serviceMapQuery : [serviceMapQuery];\n const metricParamsArray = serviceMapQueries.map((query) => {\n // remove surrounding curly braces from serviceMapQuery\n const serviceMapQueryMatch = query.match(/^{(.*)}$/);\n if (serviceMapQueryMatch?.length) {\n query = serviceMapQueryMatch[1];\n }\n // map serviceGraph metric tags to serviceGraphView metric tags\n query = query.replace('client', 'service').replace('server', 'service');\n return query.includes('span_name')\n ? metric.params.concat(query)\n : metric.params\n .concat(query)\n .concat(extraParams)\n .filter((item: string) => item);\n });\n const exprs = metricParamsArray.map((params) => metric.expr.replace('{}', '{' + params.join(',') + '}'));\n const expr = exprs.join(' OR ');\n if (metric.topk) {\n return `topk(${metric.topk}, ${expr})`;\n }\n return expr;\n}\n\nexport function buildLinkExpr(expr: string) {\n // don't want top 5 or by span name in links\n expr = expr.replace('topk(5, ', '').replace(' by (span_name))', '');\n return expr.replace('__range', '__rate_interval');\n}\n\n// query result frames can come back in any order\n// here we align the table col values to the same row name (rateName) across the table\nexport function getRateAlignedValues(\n rateResp: DataQueryResponseData[],\n objToAlign: { [x: string]: { value: string } }\n) {\n const rateNames = rateResp[0]?.fields[1]?.values ?? [];\n let values: string[] = [];\n\n for (let i = 0; i < rateNames.length; i++) {\n if (Object.keys(objToAlign).includes(rateNames[i])) {\n values.push(objToAlign[rateNames[i]].value);\n } else {\n values.push('0');\n }\n }\n\n return values;\n}\n\nexport function makeServiceGraphViewRequest(metrics: string[]): PromQuery[] {\n return metrics.map((metric) => {\n return {\n refId: metric,\n expr: metric,\n instant: true,\n };\n });\n}\n","import { SelectableValue } from '@grafana/data';\nimport type { Monaco, monacoTypes } from '@grafana/ui';\n\nimport TempoLanguageProvider from '../../language_provider';\n\ninterface Props {\n languageProvider: TempoLanguageProvider;\n}\n\n/**\n * Class that implements CompletionItemProvider interface and allows us to provide suggestion for the Monaco\n * autocomplete system.\n */\nexport class CompletionProvider implements monacoTypes.languages.CompletionItemProvider {\n languageProvider: TempoLanguageProvider;\n\n constructor(props: Props) {\n this.languageProvider = props.languageProvider;\n }\n\n triggerCharacters = ['=', ' '];\n\n // We set these directly and ae required for the provider to function.\n monaco: Monaco | undefined;\n editor: monacoTypes.editor.IStandaloneCodeEditor | undefined;\n\n private cachedValues: { [key: string]: Array<SelectableValue<string>> } = {};\n\n provideCompletionItems(\n model: monacoTypes.editor.ITextModel,\n position: monacoTypes.Position\n ): monacoTypes.languages.ProviderResult<monacoTypes.languages.CompletionList> {\n // Should not happen, this should not be called before it is initialized\n if (!(this.monaco && this.editor)) {\n throw new Error('provideCompletionItems called before CompletionProvider was initialized');\n }\n\n // if the model-id does not match, then this call is from a different editor-instance,\n // not \"our instance\", so return nothing\n if (this.editor.getModel()?.id !== model.id) {\n return { suggestions: [] };\n }\n\n const { range, offset } = getRangeAndOffset(this.monaco, model, position);\n const situation = this.getSituation(model.getValue(), offset);\n const completionItems = this.getCompletions(situation);\n\n return completionItems.then((items) => {\n // monaco by-default alphabetically orders the items.\n // to stop it, we use a number-as-string sortkey,\n // so that monaco keeps the order we use\n const maxIndexDigits = items.length.toString().length;\n const suggestions: monacoTypes.languages.CompletionItem[] = items.map((item, index) => {\n const suggestion: monacoTypes.languages.CompletionItem = {\n kind: getMonacoCompletionItemKind(item.type, this.monaco!),\n label: item.label,\n insertText: item.insertText,\n sortText: index.toString().padStart(maxIndexDigits, '0'), // to force the order we have\n range,\n };\n return suggestion;\n });\n return { suggestions };\n });\n }\n\n private async getTagValues(tagName: string): Promise<Array<SelectableValue<string>>> {\n let tagValues: Array<SelectableValue<string>>;\n\n if (this.cachedValues.hasOwnProperty(tagName)) {\n tagValues = this.cachedValues[tagName];\n } else {\n tagValues = await this.languageProvider.getOptionsV1(tagName);\n this.cachedValues[tagName] = tagValues;\n }\n return tagValues;\n }\n\n /**\n * Get suggestion based on the situation we are in like whether we should suggest tag names or values.\n * @param situation\n * @private\n */\n private async getCompletions(situation: Situation): Promise<Completion[]> {\n switch (situation.type) {\n // Not really sure what would make sense to suggest in this case so just leave it\n case 'UNKNOWN': {\n return [];\n }\n case 'EMPTY': {\n return this.getTagsCompletions();\n }\n case 'IN_NAME':\n return this.getTagsCompletions();\n case 'IN_VALUE':\n const tagValues = await this.getTagValues(situation.tagName);\n const items: Completion[] = [];\n\n const getInsertionText = (val: SelectableValue<string>): string => `\"${val.label}\"`;\n\n tagValues.forEach((val) => {\n if (val?.label) {\n items.push({\n label: val.label,\n insertText: getInsertionText(val),\n type: 'TAG_VALUE',\n });\n }\n });\n return items;\n default:\n throw new Error(`Unexpected situation ${situation}`);\n }\n }\n\n private getTagsCompletions(): Completion[] {\n const tags = this.languageProvider.getAutocompleteTags();\n return tags\n .sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'accent' }))\n .map((key) => ({\n label: key,\n insertText: key,\n type: 'TAG_NAME',\n }));\n }\n\n /**\n * Figure out where is the cursor and what kind of suggestions are appropriate.\n * @param text\n * @param offset\n */\n private getSituation(text: string, offset: number): Situation {\n if (text === '' || offset === 0 || text[text.length - 1] === ' ') {\n return {\n type: 'EMPTY',\n };\n }\n\n const textUntilCaret = text.substring(0, offset);\n\n const regex = /(?<key>[^= ]+)(?<equals>=)?(?<value>([^ \"]+)|\"([^\"]*)\")?/;\n const matches = textUntilCaret.match(new RegExp(regex, 'g'));\n\n if (matches?.length) {\n const last = matches[matches.length - 1];\n const lastMatched = last.match(regex);\n if (lastMatched) {\n const key = lastMatched.groups?.key;\n const equals = lastMatched.groups?.equals;\n\n if (!key) {\n return {\n type: 'EMPTY',\n };\n }\n\n if (!equals) {\n return {\n type: 'IN_NAME',\n };\n }\n\n return {\n type: 'IN_VALUE',\n tagName: key,\n };\n }\n }\n\n return {\n type: 'EMPTY',\n };\n }\n}\n\n/**\n * Get item kind which is used for icon next to the suggestion.\n * @param type\n * @param monaco\n */\nfunction getMonacoCompletionItemKind(type: CompletionType, monaco: Monaco): monacoTypes.languages.CompletionItemKind {\n switch (type) {\n case 'TAG_NAME':\n return monaco.languages.CompletionItemKind.Enum;\n case 'KEYWORD':\n return monaco.languages.CompletionItemKind.Keyword;\n case 'OPERATOR':\n return monaco.languages.CompletionItemKind.Operator;\n case 'TAG_VALUE':\n return monaco.languages.CompletionItemKind.EnumMember;\n case 'SCOPE':\n return monaco.languages.CompletionItemKind.Class;\n default:\n throw new Error(`Unexpected CompletionType: ${type}`);\n }\n}\n\nexport type CompletionType = 'TAG_NAME' | 'TAG_VALUE' | 'KEYWORD' | 'OPERATOR' | 'SCOPE';\ntype Completion = {\n type: CompletionType;\n label: string;\n insertText: string;\n};\n\nexport type Tag = {\n name: string;\n value: string;\n};\n\nexport type Situation =\n | {\n type: 'UNKNOWN';\n }\n | {\n type: 'EMPTY';\n }\n | {\n type: 'IN_NAME';\n }\n | {\n type: 'IN_VALUE';\n tagName: string;\n };\n\nfunction getRangeAndOffset(monaco: Monaco, model: monacoTypes.editor.ITextModel, position: monacoTypes.Position) {\n const word = model.getWordAtPosition(position);\n const range =\n word != null\n ? monaco.Range.lift({\n startLineNumber: position.lineNumber,\n endLineNumber: position.lineNumber,\n startColumn: word.startColumn,\n endColumn: word.endColumn,\n })\n : monaco.Range.fromPositions(position);\n\n // documentation says `position` will be \"adjusted\" in `getOffsetAt` so we clone it here just for sure.\n const positionClone = {\n column: position.column,\n lineNumber: position.lineNumber,\n };\n\n const offset = model.getOffsetAt(positionClone);\n return { offset, range };\n}\n","import type { languages } from 'monaco-editor';\n\nexport const languageConfiguration: languages.LanguageConfiguration = {\n // the default separators except `@$`\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!#%^&*()\\-=+\\[{\\]}\\\\|;:'\",.<>\\/?\\s]+)/g,\n brackets: [\n ['{', '}'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n folding: {},\n};\n\nconst operators = ['='];\n\nexport const language: languages.IMonarchLanguage = {\n ignoreCase: false,\n defaultToken: '',\n tokenPostfix: '.tagsfield',\n\n operators,\n\n // we include these common regular expressions\n symbols: /[=><!~?:&|+\\-*\\/^%]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,\n floatsuffix: /[fFlL]?/,\n\n tokenizer: {\n root: [\n // labels\n [/[a-z_.][\\w./_-]*(?=\\s*(=|!=|>|<|>=|<=|=~|!~))/, 'tag'],\n\n // all keywords have the same color\n [\n /[a-zA-Z_.]\\w*/,\n {\n cases: {\n '@default': 'identifier',\n },\n },\n ],\n\n // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], // non-teminated string\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'], // non-teminated string\n [/\"/, 'string', '@string_double'],\n [/'/, 'string', '@string_single'],\n\n // whitespace\n { include: '@whitespace' },\n\n // delimiters and operators\n [/[{}()\\[\\]]/, '@brackets'],\n [/[<>](?!@symbols)/, '@brackets'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': 'delimiter',\n '@default': '',\n },\n },\n ],\n\n // numbers\n [/\\d+/, 'number'],\n [/\\d*\\d+[eE]([\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\n [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],\n [/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],\n [/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],\n [/\\d[\\d']*\\d(@integersuffix)/, 'number'],\n [/\\d(@integersuffix)/, 'number'],\n ],\n\n string_double: [\n [/[^\\\\\"]+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/\"/, 'string', '@pop'],\n ],\n\n string_single: [\n [/[^\\\\']+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/'/, 'string', '@pop'],\n ],\n\n clauses: [\n [/[^(,)]/, 'tag'],\n [/\\)/, 'identifier', '@pop'],\n ],\n\n whitespace: [[/[ \\t\\r\\n]+/, 'white']],\n },\n};\n\nexport const languageDefinition = {\n id: 'tagsfield',\n extensions: ['.tagsfield'],\n aliases: ['tagsfield'],\n mimetypes: [],\n def: {\n language,\n languageConfiguration,\n },\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useRef } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { CodeEditor, Monaco, monacoTypes, useTheme2 } from '@grafana/ui';\n\nimport { notifyApp } from '../../_importedDependencies/actions/appNotification';\nimport { createErrorNotification } from '../../_importedDependencies/core/appNotification';\nimport { dispatch } from '../../_importedDependencies/store';\nimport { TempoDatasource } from '../../datasource';\n\nimport { CompletionProvider } from './autocomplete';\nimport { languageDefinition } from './syntax';\n\ninterface Props {\n placeholder: string;\n value: string;\n onChange: (val: string) => void;\n onBlur?: () => void;\n datasource: TempoDatasource;\n}\n\nexport function TagsField(props: Props) {\n const { onChange, onBlur, placeholder } = props;\n const setupAutocompleteFn = useAutocomplete(props.datasource);\n const theme = useTheme2();\n const styles = getStyles(theme, placeholder);\n\n return (\n <CodeEditor\n value={props.value}\n language={langId}\n onBlur={onBlur}\n onChange={onChange}\n containerStyles={styles.queryField}\n monacoOptions={{\n folding: false,\n fontSize: 14,\n lineNumbers: 'off',\n overviewRulerLanes: 0,\n renderLineHighlight: 'none',\n scrollbar: {\n vertical: 'hidden',\n verticalScrollbarSize: 8, // used as \"padding-right\"\n horizontal: 'hidden',\n horizontalScrollbarSize: 0,\n },\n scrollBeyondLastLine: false,\n wordWrap: 'on',\n }}\n onBeforeEditorMount={ensureTraceQL}\n onEditorDidMount={(editor, monaco) => {\n setupAutocompleteFn(editor, monaco);\n setupPlaceholder(editor, monaco, styles);\n setupAutoSize(editor);\n }}\n />\n );\n}\n\nfunction setupPlaceholder(editor: monacoTypes.editor.IStandaloneCodeEditor, monaco: Monaco, styles: EditorStyles) {\n const placeholderDecorators = [\n {\n range: new monaco.Range(1, 1, 1, 1),\n options: {\n className: styles.placeholder, // The placeholder text is in styles.placeholder\n isWholeLine: true,\n },\n },\n ];\n\n let decorators: string[] = [];\n\n const checkDecorators = (): void => {\n const model = editor.getModel();\n\n if (!model) {\n return;\n }\n\n const newDecorators = model.getValueLength() === 0 ? placeholderDecorators : [];\n decorators = model.deltaDecorations(decorators, newDecorators);\n };\n\n checkDecorators();\n editor.onDidChangeModelContent(checkDecorators);\n}\n\nfunction setupAutoSize(editor: monacoTypes.editor.IStandaloneCodeEditor) {\n const container = editor.getDomNode();\n const updateHeight = () => {\n if (container) {\n const contentHeight = Math.min(1000, editor.getContentHeight());\n const width = parseInt(container.style.width, 10);\n container.style.width = `${width}px`;\n container.style.height = `${contentHeight}px`;\n editor.layout({ width, height: contentHeight });\n }\n };\n editor.onDidContentSizeChange(updateHeight);\n updateHeight();\n}\n\n/**\n * Hook that returns function that will set up monaco autocomplete for the label selector\n * @param datasource\n */\nfunction useAutocomplete(datasource: TempoDatasource) {\n // We need the provider ref so we can pass it the label/values data later. This is because we run the call for the\n // values here but there is additional setup needed for the provider later on. We could run the getSeries() in the\n // returned function but that is run after the monaco is mounted so would delay the request a bit when it does not\n // need to.\n const providerRef = useRef<CompletionProvider>(\n new CompletionProvider({ languageProvider: datasource.languageProvider })\n );\n\n useEffect(() => {\n const fetchTags = async () => {\n try {\n await datasource.languageProvider.start();\n } catch (error) {\n if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n }\n };\n fetchTags();\n }, [datasource]);\n\n const autocompleteDisposeFun = useRef<(() => void) | null>(null);\n useEffect(() => {\n // when we unmount, we unregister the autocomplete-function, if it was registered\n return () => {\n autocompleteDisposeFun.current?.();\n };\n }, []);\n\n // This should be run in monaco onEditorDidMount\n return (editor: monacoTypes.editor.IStandaloneCodeEditor, monaco: Monaco) => {\n providerRef.current.editor = editor;\n providerRef.current.monaco = monaco;\n\n const { dispose } = monaco.languages.registerCompletionItemProvider(langId, providerRef.current);\n autocompleteDisposeFun.current = dispose;\n };\n}\n\n// we must only run the setup code once\nlet setupDone = false;\nconst langId = 'tagsfield';\n\nfunction ensureTraceQL(monaco: Monaco) {\n if (!setupDone) {\n setupDone = true;\n const { aliases, extensions, mimetypes, def } = languageDefinition;\n monaco.languages.register({ id: langId, aliases, extensions, mimetypes });\n monaco.languages.setMonarchTokensProvider(langId, def.language);\n monaco.languages.setLanguageConfiguration(langId, def.languageConfiguration);\n }\n}\n\ninterface EditorStyles {\n placeholder: string;\n queryField: string;\n}\n\nconst getStyles = (theme: GrafanaTheme2, placeholder: string): EditorStyles => {\n return {\n queryField: css({\n borderRadius: theme.shape.radius.default,\n border: `1px solid ${theme.components.input.borderColor}`,\n flex: 1,\n }),\n placeholder: css({\n '::after': {\n content: `'${placeholder}'`,\n fontFamily: theme.typography.fontFamilyMonospace,\n opacity: 0.3,\n },\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport React, { useCallback, useState, useEffect, useMemo } from 'react';\n\nimport { GrafanaTheme2, isValidGoDuration, SelectableValue, toOption } from '@grafana/data';\nimport { FetchError, getTemplateSrv, isFetchError, TemplateSrv } from '@grafana/runtime';\nimport { InlineFieldRow, InlineField, Input, Alert, useStyles2, fuzzyMatch, Select } from '@grafana/ui';\n\nimport { notifyApp } from '../_importedDependencies/actions/appNotification';\nimport { createErrorNotification } from '../_importedDependencies/core/appNotification';\nimport { dispatch } from '../_importedDependencies/store';\nimport { DEFAULT_LIMIT, TempoDatasource } from '../datasource';\nimport TempoLanguageProvider from '../language_provider';\nimport { TempoQuery } from '../types';\n\nimport { TagsField } from './TagsField/TagsField';\n\ninterface Props {\n datasource: TempoDatasource;\n query: TempoQuery;\n onChange: (value: TempoQuery) => void;\n onBlur?: () => void;\n onRunQuery: () => void;\n}\n\nconst durationPlaceholder = 'e.g. 1.2s, 100ms';\n\nconst NativeSearch = ({ datasource, query, onChange, onBlur, onRunQuery }: Props) => {\n const styles = useStyles2(getStyles);\n const languageProvider = useMemo(() => new TempoLanguageProvider(datasource), [datasource]);\n const [serviceOptions, setServiceOptions] = useState<Array<SelectableValue<string>>>();\n const [spanOptions, setSpanOptions] = useState<Array<SelectableValue<string>>>();\n const [error, setError] = useState<Error | FetchError | null>(null);\n const [inputErrors, setInputErrors] = useState<{ [key: string]: boolean }>({});\n const [isLoading, setIsLoading] = useState<{\n serviceName: boolean;\n spanName: boolean;\n }>({\n serviceName: false,\n spanName: false,\n });\n\n const loadOptions = useCallback(\n async (name: string, query = '') => {\n const lpName = name === 'serviceName' ? 'service.name' : 'name';\n setIsLoading((prevValue) => ({ ...prevValue, [name]: true }));\n\n try {\n const options = await languageProvider.getOptionsV1(lpName);\n const filteredOptions = options.filter((item) => (item.value ? fuzzyMatch(item.value, query).found : false));\n return filteredOptions;\n } catch (error) {\n if (isFetchError(error) && error?.status === 404) {\n setError(error);\n } else if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n return [];\n } finally {\n setIsLoading((prevValue) => ({ ...prevValue, [name]: false }));\n }\n },\n [languageProvider]\n );\n\n useEffect(() => {\n const fetchOptions = async () => {\n try {\n const [services, spans] = await Promise.all([loadOptions('serviceName'), loadOptions('spanName')]);\n if (query.serviceName && getTemplateSrv().containsTemplate(query.serviceName)) {\n services.push(toOption(query.serviceName));\n }\n setServiceOptions(services);\n if (query.spanName && getTemplateSrv().containsTemplate(query.spanName)) {\n spans.push(toOption(query.spanName));\n }\n setSpanOptions(spans);\n } catch (error) {\n // Display message if Tempo is connected but search 404's\n if (isFetchError(error) && error?.status === 404) {\n setError(error);\n } else if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n }\n };\n fetchOptions();\n }, [languageProvider, loadOptions, query.serviceName, query.spanName]);\n\n const onKeyDown = (keyEvent: React.KeyboardEvent) => {\n if (keyEvent.key === 'Enter' && (keyEvent.shiftKey || keyEvent.ctrlKey)) {\n onRunQuery();\n }\n };\n\n const handleOnChange = useCallback(\n (value: string) => {\n onChange({\n ...query,\n search: value,\n });\n },\n [onChange, query]\n );\n\n const templateSrv: TemplateSrv = getTemplateSrv();\n\n return (\n <>\n <div className={styles.container}>\n <Alert title=\"Deprecated query type\" severity=\"warning\">\n This query type has been deprecated and will be removed in Grafana v10.3. Please migrate to another Tempo\n query type.\n </Alert>\n <InlineFieldRow>\n <InlineField label=\"Service Name\" labelWidth={14} grow>\n <Select\n inputId=\"service\"\n options={serviceOptions}\n onOpenMenu={() => {\n loadOptions('serviceName');\n }}\n isLoading={isLoading.serviceName}\n value={serviceOptions?.find((v) => v?.value === query.serviceName) || query.serviceName}\n onChange={(v) => {\n onChange({\n ...query,\n serviceName: v?.value,\n });\n }}\n placeholder=\"Select a service\"\n isClearable\n onKeyDown={onKeyDown}\n aria-label={'select-service-name'}\n allowCustomValue={true}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Span Name\" labelWidth={14} grow>\n <Select\n inputId=\"spanName\"\n options={spanOptions}\n onOpenMenu={() => {\n loadOptions('spanName');\n }}\n isLoading={isLoading.spanName}\n value={spanOptions?.find((v) => v?.value === query.spanName) || query.spanName}\n onChange={(v) => {\n onChange({\n ...query,\n spanName: v?.value,\n });\n }}\n placeholder=\"Select a span\"\n isClearable\n onKeyDown={onKeyDown}\n aria-label={'select-span-name'}\n allowCustomValue={true}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Tags\" labelWidth={14} grow tooltip=\"Values should be in logfmt.\">\n <TagsField\n placeholder=\"http.status_code=200 error=true\"\n value={query.search || ''}\n onChange={handleOnChange}\n onBlur={onBlur}\n datasource={datasource}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Min Duration\" invalid={!!inputErrors.minDuration} labelWidth={14} grow>\n <Input\n id=\"minDuration\"\n value={query.minDuration || ''}\n placeholder={durationPlaceholder}\n onBlur={() => {\n const templatedMinDuration = templateSrv.replace(query.minDuration ?? '');\n if (query.minDuration && !isValidGoDuration(templatedMinDuration)) {\n setInputErrors({ ...inputErrors, minDuration: true });\n } else {\n setInputErrors({ ...inputErrors, minDuration: false });\n }\n }}\n onChange={(v) =>\n onChange({\n ...query,\n minDuration: v.currentTarget.value,\n })\n }\n onKeyDown={onKeyDown}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Max Duration\" invalid={!!inputErrors.maxDuration} labelWidth={14} grow>\n <Input\n id=\"maxDuration\"\n value={query.maxDuration || ''}\n placeholder={durationPlaceholder}\n onBlur={() => {\n const templatedMaxDuration = templateSrv.replace(query.maxDuration ?? '');\n if (query.maxDuration && !isValidGoDuration(templatedMaxDuration)) {\n setInputErrors({ ...inputErrors, maxDuration: true });\n } else {\n setInputErrors({ ...inputErrors, maxDuration: false });\n }\n }}\n onChange={(v) =>\n onChange({\n ...query,\n maxDuration: v.currentTarget.value,\n })\n }\n onKeyDown={onKeyDown}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField\n label=\"Limit\"\n invalid={!!inputErrors.limit}\n labelWidth={14}\n grow\n tooltip=\"Maximum number of returned results\"\n >\n <Input\n id=\"limit\"\n value={query.limit || ''}\n placeholder={`Default: ${DEFAULT_LIMIT}`}\n type=\"number\"\n onChange={(v) => {\n let limit = v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined;\n if (limit && (!Number.isInteger(limit) || limit <= 0)) {\n setInputErrors({ ...inputErrors, limit: true });\n } else {\n setInputErrors({ ...inputErrors, limit: false });\n }\n\n onChange({\n ...query,\n limit: v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined,\n });\n }}\n onKeyDown={onKeyDown}\n />\n </InlineField>\n </InlineFieldRow>\n </div>\n {error ? (\n <Alert title=\"Unable to connect to Tempo search\" severity=\"info\" className={styles.alert}>\n Please ensure that Tempo is configured with search enabled. If you would like to hide this tab, you can\n configure it in the <a href={`/datasources/edit/${datasource.uid}`}>datasource settings</a>.\n </Alert>\n ) : null}\n </>\n );\n};\n\nexport default NativeSearch;\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n container: css({\n maxWidth: '500px',\n }),\n alert: css({\n maxWidth: '75ch',\n marginTop: theme.spacing(2),\n }),\n});\n","import { css, cx } from '@emotion/css';\nimport Prism, { Grammar } from 'prismjs';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data/src';\nimport { useTheme2 } from '@grafana/ui/src';\n\nexport interface Props {\n query: string;\n lang: {\n grammar: Grammar;\n name: string;\n };\n className?: string;\n}\nexport function RawQuery({ query, lang, className }: Props) {\n const theme = useTheme2();\n const styles = getStyles(theme);\n const highlighted = Prism.highlight(query, lang.grammar, lang.name);\n\n return (\n <div\n className={cx(styles.editorField, 'prism-syntax-highlight', className)}\n aria-label=\"selector\"\n dangerouslySetInnerHTML={{ __html: highlighted }}\n />\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n editorField: css({\n fontFamily: theme.typography.fontFamilyMonospace,\n fontSize: theme.typography.bodySmall.fontSize,\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\nimport { useToggle } from 'react-use';\n\nimport { getValueFormat, GrafanaTheme2 } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { Collapse, Icon, Tooltip, useStyles2, Stack } from '@grafana/ui';\n\nimport { QueryStats } from '../loki/types';\n\nexport interface Props {\n title: string;\n collapsedInfo: string[];\n queryStats?: QueryStats | null;\n children: React.ReactNode;\n}\n\nexport function QueryOptionGroup({ title, children, collapsedInfo, queryStats }: Props) {\n const [isOpen, toggleOpen] = useToggle(false);\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles.wrapper}>\n <Collapse\n className={styles.collapse}\n collapsible\n isOpen={isOpen}\n onToggle={toggleOpen}\n label={\n <Stack gap={0}>\n <h6 className={styles.title}>{title}</h6>\n {!isOpen && (\n <div className={styles.description}>\n {collapsedInfo.map((x, i) => (\n <span key={i}>{x}</span>\n ))}\n </div>\n )}\n </Stack>\n }\n >\n <div className={styles.body}>{children}</div>\n </Collapse>\n\n {queryStats && config.featureToggles.lokiQuerySplitting && (\n <Tooltip content=\"Note: the query will be split into multiple parts and executed in sequence. Query limits will only apply each individual part.\">\n <Icon tabIndex={0} name=\"info-circle\" className={styles.tooltip} size=\"sm\" />\n </Tooltip>\n )}\n\n {queryStats && <p className={styles.stats}>{generateQueryStats(queryStats)}</p>}\n </div>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n collapse: css({\n backgroundColor: 'unset',\n border: 'unset',\n marginBottom: 0,\n\n ['> button']: {\n padding: theme.spacing(0, 1),\n },\n }),\n wrapper: css({\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'baseline',\n }),\n title: css({\n flexGrow: 1,\n overflow: 'hidden',\n fontSize: theme.typography.bodySmall.fontSize,\n fontWeight: theme.typography.fontWeightMedium,\n margin: 0,\n }),\n description: css({\n color: theme.colors.text.secondary,\n fontSize: theme.typography.bodySmall.fontSize,\n fontWeight: theme.typography.bodySmall.fontWeight,\n paddingLeft: theme.spacing(2),\n gap: theme.spacing(2),\n display: 'flex',\n }),\n body: css({\n display: 'flex',\n gap: theme.spacing(2),\n flexWrap: 'wrap',\n }),\n stats: css({\n margin: '0px',\n color: theme.colors.text.secondary,\n fontSize: theme.typography.bodySmall.fontSize,\n }),\n tooltip: css({\n marginRight: theme.spacing(0.25),\n }),\n };\n};\n\nconst generateQueryStats = (queryStats: QueryStats) => {\n if (queryStats.message) {\n return queryStats.message;\n }\n\n return `This query will process approximately ${convertUnits(queryStats)}.`;\n};\n\nconst convertUnits = (queryStats: QueryStats): string => {\n const { text, suffix } = getValueFormat('bytes')(queryStats.bytes, 1);\n return text + suffix;\n};\n","import React from 'react';\n\nimport { EditorField, EditorRow } from '@grafana/experimental';\nimport { AutoSizeInput, RadioButtonGroup } from '@grafana/ui';\n\nimport { QueryOptionGroup } from '../_importedDependencies/datasources/prometheus/QueryOptionGroup';\nimport { SearchTableType } from '../dataquery.gen';\nimport { DEFAULT_LIMIT, DEFAULT_SPSS } from '../datasource';\nimport { TempoQuery } from '../types';\n\ninterface Props {\n onChange: (value: TempoQuery) => void;\n query: Partial<TempoQuery> & TempoQuery;\n}\n\n/**\n * Parse a string value to integer. If the conversion fails, for example because we are prosessing an empty value for\n * a field, return a fallback (default) value.\n *\n * @param val the value to be parsed to an integer\n * @param fallback the fallback value\n * @returns the converted value or the fallback value if the conversion fails\n */\nconst parseIntWithFallback = (val: string, fallback: number) => {\n const parsed = parseInt(val, 10);\n return isNaN(parsed) ? fallback : parsed;\n};\n\nexport const TempoQueryBuilderOptions = React.memo<Props>(({ onChange, query }) => {\n if (!query.hasOwnProperty('limit')) {\n query.limit = DEFAULT_LIMIT;\n }\n\n if (!query.hasOwnProperty('tableType')) {\n query.tableType = SearchTableType.Traces;\n }\n\n const onLimitChange = (e: React.FormEvent<HTMLInputElement>) => {\n onChange({ ...query, limit: parseIntWithFallback(e.currentTarget.value, DEFAULT_LIMIT) });\n };\n const onSpssChange = (e: React.FormEvent<HTMLInputElement>) => {\n onChange({ ...query, spss: parseIntWithFallback(e.currentTarget.value, DEFAULT_SPSS) });\n };\n const onTableTypeChange = (val: SearchTableType) => {\n onChange({ ...query, tableType: val });\n };\n\n const collapsedInfoList = [\n `Limit: ${query.limit || DEFAULT_LIMIT}`,\n `Spans Limit: ${query.spss || DEFAULT_SPSS}`,\n `Table Format: ${query.tableType === SearchTableType.Traces ? 'Traces' : 'Spans'}`,\n ];\n\n return (\n <>\n <EditorRow>\n <QueryOptionGroup title=\"Options\" collapsedInfo={collapsedInfoList}>\n <EditorField label=\"Limit\" tooltip=\"Maximum number of traces to return.\">\n <AutoSizeInput\n className=\"width-4\"\n placeholder=\"auto\"\n type=\"number\"\n min={1}\n defaultValue={query.limit || DEFAULT_LIMIT}\n onCommitChange={onLimitChange}\n value={query.limit}\n />\n </EditorField>\n <EditorField label=\"Span Limit\" tooltip=\"Maximum number of spans to return for each span set.\">\n <AutoSizeInput\n className=\"width-4\"\n placeholder=\"auto\"\n type=\"number\"\n min={1}\n defaultValue={query.spss || DEFAULT_SPSS}\n onCommitChange={onSpssChange}\n value={query.spss}\n />\n </EditorField>\n <EditorField label=\"Table Format\" tooltip=\"How the query data should be displayed in the results table\">\n <RadioButtonGroup\n options={[\n { label: 'Traces', value: SearchTableType.Traces },\n { label: 'Spans', value: SearchTableType.Spans },\n ]}\n value={query.tableType}\n onChange={onTableTypeChange}\n />\n </EditorField>\n </QueryOptionGroup>\n </EditorRow>\n </>\n );\n});\n\nTempoQueryBuilderOptions.displayName = 'TempoQueryBuilderOptions';\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { Select, HorizontalGroup, Input, useStyles2 } from '@grafana/ui';\n\nimport { TraceqlFilter } from '../dataquery.gen';\n\nimport { operatorSelectableValue } from './utils';\n\ninterface Props {\n filter: TraceqlFilter;\n updateFilter: (f: TraceqlFilter) => void;\n isTagsLoading?: boolean;\n operators: string[];\n}\n\n// Support template variables (e.g., `$dur`, `$v_1`) and durations (e.g., `300µs`, `1.2ms`)\nconst validationRegex = /^(\\$\\w+)|(\\d+(?:\\.\\d)?\\d*(?:us|µs|ns|ms|s|m|h))$/;\n\nconst getStyles = () => ({\n noBoxShadow: css({\n boxShadow: 'none',\n '*:focus': {\n boxShadow: 'none',\n },\n }),\n});\n\nconst DurationInput = ({ filter, operators, updateFilter }: Props) => {\n const styles = useStyles2(getStyles);\n\n let invalid = false;\n if (typeof filter.value === 'string') {\n invalid = filter.value ? !validationRegex.test(filter.value.concat('')) : false;\n }\n\n return (\n <HorizontalGroup spacing={'none'}>\n <Select\n className={styles.noBoxShadow}\n inputId={`${filter.id}-operator`}\n options={operators.map(operatorSelectableValue)}\n value={filter.operator}\n onChange={(v) => {\n updateFilter({ ...filter, operator: v?.value });\n }}\n isClearable={false}\n aria-label={`select ${filter.id} operator`}\n allowCustomValue={true}\n width={8}\n />\n <Input\n className={styles.noBoxShadow}\n value={filter.value}\n onChange={(v) => {\n updateFilter({ ...filter, value: v.currentTarget.value });\n }}\n placeholder=\"e.g. 100ms, 1.2s\"\n aria-label={`select ${filter.id} value`}\n invalid={invalid}\n width={18}\n />\n </HorizontalGroup>\n );\n};\n\nexport default DurationInput;\n","import React from 'react';\n\nimport { InlineFieldRow, InlineField } from '@grafana/ui';\n\ninterface Props {\n label: string;\n tooltip?: string;\n children: React.ReactElement;\n}\nconst SearchField = ({ label, tooltip, children }: Props) => {\n return (\n <InlineFieldRow>\n <InlineField label={label} labelWidth={28} grow tooltip={tooltip}>\n {children}\n </InlineField>\n </InlineFieldRow>\n );\n};\n\nexport default SearchField;\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { AccessoryButton } from '@grafana/experimental';\nimport { HorizontalGroup, Select, useStyles2 } from '@grafana/ui';\n\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { TempoDatasource } from '../datasource';\nimport { TempoQuery } from '../types';\n\nimport InlineSearchField from './InlineSearchField';\nimport { replaceAt } from './utils';\n\ninterface Props {\n datasource: TempoDatasource;\n onChange: (value: TempoQuery) => void;\n query: Partial<TempoQuery> & TempoQuery;\n isTagsLoading: boolean;\n}\n\nexport const GroupByField = (props: Props) => {\n const { datasource, onChange, query, isTagsLoading } = props;\n const styles = useStyles2(getStyles);\n const generateId = () => uuidv4().slice(0, 8);\n\n useEffect(() => {\n if (!query.groupBy || query.groupBy.length === 0) {\n onChange({\n ...query,\n groupBy: [\n {\n id: generateId(),\n scope: TraceqlSearchScope.Span,\n },\n ],\n });\n }\n }, [onChange, query]);\n\n const getTags = (f: TraceqlFilter) => {\n return datasource!.languageProvider.getMetricsSummaryTags(f.scope);\n };\n\n const addFilter = () => {\n updateFilter({\n id: generateId(),\n scope: TraceqlSearchScope.Span,\n });\n };\n\n const removeFilter = (filter: TraceqlFilter) => {\n onChange({ ...query, groupBy: query.groupBy?.filter((f) => f.id !== filter.id) });\n };\n\n const updateFilter = (filter: TraceqlFilter) => {\n const copy = { ...query };\n copy.groupBy ||= [];\n const indexOfFilter = copy.groupBy.findIndex((f) => f.id === filter.id);\n if (indexOfFilter >= 0) {\n copy.groupBy = replaceAt(copy.groupBy, indexOfFilter, filter);\n } else {\n copy.groupBy.push(filter);\n }\n onChange(copy);\n };\n\n const scopeOptions = Object.values(TraceqlSearchScope).map((t) => ({ label: t, value: t }));\n\n return (\n <InlineSearchField\n label=\"Aggregate by\"\n tooltip=\"Select one or more tags to see the metrics summary. Note: the metrics summary API only considers spans of kind = server.\"\n >\n <>\n {query.groupBy?.map((f, i) => (\n <div key={f.id}>\n <HorizontalGroup spacing={'none'} width={'auto'}>\n <Select\n aria-label={`Select scope for filter ${i + 1}`}\n onChange={(v) => {\n updateFilter({ ...f, scope: v?.value, tag: '' });\n }}\n options={scopeOptions}\n placeholder=\"Select scope\"\n value={f.scope}\n />\n <Select\n aria-label={`Select tag for filter ${i + 1}`}\n isClearable\n isLoading={isTagsLoading}\n key={f.tag}\n onChange={(v) => {\n updateFilter({ ...f, tag: v?.value });\n }}\n options={getTags(f)?.map((t) => ({\n label: t,\n value: t,\n }))}\n placeholder=\"Select tag\"\n value={f.tag || ''}\n />\n {(f.tag || (query.groupBy?.length ?? 0) > 1) && (\n <AccessoryButton\n aria-label={`Remove tag for filter ${i + 1}`}\n icon=\"times\"\n onClick={() => removeFilter(f)}\n tooltip=\"Remove tag\"\n title={`Remove tag for filter ${i + 1}`}\n variant=\"secondary\"\n />\n )}\n {f.tag && i === (query.groupBy?.length ?? 0) - 1 && (\n <span className={styles.addTag}>\n <AccessoryButton\n aria-label=\"Add tag\"\n icon=\"plus\"\n onClick={() => addFilter()}\n tooltip=\"Add tag\"\n variant=\"secondary\"\n />\n </span>\n )}\n </HorizontalGroup>\n </div>\n ))}\n </>\n </InlineSearchField>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n addTag: css({\n marginLeft: theme.spacing(1),\n }),\n});\n","import { css } from '@emotion/css';\nimport { uniq } from 'lodash';\nimport React, { useState, useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { SelectableValue } from '@grafana/data';\nimport { FetchError, getTemplateSrv, isFetchError } from '@grafana/runtime';\nimport { Select, HorizontalGroup, useStyles2 } from '@grafana/ui';\n\nimport { notifyApp } from '../_importedDependencies/actions/appNotification';\nimport { createErrorNotification } from '../_importedDependencies/core/appNotification';\nimport { dispatch } from '../_importedDependencies/store';\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { TempoDatasource } from '../datasource';\nimport { operators as allOperators, stringOperators, numberOperators, keywordOperators } from '../traceql/traceql';\n\nimport { filterScopedTag, operatorSelectableValue } from './utils';\n\nconst getStyles = () => ({\n dropdown: css({\n boxShadow: 'none',\n }),\n});\n\ninterface Props {\n filter: TraceqlFilter;\n datasource: TempoDatasource;\n updateFilter: (f: TraceqlFilter) => void;\n setError: (error: FetchError) => void;\n isTagsLoading?: boolean;\n tags: string[];\n hideScope?: boolean;\n hideTag?: boolean;\n hideValue?: boolean;\n query: string;\n isMulti?: boolean;\n allowCustomValue?: boolean;\n}\nconst SearchField = ({\n filter,\n datasource,\n updateFilter,\n isTagsLoading,\n tags,\n setError,\n hideScope,\n hideTag,\n hideValue,\n query,\n isMulti = true,\n allowCustomValue = true,\n}: Props) => {\n const styles = useStyles2(getStyles);\n const scopedTag = useMemo(() => filterScopedTag(filter), [filter]);\n // We automatically change the operator to the regex op when users select 2 or more values\n // However, they expect this to be automatically rolled back to the previous operator once\n // there's only one value selected, so we store the previous operator and value\n const [prevOperator, setPrevOperator] = useState(filter.operator);\n const [prevValue, setPrevValue] = useState(filter.value);\n\n const updateOptions = async () => {\n try {\n return filter.tag ? await datasource.languageProvider.getOptionsV2(scopedTag, query) : [];\n } catch (error) {\n // Display message if Tempo is connected but search 404's\n if (isFetchError(error) && error?.status === 404) {\n setError(error);\n } else if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n }\n return [];\n };\n\n const { loading: isLoadingValues, value: options } = useAsync(updateOptions, [\n scopedTag,\n datasource.languageProvider,\n setError,\n query,\n ]);\n\n // Add selected option if it doesn't exist in the current list of options\n if (filter.value && !Array.isArray(filter.value) && options && !options.find((o) => o.value === filter.value)) {\n options.push({ label: filter.value.toString(), value: filter.value.toString(), type: filter.valueType });\n }\n\n useEffect(() => {\n if (\n Array.isArray(filter.value) &&\n filter.value.length > 1 &&\n filter.operator !== '=~' &&\n filter.operator !== '!~'\n ) {\n setPrevOperator(filter.operator);\n updateFilter({ ...filter, operator: '=~' });\n }\n if (Array.isArray(filter.value) && filter.value.length <= 1 && (prevValue?.length || 0) > 1) {\n updateFilter({ ...filter, operator: prevOperator, value: filter.value[0] });\n }\n }, [prevValue, prevOperator, updateFilter, filter]);\n\n useEffect(() => {\n setPrevValue(filter.value);\n }, [filter.value]);\n\n const scopeOptions = Object.values(TraceqlSearchScope)\n .filter((s) => s !== TraceqlSearchScope.Intrinsic)\n .map((t) => ({ label: t, value: t }));\n\n // If all values have type string or int/float use a focused list of operators instead of all operators\n const optionsOfFirstType = options?.filter((o) => o.type === options[0]?.type);\n const uniqueOptionType = options?.length === optionsOfFirstType?.length ? options?.[0]?.type : undefined;\n let operatorList = allOperators;\n switch (uniqueOptionType) {\n case 'keyword':\n operatorList = keywordOperators;\n break;\n case 'string':\n operatorList = stringOperators;\n break;\n case 'int':\n case 'float':\n operatorList = numberOperators;\n }\n\n /**\n * Add to a list of options the current template variables.\n *\n * @param options a list of options\n * @returns the list of given options plus the template variables\n */\n const withTemplateVariableOptions = (options: SelectableValue[] | undefined) => {\n const templateVariables = getTemplateSrv().getVariables();\n return [...(options || []), ...templateVariables.map((v) => ({ label: `$${v.name}`, value: `$${v.name}` }))];\n };\n\n return (\n <HorizontalGroup spacing={'none'} width={'auto'}>\n {!hideScope && (\n <Select\n className={styles.dropdown}\n inputId={`${filter.id}-scope`}\n options={withTemplateVariableOptions(scopeOptions)}\n value={filter.scope}\n onChange={(v) => {\n updateFilter({ ...filter, scope: v?.value });\n }}\n placeholder=\"Select scope\"\n aria-label={`select ${filter.id} scope`}\n />\n )}\n {!hideTag && (\n <Select\n className={styles.dropdown}\n inputId={`${filter.id}-tag`}\n isLoading={isTagsLoading}\n // Add the current tag to the list if it doesn't exist in the tags prop, otherwise the field will be empty even though the state has a value\n options={withTemplateVariableOptions(\n (filter.tag !== undefined ? uniq([filter.tag, ...tags]) : tags).map((t) => ({\n label: t,\n value: t,\n }))\n )}\n value={filter.tag}\n onChange={(v) => {\n updateFilter({ ...filter, tag: v?.value, value: [] });\n }}\n placeholder=\"Select tag\"\n isClearable\n aria-label={`select ${filter.id} tag`}\n allowCustomValue={true}\n />\n )}\n <Select\n className={styles.dropdown}\n inputId={`${filter.id}-operator`}\n options={withTemplateVariableOptions(operatorList.map(operatorSelectableValue))}\n value={filter.operator}\n onChange={(v) => {\n updateFilter({ ...filter, operator: v?.value });\n }}\n isClearable={false}\n aria-label={`select ${filter.id} operator`}\n allowCustomValue={true}\n width={8}\n />\n {!hideValue && (\n <Select\n className={styles.dropdown}\n inputId={`${filter.id}-value`}\n isLoading={isLoadingValues}\n options={withTemplateVariableOptions(options)}\n value={filter.value}\n onChange={(val) => {\n if (Array.isArray(val)) {\n updateFilter({ ...filter, value: val.map((v) => v.value), valueType: val[0]?.type || uniqueOptionType });\n } else {\n updateFilter({ ...filter, value: val?.value, valueType: val?.type || uniqueOptionType });\n }\n }}\n placeholder=\"Select value\"\n isClearable={true}\n aria-label={`select ${filter.id} value`}\n allowCustomValue={allowCustomValue}\n isMulti={isMulti}\n allowCreateWhileLoading\n />\n )}\n </HorizontalGroup>\n );\n};\n\nexport default SearchField;\n","import { css } from '@emotion/css';\nimport React, { useCallback, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { AccessoryButton } from '@grafana/experimental';\nimport { FetchError } from '@grafana/runtime';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { TempoDatasource } from '../datasource';\n\nimport SearchField from './SearchField';\nimport { getFilteredTags } from './utils';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n vertical: css({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.25),\n }),\n horizontal: css({\n display: 'flex',\n flexDirection: 'row',\n gap: theme.spacing(1),\n }),\n addTag: css({\n marginLeft: theme.spacing(1),\n }),\n});\n\ninterface Props {\n updateFilter: (f: TraceqlFilter) => void;\n deleteFilter: (f: TraceqlFilter) => void;\n filters: TraceqlFilter[];\n datasource: TempoDatasource;\n setError: (error: FetchError) => void;\n staticTags: Array<string | undefined>;\n isTagsLoading: boolean;\n hideValues?: boolean;\n requireTagAndValue?: boolean;\n query: string;\n}\nconst TagsInput = ({\n updateFilter,\n deleteFilter,\n filters,\n datasource,\n setError,\n staticTags,\n isTagsLoading,\n hideValues,\n requireTagAndValue,\n query,\n}: Props) => {\n const styles = useStyles2(getStyles);\n const generateId = () => uuidv4().slice(0, 8);\n const handleOnAdd = useCallback(\n () => updateFilter({ id: generateId(), operator: '=', scope: TraceqlSearchScope.Span }),\n [updateFilter]\n );\n\n useEffect(() => {\n if (!filters?.length) {\n handleOnAdd();\n }\n }, [filters, handleOnAdd]);\n\n const getTags = (f: TraceqlFilter) => {\n const tags = datasource.languageProvider.getTags(f.scope);\n return getFilteredTags(tags, staticTags);\n };\n\n const validInput = (f: TraceqlFilter) => {\n // If value is removed from the filter, it can be set as an empty array\n return requireTagAndValue ? f.tag && f.value && f.value.length > 0 : f.tag;\n };\n\n return (\n <div className={styles.vertical}>\n {filters?.map((f, i) => (\n <div className={styles.horizontal} key={f.id}>\n <SearchField\n filter={f}\n datasource={datasource}\n setError={setError}\n updateFilter={updateFilter}\n tags={getTags(f)}\n isTagsLoading={isTagsLoading}\n hideValue={hideValues}\n query={query}\n />\n {(validInput(f) || filters.length > 1) && (\n <AccessoryButton\n aria-label={`Remove tag with ID ${f.id}`}\n variant={'secondary'}\n icon={'times'}\n onClick={() => deleteFilter?.(f)}\n tooltip={'Remove tag'}\n />\n )}\n {validInput(f) && i === filters.length - 1 && (\n <span className={styles.addTag}>\n <AccessoryButton\n aria-label=\"Add tag\"\n variant={'secondary'}\n icon={'plus'}\n onClick={handleOnAdd}\n tooltip={'Add tag'}\n />\n </span>\n )}\n </div>\n ))}\n </div>\n );\n};\n\nexport default TagsInput;\n","import { css } from '@emotion/css';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport { CoreApp, GrafanaTheme2 } from '@grafana/data';\nimport { config, FetchError, getTemplateSrv, reportInteraction } from '@grafana/runtime';\nimport { Alert, Button, HorizontalGroup, Select, useStyles2 } from '@grafana/ui';\n\nimport { notifyApp } from '../_importedDependencies/actions/appNotification';\nimport { createErrorNotification } from '../_importedDependencies/core/appNotification';\nimport { RawQuery } from '../_importedDependencies/datasources/prometheus/RawQuery';\nimport { dispatch } from '../_importedDependencies/store';\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { TempoDatasource } from '../datasource';\nimport { TempoQueryBuilderOptions } from '../traceql/TempoQueryBuilderOptions';\nimport { traceqlGrammar } from '../traceql/traceql';\nimport { TempoQuery } from '../types';\n\nimport DurationInput from './DurationInput';\nimport { GroupByField } from './GroupByField';\nimport InlineSearchField from './InlineSearchField';\nimport SearchField from './SearchField';\nimport TagsInput from './TagsInput';\nimport { filterScopedTag, filterTitle, generateQueryFromFilters, replaceAt } from './utils';\n\ninterface Props {\n datasource: TempoDatasource;\n query: TempoQuery;\n onChange: (value: TempoQuery) => void;\n onBlur?: () => void;\n onClearResults: () => void;\n app?: CoreApp;\n}\n\nconst hardCodedFilterIds = ['min-duration', 'max-duration', 'status'];\n\nconst TraceQLSearch = ({ datasource, query, onChange, onClearResults, app }: Props) => {\n const styles = useStyles2(getStyles);\n const [error, setError] = useState<Error | FetchError | null>(null);\n\n const [isTagsLoading, setIsTagsLoading] = useState(true);\n const [traceQlQuery, setTraceQlQuery] = useState<string>('');\n\n const templateSrv = getTemplateSrv();\n\n const updateFilter = useCallback(\n (s: TraceqlFilter) => {\n const copy = { ...query };\n copy.filters ||= [];\n const indexOfFilter = copy.filters.findIndex((f) => f.id === s.id);\n if (indexOfFilter >= 0) {\n // update in place if the filter already exists, for consistency and to avoid UI bugs\n copy.filters = replaceAt(copy.filters, indexOfFilter, s);\n } else {\n copy.filters.push(s);\n }\n onChange(copy);\n },\n [onChange, query]\n );\n\n const deleteFilter = (s: TraceqlFilter) => {\n onChange({ ...query, filters: query.filters.filter((f) => f.id !== s.id) });\n };\n\n useEffect(() => {\n setTraceQlQuery(generateQueryFromFilters(query.filters || []));\n }, [query]);\n\n const findFilter = useCallback((id: string) => query.filters?.find((f) => f.id === id), [query.filters]);\n\n useEffect(() => {\n const fetchTags = async () => {\n try {\n await datasource.languageProvider.start();\n setIsTagsLoading(false);\n } catch (error) {\n if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n }\n };\n fetchTags();\n }, [datasource]);\n\n useEffect(() => {\n // Initialize state with configured static filters that already have a value from the config\n datasource.search?.filters\n ?.filter((f) => f.value)\n .forEach((f) => {\n if (!findFilter(f.id)) {\n updateFilter(f);\n }\n });\n }, [datasource.search?.filters, findFilter, updateFilter]);\n\n // filter out tags that already exist in the static fields\n const staticTags = datasource.search?.filters?.map((f) => f.tag) || [];\n staticTags.push('duration');\n staticTags.push('traceDuration');\n\n // Dynamic filters are all filters that don't match the ID of a filter in the datasource configuration\n // The duration and status fields are a special case since its selector is hard-coded\n const dynamicFilters = (query.filters || []).filter(\n (f) =>\n !hardCodedFilterIds.includes(f.id) &&\n (datasource.search?.filters?.findIndex((sf) => sf.id === f.id) || 0) === -1 &&\n f.id !== 'duration-type'\n );\n\n return (\n <>\n <div className={styles.container}>\n <div>\n {datasource.search?.filters?.map(\n (f) =>\n f.tag && (\n <InlineSearchField\n key={f.id}\n label={filterTitle(f)}\n tooltip={`Filter your search by ${filterScopedTag(\n f\n )}. To modify the default filters shown for search visit the Tempo datasource configuration page.`}\n >\n <SearchField\n filter={findFilter(f.id) || f}\n datasource={datasource}\n setError={setError}\n updateFilter={updateFilter}\n tags={[]}\n hideScope={true}\n hideTag={true}\n query={traceQlQuery}\n />\n </InlineSearchField>\n )\n )}\n <InlineSearchField label={'Status'}>\n <SearchField\n filter={\n findFilter('status') || {\n id: 'status',\n tag: 'status',\n scope: TraceqlSearchScope.Intrinsic,\n operator: '=',\n }\n }\n datasource={datasource}\n setError={setError}\n updateFilter={updateFilter}\n tags={[]}\n hideScope={true}\n hideTag={true}\n query={traceQlQuery}\n isMulti={false}\n allowCustomValue={false}\n />\n </InlineSearchField>\n <InlineSearchField\n label={'Duration'}\n tooltip=\"The trace or span duration, i.e. end - start time of the trace/span. Accepted units are ns, ms, s, m, h\"\n >\n <HorizontalGroup spacing={'none'}>\n <Select\n options={[\n { label: 'span', value: 'span' },\n { label: 'trace', value: 'trace' },\n ]}\n value={findFilter('duration-type')?.value ?? 'span'}\n onChange={(v) => {\n const filter = findFilter('duration-type') || {\n id: 'duration-type',\n value: 'span',\n };\n updateFilter({ ...filter, value: v?.value });\n }}\n aria-label={'duration type'}\n />\n <DurationInput\n filter={\n findFilter('min-duration') || {\n id: 'min-duration',\n tag: 'duration',\n operator: '>',\n valueType: 'duration',\n }\n }\n operators={['>', '>=']}\n updateFilter={updateFilter}\n />\n <DurationInput\n filter={\n findFilter('max-duration') || {\n id: 'max-duration',\n tag: 'duration',\n operator: '<',\n valueType: 'duration',\n }\n }\n operators={['<', '<=']}\n updateFilter={updateFilter}\n />\n </HorizontalGroup>\n </InlineSearchField>\n <InlineSearchField label={'Tags'}>\n <TagsInput\n filters={dynamicFilters}\n datasource={datasource}\n setError={setError}\n updateFilter={updateFilter}\n deleteFilter={deleteFilter}\n staticTags={staticTags}\n isTagsLoading={isTagsLoading}\n query={traceQlQuery}\n requireTagAndValue={true}\n />\n </InlineSearchField>\n {config.featureToggles.metricsSummary && (\n <GroupByField datasource={datasource} onChange={onChange} query={query} isTagsLoading={isTagsLoading} />\n )}\n </div>\n <div className={styles.rawQueryContainer}>\n <RawQuery query={templateSrv.replace(traceQlQuery)} lang={{ grammar: traceqlGrammar, name: 'traceql' }} />\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n reportInteraction('grafana_traces_copy_to_traceql_clicked', {\n app: app ?? '',\n grafana_version: config.buildInfo.version,\n location: 'search_tab',\n });\n\n onClearResults();\n const traceQlQuery = generateQueryFromFilters(query.filters || []);\n onChange({\n ...query,\n query: traceQlQuery,\n queryType: 'traceql',\n });\n }}\n >\n Edit in TraceQL\n </Button>\n </div>\n <TempoQueryBuilderOptions onChange={onChange} query={query} />\n </div>\n {error ? (\n <Alert title=\"Unable to connect to Tempo search\" severity=\"info\" className={styles.alert}>\n Please ensure that Tempo is configured with search enabled. If you would like to hide this tab, you can\n configure it in the <a href={`/datasources/edit/${datasource.uid}`}>datasource settings</a>.\n </Alert>\n ) : null}\n </>\n );\n};\n\nexport default TraceQLSearch;\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n alert: css({\n maxWidth: '75ch',\n marginTop: theme.spacing(2),\n }),\n container: css({\n display: 'flex',\n gap: '4px',\n flexWrap: 'wrap',\n flexDirection: 'column',\n }),\n rawQueryContainer: css({\n alignItems: 'center',\n backgroundColor: theme.colors.background.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n padding: theme.spacing(1),\n }),\n});\n","import React, { ReactElement } from 'react';\n\nimport { AdHocVariableFilter, DataSourceRef, SelectableValue } from '@grafana/data';\nimport { getDataSourceSrv } from '@grafana/runtime';\nimport { Icon, SegmentAsync } from '@grafana/ui';\n\ninterface Props {\n datasource: DataSourceRef;\n filterKey: string | null;\n onChange: (item: SelectableValue<string | null>) => void;\n allFilters: AdHocVariableFilter[];\n disabled?: boolean;\n}\n\nconst MIN_WIDTH = 90;\nexport const AdHocFilterKey = ({ datasource, onChange, disabled, filterKey, allFilters }: Props) => {\n const loadKeys = () => fetchFilterKeys(datasource, filterKey, allFilters);\n const loadKeysWithRemove = () => fetchFilterKeysWithRemove(datasource, filterKey, allFilters);\n\n if (filterKey === null) {\n return (\n <div className=\"gf-form\" data-testid=\"AdHocFilterKey-add-key-wrapper\">\n <SegmentAsync\n disabled={disabled}\n className=\"query-segment-key\"\n Component={plusSegment}\n value={filterKey}\n onChange={onChange}\n loadOptions={loadKeys}\n inputMinWidth={MIN_WIDTH}\n />\n </div>\n );\n }\n\n return (\n <div className=\"gf-form\" data-testid=\"AdHocFilterKey-key-wrapper\">\n <SegmentAsync\n disabled={disabled}\n className=\"query-segment-key\"\n value={filterKey}\n onChange={onChange}\n loadOptions={loadKeysWithRemove}\n inputMinWidth={MIN_WIDTH}\n />\n </div>\n );\n};\n\nexport const REMOVE_FILTER_KEY = '-- remove filter --';\nconst REMOVE_VALUE = { label: REMOVE_FILTER_KEY, value: REMOVE_FILTER_KEY };\n\nconst plusSegment: ReactElement = (\n <span className=\"gf-form-label query-part\" aria-label=\"Add Filter\">\n <Icon name=\"plus\" />\n </span>\n);\n\nconst fetchFilterKeys = async (\n datasource: DataSourceRef,\n currentKey: string | null,\n allFilters: AdHocVariableFilter[]\n): Promise<Array<SelectableValue<string>>> => {\n const ds = await getDataSourceSrv().get(datasource);\n\n if (!ds || !ds.getTagKeys) {\n return [];\n }\n\n const otherFilters = allFilters.filter((f) => f.key !== currentKey);\n const metrics = await ds.getTagKeys({ filters: otherFilters });\n return metrics.map((m) => ({ label: m.text, value: m.text }));\n};\n\nconst fetchFilterKeysWithRemove = async (\n datasource: DataSourceRef,\n currentKey: string | null,\n allFilters: AdHocVariableFilter[]\n): Promise<Array<SelectableValue<string>>> => {\n const keys = await fetchFilterKeys(datasource, currentKey, allFilters);\n return [REMOVE_VALUE, ...keys];\n};\n","import React from 'react';\n\nimport {\n AdHocVariableFilter,\n DataSourceRef,\n MetricFindValue,\n SelectableValue,\n getDefaultTimeRange,\n} from '@grafana/data';\n// import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';\nimport { getDataSourceSrv } from '@grafana/runtime';\nimport { SegmentAsync } from '@grafana/ui';\n\ninterface Props {\n datasource: DataSourceRef;\n filterKey: string;\n filterValue?: string;\n onChange: (item: SelectableValue<string>) => void;\n placeHolder?: string;\n disabled?: boolean;\n allFilters: AdHocVariableFilter[];\n}\n\nexport const AdHocFilterValue = ({\n datasource,\n disabled,\n onChange,\n filterKey,\n filterValue,\n placeHolder,\n allFilters,\n}: Props) => {\n const loadValues = () => fetchFilterValues(datasource, filterKey, allFilters);\n\n return (\n <div className=\"gf-form\" data-testid=\"AdHocFilterValue-value-wrapper\">\n <SegmentAsync\n className=\"query-segment-value\"\n disabled={disabled}\n placeholder={placeHolder}\n value={filterValue}\n onChange={onChange}\n loadOptions={loadValues}\n />\n </div>\n );\n};\n\nconst fetchFilterValues = async (\n datasource: DataSourceRef,\n key: string,\n allFilters: AdHocVariableFilter[]\n): Promise<Array<SelectableValue<string>>> => {\n const ds = await getDataSourceSrv().get(datasource);\n\n if (!ds || !ds.getTagValues) {\n return [];\n }\n\n // const timeRange = getTimeSrv().timeRange();\n // As https://github.com/grafana/grafana/pull/76118/files#diff-260d46415915a2e3e7d294e313bd128666e9f0868aa94d8aee4d4a24a060b542L27-R26\n const timeRange = getDefaultTimeRange();\n\n // Filter out the current filter key from the list of all filters\n const otherFilters = allFilters.filter((f) => f.key !== key);\n const metrics = await ds.getTagValues({ key, filters: otherFilters, timeRange });\n return metrics.map((m: MetricFindValue) => ({ label: m.text, value: m.text }));\n};\n","import React from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { Segment } from '@grafana/ui';\n\ninterface Props {\n value: string;\n onChange: (item: SelectableValue<string>) => void;\n disabled?: boolean;\n}\n\nconst options = ['=', '!=', '<', '>', '=~', '!~'].map<SelectableValue<string>>((value) => ({\n label: value,\n value,\n}));\n\nexport const OperatorSegment = ({ value, disabled, onChange }: Props) => {\n return (\n <Segment\n className=\"query-segment-operator\"\n value={value}\n disabled={disabled}\n options={options}\n onChange={onChange}\n />\n );\n};\n","import React from 'react';\n\nimport { AdHocVariableFilter, DataSourceRef, SelectableValue } from '@grafana/data';\n\nimport { AdHocFilterKey } from './AdHocFilterKey';\nimport { AdHocFilterValue } from './AdHocFilterValue';\nimport { OperatorSegment } from './OperatorSegment';\n\ninterface Props {\n datasource: DataSourceRef;\n filter: AdHocVariableFilter;\n allFilters: AdHocVariableFilter[];\n onKeyChange: (item: SelectableValue<string | null>) => void;\n onOperatorChange: (item: SelectableValue<string>) => void;\n onValueChange: (item: SelectableValue<string>) => void;\n placeHolder?: string;\n getTagKeysOptions?: any;\n disabled?: boolean;\n}\n\nexport const AdHocFilterRenderer = ({\n datasource,\n filter: { key, operator, value },\n onKeyChange,\n onOperatorChange,\n onValueChange,\n placeHolder,\n allFilters,\n disabled,\n}: Props) => {\n return (\n <>\n <AdHocFilterKey\n disabled={disabled}\n datasource={datasource}\n filterKey={key}\n onChange={onKeyChange}\n allFilters={allFilters}\n />\n <div className=\"gf-form\">\n <OperatorSegment disabled={disabled} value={operator} onChange={onOperatorChange} />\n </div>\n <AdHocFilterValue\n disabled={disabled}\n datasource={datasource}\n filterKey={key}\n filterValue={value}\n allFilters={allFilters}\n onChange={onValueChange}\n placeHolder={placeHolder}\n />\n </>\n );\n};\n","import i18n from 'i18next';\nimport React, { useCallback, useState } from 'react';\n\nimport { AdHocVariableFilter, DataSourceRef, SelectableValue } from '@grafana/data';\n\nimport { AdHocFilterKey, REMOVE_FILTER_KEY } from './AdHocFilterKey';\nimport { AdHocFilterRenderer } from './AdHocFilterRenderer';\n\ninterface Props {\n datasource: DataSourceRef;\n onCompleted: (filter: AdHocVariableFilter) => void;\n appendBefore?: React.ReactNode;\n allFilters: AdHocVariableFilter[];\n}\n\n// Reassign t() so i18next-parser doesn't warn on dynamic key, and we can have 'failOnWarnings' enabled\nconst tFunc = i18n.t;\n\n// import { t } from 'app/core/internationalization';\nexport const t = (id: string, defaultMessage: string, values?: Record<string, unknown>) => {\n return tFunc(id, defaultMessage, values);\n};\n\nexport const AdHocFilterBuilder = ({ datasource, appendBefore, onCompleted, allFilters }: Props) => {\n const [key, setKey] = useState<string | null>(null);\n const [operator, setOperator] = useState<string>('=');\n\n const onKeyChanged = useCallback(\n (item: SelectableValue<string | null>) => {\n if (item.value !== REMOVE_FILTER_KEY) {\n setKey(item.value ?? '');\n return;\n }\n setKey(null);\n },\n [setKey]\n );\n\n const onOperatorChanged = useCallback(\n (item: SelectableValue<string>) => setOperator(item.value ?? ''),\n [setOperator]\n );\n\n const onValueChanged = useCallback(\n (item: SelectableValue<string>) => {\n onCompleted({\n value: item.value ?? '',\n operator: operator,\n key: key!,\n });\n setKey(null);\n setOperator('=');\n },\n [onCompleted, operator, key]\n );\n\n if (key === null) {\n return <AdHocFilterKey datasource={datasource} filterKey={key} onChange={onKeyChanged} allFilters={allFilters} />;\n }\n\n return (\n <React.Fragment key=\"filter-builder\">\n {appendBefore}\n <AdHocFilterRenderer\n datasource={datasource}\n filter={{ key, value: '', operator }}\n placeHolder={t('variable.adhoc.placeholder', 'Select value')}\n onKeyChange={onKeyChanged}\n onOperatorChange={onOperatorChanged}\n onValueChange={onValueChanged}\n allFilters={allFilters}\n />\n </React.Fragment>\n );\n};\n","import React from 'react';\n\ninterface Props {\n label: string;\n}\n\nexport const ConditionSegment = ({ label }: Props) => {\n return (\n <div className=\"gf-form\">\n <span className=\"gf-form-label query-keyword\">{label}</span>\n </div>\n );\n};\n","import React, { PureComponent, ReactNode } from 'react';\n\nimport { AdHocVariableFilter, DataSourceRef, SelectableValue } from '@grafana/data';\nimport { Segment } from '@grafana/ui';\n\nimport { AdHocFilterBuilder } from './AdHocFilterBuilder';\nimport { REMOVE_FILTER_KEY } from './AdHocFilterKey';\nimport { AdHocFilterRenderer } from './AdHocFilterRenderer';\nimport { ConditionSegment } from './ConditionSegment';\n\ninterface Props {\n datasource: DataSourceRef | null;\n filters: AdHocVariableFilter[];\n baseFilters?: AdHocVariableFilter[];\n addFilter: (filter: AdHocVariableFilter) => void;\n removeFilter: (index: number) => void;\n changeFilter: (index: number, newFilter: AdHocVariableFilter) => void;\n disabled?: boolean;\n}\n\n/**\n * Simple filtering component that automatically uses datasource APIs to get available labels and its values, for\n * dynamic visual filtering without need for much setup. Instead of having single onChange prop this reports all the\n * change events with separate props so it is usable with AdHocPicker.\n *\n * Note: There isn't API on datasource to suggest the operators here so that is hardcoded to use prometheus style\n * operators. Also filters are assumed to be joined with `AND` operator, which is also hardcoded.\n */\nexport class AdHocFilter extends PureComponent<Props> {\n onChange = (index: number, prop: string) => (key: SelectableValue<string | null>) => {\n const { filters } = this.props;\n const { value } = key;\n\n if (key.value === REMOVE_FILTER_KEY) {\n return this.props.removeFilter(index);\n }\n\n return this.props.changeFilter(index, {\n ...filters[index],\n [prop]: value,\n });\n };\n\n appendFilterToVariable = (filter: AdHocVariableFilter) => {\n this.props.addFilter(filter);\n };\n\n render() {\n const { filters, disabled } = this.props;\n\n return (\n <div className=\"gf-form-inline\">\n {this.renderFilters(filters, disabled)}\n\n {!disabled && (\n <AdHocFilterBuilder\n datasource={this.props.datasource!}\n appendBefore={filters.length > 0 ? <ConditionSegment label=\"AND\" /> : null}\n onCompleted={this.appendFilterToVariable}\n allFilters={this.getAllFilters()}\n />\n )}\n </div>\n );\n }\n\n getAllFilters() {\n if (this.props.baseFilters) {\n return this.props.baseFilters.concat(this.props.filters);\n }\n\n return this.props.filters;\n }\n\n renderFilters(filters: AdHocVariableFilter[], disabled?: boolean) {\n if (filters.length === 0 && disabled) {\n return <Segment disabled={disabled} value=\"No filters\" options={[]} onChange={() => {}} />;\n }\n\n return filters.reduce((segments: ReactNode[], filter, index) => {\n if (segments.length > 0) {\n segments.push(<ConditionSegment label=\"AND\" key={`condition-${index}`} />);\n }\n segments.push(this.renderFilterSegments(filter, index, disabled));\n return segments;\n }, []);\n }\n\n renderFilterSegments(filter: AdHocVariableFilter, index: number, disabled?: boolean) {\n return (\n <React.Fragment key={`filter-${index}`}>\n <AdHocFilterRenderer\n disabled={disabled}\n datasource={this.props.datasource!}\n filter={filter}\n onKeyChange={this.onChange(index, 'key')}\n onOperatorChange={this.onChange(index, 'operator')}\n onValueChange={this.onChange(index, 'value')}\n allFilters={this.getAllFilters()}\n />\n </React.Fragment>\n );\n }\n}\n","import { css } from '@emotion/css';\nimport React, { useEffect, useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Alert, InlineField, InlineFieldRow, useStyles2 } from '@grafana/ui';\n\nimport { AdHocFilter } from './_importedDependencies/components/AdHocFilter/AdHocFilter';\nimport { PrometheusDatasource } from './_importedDependencies/datasources/prometheus/types';\nimport { AdHocVariableFilter } from './_importedDependencies/types';\nimport { TempoQuery } from './types';\nimport { getDS } from './utils';\n\nexport function ServiceGraphSection({\n graphDatasourceUid,\n query,\n onChange,\n}: {\n graphDatasourceUid?: string;\n query: TempoQuery;\n onChange: (value: TempoQuery) => void;\n}) {\n const styles = useStyles2(getStyles);\n const dsState = useAsync(() => getDS(graphDatasourceUid), [graphDatasourceUid]);\n\n // Check if service graph metrics are being collected. If not, displays a warning\n const [hasKeys, setHasKeys] = useState<boolean | undefined>(undefined);\n useEffect(() => {\n async function fn(ds: PrometheusDatasource) {\n const keys = await ds.getTagKeys({\n filters: [\n {\n key: '__name__',\n operator: '=~',\n value:\n 'traces_service_graph_request_server_seconds_sum|traces_service_graph_request_total|traces_service_graph_request_failed_total',\n condition: '',\n },\n ],\n });\n setHasKeys(Boolean(keys.length));\n }\n if (!dsState.loading && dsState.value) {\n fn(dsState.value as PrometheusDatasource);\n }\n }, [dsState]);\n\n if (dsState.loading) {\n return null;\n }\n\n const ds = dsState.value;\n\n if (!graphDatasourceUid) {\n return getWarning(\n 'No service graph datasource selected',\n 'Please set up a service graph datasource in the datasource settings',\n styles\n );\n }\n\n if (graphDatasourceUid && !ds) {\n return getWarning(\n 'No service graph data found',\n 'Service graph datasource is configured but the data source no longer exists. Please configure existing data source to use the service graph functionality',\n styles\n );\n }\n\n const filters = queryToFilter(\n (Array.isArray(query.serviceMapQuery) ? query.serviceMapQuery[0] : query.serviceMapQuery) || ''\n );\n\n return (\n <div>\n <InlineFieldRow>\n <InlineField label=\"Filter\" labelWidth={14} grow>\n <AdHocFilter\n datasource={{ uid: graphDatasourceUid }}\n filters={filters}\n baseFilters={[\n {\n key: '__name__',\n operator: '=~',\n value: 'traces_service_graph_request_total|traces_spanmetrics_calls_total',\n condition: '',\n },\n ]}\n addFilter={(filter: AdHocVariableFilter) => {\n onChange({\n ...query,\n serviceMapQuery: filtersToQuery([...filters, filter]),\n });\n }}\n removeFilter={(index: number) => {\n const newFilters = [...filters];\n newFilters.splice(index, 1);\n onChange({ ...query, serviceMapQuery: filtersToQuery(newFilters) });\n }}\n changeFilter={(index: number, filter: AdHocVariableFilter) => {\n const newFilters = [...filters];\n newFilters.splice(index, 1, filter);\n onChange({ ...query, serviceMapQuery: filtersToQuery(newFilters) });\n }}\n />\n </InlineField>\n </InlineFieldRow>\n {hasKeys === false\n ? getWarning(\n 'No service graph data found',\n 'Please ensure that service graph metrics are set up correctly',\n styles\n )\n : null}\n </div>\n );\n}\n\nfunction getWarning(title: string, description: string, styles: { alert: string; link: string }) {\n return (\n <Alert title={title} severity=\"info\" className={styles.alert}>\n {description} according to the{' '}\n <a\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n href=\"https://grafana.com/docs/grafana/latest/datasources/tempo/service-graph/\"\n className={styles.link}\n >\n Tempo documentation\n </a>\n .\n </Alert>\n );\n}\n\nfunction queryToFilter(query: string): AdHocVariableFilter[] {\n let match;\n let filters: AdHocVariableFilter[] = [];\n const re = /([\\w_]+)(=|!=|<|>|=~|!~)\"(.*?)\"/g;\n while ((match = re.exec(query)) !== null) {\n filters.push({\n key: match[1],\n operator: match[2],\n value: match[3],\n condition: '',\n });\n }\n return filters;\n}\n\nfunction filtersToQuery(filters: AdHocVariableFilter[]): string {\n return `{${filters.map((f) => `${f.key}${f.operator}\"${f.value}\"`).join(',')}}`;\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n alert: css({\n maxWidth: '75ch',\n marginTop: theme.spacing(2),\n }),\n link: css({\n color: theme.colors.text.link,\n textDecoration: 'underline',\n }),\n});\n","import { DataSourceJsonData } from '@grafana/data/src';\nimport { NodeGraphOptions, TraceToLogsOptions } from '@grafana/o11y-ds-frontend';\n\nimport { LokiQuery } from './_importedDependencies/datasources/loki/types';\nimport { TempoQuery as TempoBase, TempoQueryType, TraceqlFilter } from './dataquery.gen';\n\nexport interface SearchQueryParams {\n minDuration?: string;\n maxDuration?: string;\n limit?: number;\n tags?: string;\n start?: number;\n end?: number;\n}\n\nexport interface TempoJsonData extends DataSourceJsonData {\n tracesToLogs?: TraceToLogsOptions;\n serviceMap?: {\n datasourceUid?: string;\n };\n search?: {\n hide?: boolean;\n filters?: TraceqlFilter[];\n };\n nodeGraph?: NodeGraphOptions;\n lokiSearch?: {\n datasourceUid?: string;\n };\n spanBar?: {\n tag: string;\n };\n traceQuery?: {\n timeShiftEnabled?: boolean;\n spanStartTimeShift?: string;\n spanEndTimeShift?: string;\n };\n}\n\nexport interface TempoQuery extends TempoBase {\n // Query to find list of traces, e.g., via Loki\n // Improvement: change this field to the schema type when LokiQuery exists in the schema\n linkedQuery?: LokiQuery;\n queryType: TempoQueryType;\n}\n\nexport interface MyDataSourceOptions extends DataSourceJsonData {}\n\nexport const defaultQuery: Partial<TempoQuery> = {};\n\nexport type TraceSearchMetadata = {\n traceID: string;\n rootServiceName: string;\n rootTraceName: string;\n startTimeUnixNano?: string;\n durationMs?: number;\n spanSet?: Spanset; // deprecated in Tempo, https://github.com/grafana/tempo/blob/3cc44fca03ba7d676dc77da6a18b8222546ede3c/docs/sources/tempo/api_docs/_index.md?plain=1#L619\n spanSets?: Spanset[];\n};\n\nexport type SearchMetrics = {\n inspectedTraces?: number;\n inspectedBytes?: number;\n totalBlocks?: number;\n completedJobs?: number;\n totalJobs?: number;\n totalBlockBytes?: number;\n};\n\nexport enum SpanKind {\n UNSPECIFIED,\n INTERNAL,\n SERVER,\n CLIENT,\n PRODUCER,\n CONSUMER,\n}\n\nexport type SpanAttributes = {\n key: string;\n value: {\n stringValue?: string;\n intValue?: string;\n boolValue?: boolean;\n doubleValue?: string;\n Value?: {\n string_value?: string;\n int_value?: string;\n bool_value?: boolean;\n double_value?: string;\n };\n };\n};\n\nexport type Span = {\n durationNanos: string;\n traceId?: string;\n spanID: string;\n traceState?: string;\n parentSpanId?: string;\n name?: string;\n kind?: SpanKind;\n startTimeUnixNano: string;\n endTimeUnixNano?: string;\n attributes?: SpanAttributes[];\n dropped_attributes_count?: number;\n};\n\nexport type Spanset = {\n attributes?: SpanAttributes[];\n spans: Span[];\n};\n\nexport type SearchResponse = {\n traces: TraceSearchMetadata[];\n metrics: SearchMetrics;\n};\n\nexport type Scope = {\n name: string;\n tags: string[];\n};\n\n// Maps to QueryRangeResponse of tempopb https://github.com/grafana/tempo/blob/cfda98fc5cb0777963f41e0949b9ad2d24b4b5b8/pkg/tempopb/tempo.proto#L360\nexport type TraceqlMetricsResponse = {\n series: MetricsSeries[];\n metrics: SearchMetrics;\n};\n\nexport type MetricsSeries = {\n labels: MetricsSeriesLabel[];\n samples: MetricsSeriesSample[];\n promLabels: string;\n};\n\nexport type MetricsSeriesLabel = {\n key: string;\n value: ProtoValue;\n};\n\nexport type ProtoValue = {\n stringValue?: string;\n intValue?: string;\n boolValue?: boolean;\n doubleValue?: string;\n};\n\nexport type MetricsSeriesSample = {\n timestampMs: string;\n value: number;\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useState } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Alert, AlertVariant, useTheme2 } from '@grafana/ui';\n\nenum AlertTimeout {\n Error = 7000,\n Info = 3000,\n Success = 3000,\n Warning = 5000,\n}\n\nconst getStyle = (theme: GrafanaTheme2) => {\n return css({\n position: 'absolute',\n zIndex: theme.zIndex.portal,\n top: 0,\n right: 10,\n });\n};\n\nconst timeoutMap = {\n ['error']: AlertTimeout.Error,\n ['info']: AlertTimeout.Info,\n ['success']: AlertTimeout.Success,\n ['warning']: AlertTimeout.Warning,\n};\n\ntype AlertProps = {\n // Severity of the alert. Controls the style of the alert (e.g., background color)\n severity: AlertVariant;\n // Displayed message. If set to empty string, the alert is not displayed\n text: string;\n};\n\nexport const TemporaryAlert = (props: AlertProps) => {\n const style = getStyle(useTheme2());\n const [visible, setVisible] = useState(false);\n const [timer, setTimer] = useState<NodeJS.Timeout>();\n\n useEffect(() => {\n return () => {\n if (timer) {\n clearTimeout(timer);\n }\n };\n }, [timer]);\n\n useEffect(() => {\n if (props.text !== '') {\n setVisible(true);\n\n const timer = setTimeout(() => {\n setVisible(false);\n }, timeoutMap[props.severity]);\n setTimer(timer);\n }\n }, [props.severity, props.text]);\n\n return <>{visible && <Alert className={style} elevated={true} title={props.text} severity={props.severity} />}</>;\n};\n","import { LRParser, LocalTokenGroup } from '@lezer/lr';\n\n// This file was generated by lezer-generator. You probably shouldn't edit it.\nconst parser = LRParser.deserialize({\n version: 14,\n states: \"1pO]QPOOP!pOPOOO]QPO'#CkO#dQPO'#CjO%wQQO'#ClOOQO'#DP'#DPOOQO'#DO'#DOO&OQPO'#DOO&TQSO'#C{OOQO'#C|'#C|O&]QPO'#C|O&hQPO'#DRO&mQPO'#DSO&rQPO'#DUOOQO'#DW'#DWO&wQPO'#DVOOQO'#Cj'#CjQ'PQPOOOOQO'#C`'#C`P'nO!bO'#C^POOO)C?S)C?SO'yQPO,59VO(QQSO,59hO(]QPO,59TO(}QPO,58zO)UQPO,59VO)UQPO,59VO)UQPO,59VO)UQPO,59VO)UQPO,59VO)UQPO,59VO)UQPO,59VOOQO'#Co'#CoOOQO'#Cu'#CuO)ZQWO'#CuO)rQ`O'#CwO)wQPO'#CwO#nQQO'#CmO)|QWO,59WO#nQQO'#CmOOQO'#Cm'#CmOOQO,59W,59WO#nQQO,59jO*[QPO,59hO*[QPO,59gOOQO,59h,59hO#nQQO,59mO#nQQO,59nOOQO,59p,59pO+PQPO,59qO,rQPO,59qO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zO]QPO,58zPOOO'#D['#D[P,yO!bO,58xPOOO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xai!|ai~OTai~P8bOT!qO~P8bOq{O!X!bO~Of#oOg#nO~P+wO!zZOTyqUyqVyqWyqXyqYyqZyq[yq!Pyq!Yyq!Xyq~Ol#qO~OT!qOY!rOb!pO!Xwi!|wi~O!|#rO~Og#sO~OgfePqbjmjnln~\",\n goto: \"(X!PPP!QP!TPPPPPPPP!v#T#d$]$jP%YPPPPP%fP%fPPP$]%vP&`&pP'Q$]'e$]$]'h'u'x'{(RRdPQaOQhQQ!d!UQ#S!TQ#T!VQ#U!WQ#V!XQ#W!YQ#X!ZQ#Y![R#Z!]gbOQ!T!U!V!W!X!Y!Z![!]dbO!T!U!V!W!X!Y!Z![!]RgQdRO!T!U!V!W!X!Y!Z![!]QeQQ!ajQ!fiQ!gkQ!hlQ!imQ!jnQ!koR#^!eg`OQ!T!U!V!W!X!Y!Z![!]QvSQ!ouQ!twQ!uzQ!x!OQ!y!PQ#a!pQ#b!qQ#c!rR#l#gexSuwz!O!P!p!q!r#gdxSuwz!O!P!p!q!r#gT!}!S#idWO!T!U!V!W!X!Y!Z![!]QfQQ!b{Q!w|R#e!vmXOQ{|!T!U!V!W!X!Y!Z![!]!vmVOQ{|!T!U!V!W!X!Y!Z![!]!vf`OQ!T!U!V!W!X!Y!Z![!]Q!{!RR#p#jR!z!Pg_OQ!T!U!V!W!X!Y!Z![!]R#R!SR#P!SQ#O!SR#m#iQ!_cR#[!_\",\n nodeNames: \"⚠LineComment BlockComment TraceQL SpansetPipelineExpression And Gt Desc Lt Anc Or Pipe ExperimentalOp WrappedSpansetPipeline SpansetPipeline SpansetExpression SpansetFilter FieldExpression FieldOp Static String Integer Float Duration TemplateVariable IntrinsicField Parent AttributeField Identifier Resource Span ScalarFilter ScalarExpression ScalarOp Aggregate AggregateExpression ComparisonOp GroupOperation SelectOperation SelectArgs CoalesceOperation MetricsOperation MetricsOperationType MetricsArgs MetricsQuery MetricsQueryExpression\",\n maxTerm: 98,\n skippedNodes: [0,1,2,46],\n repeatNodeCount: 1,\n token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d#V#W&/j#W#o(d#s;'S(d;'S;=`*T<%lO(dt&/o]lpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#](d#]#^&0h#^#o(d#s;'S(d;'S;=`*T<%lO(dt&0m]lpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#Y(d#Y#Z&1f#Z#o(d#s;'S(d;'S;=`*T<%lO(dt&1k]lpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#](d#]#^&2d#^#o(d#s;'S(d;'S;=`*T<%lO(dt&2i]lpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#X(d#X#Y&3b#Y#o(d#s;'S(d;'S;=`*T<%lO(dt&3g]lpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#W(d#W#X&4`#X#o(d#s;'S(d;'S;=`*T<%lO(dt&4gZ!eSlpOp(drs)[sv(dwx(dz|(d}!^(d!a#Q(d#R#o(d#s;'S(d;'S;=`*T<%lO(d~&5_O!Z~~&5dPZ~#p#q&5g~&5lOY~~&5qO![~!t&5xO!Y!db`\",\n tokenizers: [1, 2, 3, 4, 5, 6, new LocalTokenGroup(\"j~RQYZXz{^~^O!U~~aP!P!Qd~iO!V~~\", 25, 51)],\n topRules: {\"TraceQL\":[0,3]},\n tokenPrec: 1195\n});\n// This file was generated by lezer-generator. You probably shouldn't edit it.\nconst LineComment = 1,\n BlockComment = 2,\n TraceQL = 3,\n SpansetPipelineExpression = 4,\n And = 5,\n Gt = 6,\n Desc = 7,\n Lt = 8,\n Anc = 9,\n Or = 10,\n Pipe = 11,\n ExperimentalOp = 12,\n WrappedSpansetPipeline = 13,\n SpansetPipeline = 14,\n SpansetExpression = 15,\n SpansetFilter = 16,\n FieldExpression = 17,\n FieldOp = 18,\n Static = 19,\n String = 20,\n Integer = 21,\n Float = 22,\n Duration = 23,\n TemplateVariable = 24,\n IntrinsicField = 25,\n Parent = 26,\n AttributeField = 27,\n Identifier = 28,\n Resource = 29,\n Span = 30,\n ScalarFilter = 31,\n ScalarExpression = 32,\n ScalarOp = 33,\n Aggregate = 34,\n AggregateExpression = 35,\n ComparisonOp = 36,\n GroupOperation = 37,\n SelectOperation = 38,\n SelectArgs = 39,\n CoalesceOperation = 40,\n MetricsOperation = 41,\n MetricsOperationType = 42,\n MetricsArgs = 43,\n MetricsQuery = 44,\n MetricsQueryExpression = 45;\n\nexport { Aggregate, AggregateExpression, Anc, And, AttributeField, BlockComment, CoalesceOperation, ComparisonOp, Desc, Duration, ExperimentalOp, FieldExpression, FieldOp, Float, GroupOperation, Gt, Identifier, Integer, IntrinsicField, LineComment, Lt, MetricsArgs, MetricsOperation, MetricsOperationType, MetricsQuery, MetricsQueryExpression, Or, Parent, Pipe, Resource, ScalarExpression, ScalarFilter, ScalarOp, SelectArgs, SelectOperation, Span, SpansetExpression, SpansetFilter, SpansetPipeline, SpansetPipelineExpression, Static, String, TemplateVariable, TraceQL, WrappedSpansetPipeline, parser };\n","import { SyntaxNode, Tree } from '@lezer/common';\n\nimport {\n Aggregate,\n And,\n AttributeField,\n ComparisonOp,\n FieldExpression,\n FieldOp,\n GroupOperation,\n IntrinsicField,\n Or,\n parser,\n Pipe,\n ScalarFilter,\n SelectArgs,\n SelectOperation,\n SpansetFilter,\n SpansetPipeline,\n SpansetPipelineExpression,\n Static,\n String as StringNode,\n TraceQL,\n} from '@grafana/lezer-traceql';\n\ntype Direction = 'parent' | 'firstChild' | 'lastChild' | 'nextSibling' | 'prevSibling';\ntype NodeType = number;\n\nexport type Situation = { query: string } & SituationType;\n\nexport type SituationType =\n | {\n type: 'UNKNOWN';\n }\n | {\n type: 'EMPTY';\n }\n | {\n type: 'SPANSET_EMPTY';\n }\n | {\n type: 'SPANSET_ONLY_DOT';\n }\n | {\n type: 'SPANSET_EXPRESSION_OPERATORS';\n }\n | {\n type: 'SPANFIELD_COMBINING_OPERATORS';\n }\n | {\n type: 'SPANSET_IN_NAME';\n }\n | {\n type: 'SPANSET_IN_NAME_SCOPE';\n scope: string;\n }\n | {\n type: 'SPANSET_IN_VALUE';\n tagName: string;\n betweenQuotes: boolean;\n }\n | {\n type: 'SPANSET_AFTER_VALUE';\n }\n | {\n type: 'SPANSET_COMBINING_OPERATORS';\n }\n | {\n type: 'SPANSET_PIPELINE_AFTER_OPERATOR';\n }\n | {\n type: 'SPANSET_IN_THE_MIDDLE';\n }\n | {\n type: 'SPANSET_EXPRESSION_OPERATORS_WITH_MISSING_CLOSED_BRACE';\n }\n | {\n type: 'NEW_SPANSET';\n }\n | {\n type: 'ATTRIBUTE_FOR_FUNCTION';\n }\n | {\n type: 'SPANSET_COMPARISON_OPERATORS';\n };\n\ntype Path = Array<[Direction, NodeType[]]>;\n\ntype Resolver = {\n path: NodeType[];\n fun: (node: SyntaxNode, text: string, pos: number, originalPos: number) => SituationType | void;\n};\n\nfunction getErrorNode(tree: Tree, cursorPos: number): SyntaxNode | null {\n const cur = tree.cursorAt(cursorPos);\n do {\n if (cur.from === cursorPos || cur.to === cursorPos) {\n const { node } = cur;\n if (node.type.isError) {\n return node;\n }\n }\n } while (cur.next());\n return null;\n}\n\nfunction move(node: SyntaxNode, direction: Direction): SyntaxNode | null {\n return node[direction];\n}\n\nfunction walk(node: SyntaxNode, path: Path): SyntaxNode | null {\n let current: SyntaxNode | null = node;\n for (const [direction, expectedNodeIDs] of path) {\n current = move(current, direction);\n if (current === null) {\n // we could not move in the direction, we stop\n return null;\n }\n\n // note that the found value can be 0, which is acceptable\n if (expectedNodeIDs.find((id) => id === current?.type.id) === undefined) {\n // the reached node has wrong type, we stop\n return null;\n }\n }\n return current;\n}\n\nfunction getNodeText(node: SyntaxNode, text: string): string {\n // if the from and to are them same (e.g. for an error node) we can subtract 1 from the start/from index\n return text.slice(node.from === node.to ? node.from - 1 : node.from, node.to);\n}\n\nfunction isPathMatch(resolverPath: NodeType[], cursorPath: number[]): boolean {\n return resolverPath.every((item, index) => item === cursorPath[index]);\n}\n\n/**\n * Figure out where is the cursor and what kind of suggestions are appropriate.\n * @param text the user input\n * @param offset the position of the cursor (starting from 0) in the user input\n */\nexport function getSituation(text: string, offset: number): Situation | null {\n // there is a special case when we are at the start of writing text,\n // so we handle that case first\n if (text === '') {\n return {\n query: text,\n type: 'EMPTY',\n };\n }\n\n const tree = parser.parse(text);\n\n // Whitespaces (especially when multiple) on the left of the text cursor can trick the Lezer parser,\n // causing a wrong tree cursor to be picked.\n // Example: `{ span.foo = ↓ }`, with `↓` being the cursor, tricks the parser.\n // Quick and dirty hack: Shift the cursor to the left until we find a non-whitespace character on its left.\n let shiftedOffset = offset;\n while (shiftedOffset - 1 >= 0 && text[shiftedOffset - 1] === ' ') {\n shiftedOffset -= 1;\n }\n\n // if the tree contains error, it is very probable that\n // our node is one of those error nodes.\n // also, if there are errors, the node lezer finds us,\n // might not be the best node.\n // so first we check if there is an error node at the cursor position\n let maybeErrorNode = getErrorNode(tree, shiftedOffset);\n if (!maybeErrorNode) {\n // try again with the previous character\n maybeErrorNode = getErrorNode(tree, shiftedOffset - 1);\n }\n\n const cur = maybeErrorNode != null ? maybeErrorNode.cursor() : tree.cursorAt(shiftedOffset);\n\n const currentNode = cur.node;\n const ids = [cur.type.id];\n while (cur.parent()) {\n ids.push(cur.type.id);\n }\n\n let situationType: SituationType | void = undefined;\n for (let resolver of RESOLVERS) {\n if (isPathMatch(resolver.path, ids)) {\n situationType = resolver.fun(currentNode, text, shiftedOffset, offset);\n }\n }\n\n return { query: text, ...(situationType ?? { type: 'UNKNOWN' }) };\n}\n\nconst ERROR_NODE_ID = 0;\n\nconst RESOLVERS: Resolver[] = [\n // Curson on error node cases\n {\n path: [ERROR_NODE_ID, AttributeField],\n fun: resolveAttribute,\n },\n {\n path: [ERROR_NODE_ID, FieldExpression],\n fun: resolveExpression,\n },\n {\n path: [ERROR_NODE_ID, SpansetFilter],\n fun: resolveSpansetWithNoClosedBrace,\n },\n {\n path: [ERROR_NODE_ID, Aggregate],\n fun: resolveAttributeForFunction,\n },\n {\n path: [ERROR_NODE_ID, IntrinsicField],\n fun: resolveAttributeForFunction,\n },\n {\n path: [ERROR_NODE_ID, GroupOperation],\n fun: resolveAttributeForFunction,\n },\n {\n path: [ERROR_NODE_ID, SelectOperation],\n fun: resolveAttributeForFunction,\n },\n {\n path: [ERROR_NODE_ID, SpansetPipelineExpression],\n fun: resolveSpansetPipeline,\n },\n {\n path: [ERROR_NODE_ID, ScalarFilter, SpansetPipeline],\n fun: resolveArithmeticOperator,\n },\n // Curson on valid node cases (the whole query could contain errors nevertheless)\n {\n path: [FieldExpression],\n fun: resolveSpanset,\n },\n {\n path: [SpansetFilter],\n fun: resolveSpanset,\n },\n {\n path: [SpansetPipelineExpression],\n fun: resolveNewSpansetExpression,\n },\n {\n path: [TraceQL],\n fun: resolveNewSpansetExpression,\n },\n {\n path: [StringNode, Static],\n fun: resolveExpression,\n },\n];\n\nconst resolveAttributeCompletion = (node: SyntaxNode, text: string, pos: number): SituationType | void => {\n // The user is completing an expression. We can take advantage of the fact that the Monaco editor is smart\n // enough to automatically detect that there are some characters before the cursor and to take them into\n // account when providing suggestions.\n const getAttributeFieldUpToDot = (node: SyntaxNode) => {\n const attributeFieldParent = walk(node, [['firstChild', [AttributeField]]]);\n const attributeFieldParentText = attributeFieldParent ? getNodeText(attributeFieldParent, text) : '';\n const indexOfDot = attributeFieldParentText.indexOf('.');\n return attributeFieldParentText.slice(0, indexOfDot);\n };\n\n // If there is a space, for sure the attribute is completed and no suggestions to complete it should be provided\n if (text[pos - 1] === ' ') {\n return;\n }\n\n const endOfPathNode = walk(node, [['firstChild', [FieldExpression]]]);\n if (endOfPathNode) {\n return {\n type: 'SPANSET_IN_NAME_SCOPE',\n scope: getAttributeFieldUpToDot(endOfPathNode),\n };\n }\n\n const endOfPathNode2 = walk(node, [\n ['parent', [SpansetFilter]],\n ['firstChild', [FieldExpression]],\n ]);\n // In this case, we also need to check the character at `pos`\n if (endOfPathNode2 && text[pos] !== ' ') {\n return {\n type: 'SPANSET_IN_NAME_SCOPE',\n scope: getAttributeFieldUpToDot(endOfPathNode2),\n };\n }\n};\n\nfunction resolveSpanset(node: SyntaxNode, text: string, _: number, originalPos: number): SituationType {\n const situation = resolveAttributeCompletion(node, text, originalPos);\n if (situation) {\n return situation;\n }\n\n let endOfPathNode = walk(node, [\n ['firstChild', [FieldExpression]],\n ['firstChild', [AttributeField]],\n ]);\n if (endOfPathNode) {\n return {\n type: 'SPANSET_EXPRESSION_OPERATORS',\n };\n }\n\n endOfPathNode = walk(node, [\n ['lastChild', [FieldExpression]],\n ['lastChild', [FieldExpression]],\n ['lastChild', [Static]],\n ]);\n if (endOfPathNode) {\n return {\n type: 'SPANFIELD_COMBINING_OPERATORS',\n };\n }\n\n endOfPathNode = walk(node, [['lastChild', [FieldExpression]]]);\n if (endOfPathNode) {\n return {\n type: 'SPANSET_EXPRESSION_OPERATORS',\n };\n }\n\n return {\n type: 'SPANSET_EMPTY',\n };\n}\n\nfunction resolveAttribute(node: SyntaxNode, text: string): SituationType {\n const attributeFieldParent = walk(node, [['parent', [AttributeField]]]);\n const attributeFieldParentText = attributeFieldParent ? getNodeText(attributeFieldParent, text) : '';\n\n if (attributeFieldParentText === '.') {\n return {\n type: 'SPANSET_ONLY_DOT',\n };\n }\n\n const indexOfDot = attributeFieldParentText.indexOf('.');\n const attributeFieldUpToDot = attributeFieldParentText.slice(0, indexOfDot);\n\n if (['span', 'resource', 'parent'].find((item) => item === attributeFieldUpToDot)) {\n return {\n type: 'SPANSET_IN_NAME_SCOPE',\n scope: attributeFieldUpToDot,\n };\n }\n return {\n type: 'SPANSET_IN_NAME',\n };\n}\n\nfunction resolveExpression(node: SyntaxNode, text: string, _: number, originalPos: number): SituationType {\n const situation = resolveAttributeCompletion(node, text, originalPos);\n if (situation) {\n return situation;\n }\n\n if (\n walk(node, [\n ['parent', [Static]],\n ['parent', [FieldExpression]],\n ['prevSibling', [FieldOp]],\n ])\n ) {\n let attributeField = node.parent?.parent?.prevSibling?.prevSibling;\n if (attributeField) {\n return {\n type: 'SPANSET_IN_VALUE',\n tagName: getNodeText(attributeField, text),\n betweenQuotes: true,\n };\n }\n }\n\n if (node.prevSibling?.type.id === FieldOp) {\n let attributeField = node.prevSibling?.prevSibling;\n if (attributeField) {\n return {\n type: 'SPANSET_IN_VALUE',\n tagName: getNodeText(attributeField, text),\n betweenQuotes: false,\n };\n }\n }\n\n if (node.prevSibling?.type.name === 'And' || node.prevSibling?.type.name === 'Or') {\n return {\n type: 'SPANSET_EMPTY',\n };\n }\n\n return {\n type: 'SPANSET_IN_THE_MIDDLE',\n };\n}\n\nfunction resolveArithmeticOperator(node: SyntaxNode, _0: string, _1: number): SituationType | void {\n if (node.prevSibling?.type.id !== ComparisonOp) {\n return {\n type: 'SPANSET_COMPARISON_OPERATORS',\n };\n }\n}\n\nfunction resolveNewSpansetExpression(node: SyntaxNode, text: string, offset: number): SituationType {\n // Select the node immediately before the one pointed by the cursor\n let previousNode = node.firstChild;\n try {\n previousNode = node.firstChild;\n while (previousNode!.to < offset) {\n previousNode = previousNode!.nextSibling;\n }\n } catch (error) {\n console.error('Unexpected error while searching for previous node', error);\n }\n\n if (previousNode?.type.id === And || previousNode?.type.id === Or) {\n return {\n type: 'NEW_SPANSET',\n };\n }\n\n return {\n type: 'SPANSET_COMBINING_OPERATORS',\n };\n}\n\nfunction resolveAttributeForFunction(node: SyntaxNode, _0: string, _1: number): SituationType | void {\n const parent = node?.parent;\n if (!!parent && [IntrinsicField, Aggregate, GroupOperation, SelectOperation, SelectArgs].includes(parent.type.id)) {\n return {\n type: 'ATTRIBUTE_FOR_FUNCTION',\n };\n }\n}\n\nfunction resolveSpansetPipeline(node: SyntaxNode, _1: string, _2: number): SituationType {\n if (node.prevSibling?.type.id === Pipe) {\n return {\n type: 'SPANSET_PIPELINE_AFTER_OPERATOR',\n };\n }\n return {\n type: 'NEW_SPANSET',\n };\n}\n\nfunction resolveSpansetWithNoClosedBrace(node: SyntaxNode, text: string, originalPos: number): SituationType {\n const situation = resolveAttributeCompletion(node, text, originalPos);\n if (situation) {\n return situation;\n }\n\n return {\n type: 'SPANSET_EXPRESSION_OPERATORS_WITH_MISSING_CLOSED_BRACE',\n };\n}\n","import { IMarkdownString } from 'monaco-editor';\n\nimport { SelectableValue } from '@grafana/data';\nimport { isFetchError } from '@grafana/runtime';\nimport type { Monaco, monacoTypes } from '@grafana/ui';\n\nimport { notifyApp } from '../_importedDependencies/actions/appNotification';\nimport { createErrorNotification } from '../_importedDependencies/core/appNotification';\nimport { dispatch } from '../_importedDependencies/store';\nimport TempoLanguageProvider from '../language_provider';\n\nimport { getSituation, Situation } from './situation';\nimport { intrinsics, scopes } from './traceql';\n\ninterface Props {\n languageProvider: TempoLanguageProvider;\n}\n\ntype MinimalCompletionItem = {\n label: string;\n insertText: string;\n detail?: string;\n documentation?: string | IMarkdownString;\n};\n\n/**\n * Class that implements CompletionItemProvider interface and allows us to provide suggestion for the Monaco\n * autocomplete system.\n *\n * Here we want to provide suggestions for TraceQL. Please refer to\n * https://grafana.com/docs/tempo/latest/traceql for the syntax of the language.\n */\nexport class CompletionProvider implements monacoTypes.languages.CompletionItemProvider {\n languageProvider: TempoLanguageProvider;\n registerInteractionCommandId: string | null;\n\n constructor(props: Props) {\n this.languageProvider = props.languageProvider;\n this.registerInteractionCommandId = null;\n }\n\n triggerCharacters = ['{', '.', '[', '(', '=', '~', ' ', '\"'];\n\n // Operators\n static readonly arithmeticOps: MinimalCompletionItem[] = [\n {\n label: '+',\n insertText: '+',\n detail: 'Plus',\n },\n {\n label: '-',\n insertText: '-',\n detail: 'Minus',\n },\n {\n label: '*',\n insertText: '*',\n detail: 'Times',\n },\n {\n label: '/',\n insertText: '/',\n detail: 'Over',\n },\n ];\n\n static readonly logicalOps: MinimalCompletionItem[] = [\n {\n label: '&&',\n insertText: '&&',\n detail: 'And',\n documentation: 'And (intersection) operator. Checks that both conditions found matches.',\n },\n {\n label: '||',\n insertText: '||',\n detail: 'Or',\n documentation: 'Or (union) operator. Checks that either condition found matches.',\n },\n ];\n\n static readonly comparisonOps: MinimalCompletionItem[] = [\n {\n label: '=',\n insertText: '=',\n detail: 'Equality',\n },\n {\n label: '!=',\n insertText: '!=',\n detail: 'Inequality',\n },\n {\n label: '>',\n insertText: '>',\n detail: 'Greater than',\n },\n {\n label: '>=',\n insertText: '>=',\n detail: 'Greater than or equal to',\n },\n {\n label: '<',\n insertText: '<',\n detail: 'Less than',\n },\n {\n label: '<=',\n insertText: '<=',\n detail: 'Less than or equal to',\n },\n {\n label: '=~',\n insertText: '=~',\n detail: 'Regular expression',\n },\n {\n label: '!~',\n insertText: '!~',\n detail: 'Negated regular expression',\n },\n ];\n static readonly structuralOps: MinimalCompletionItem[] = [\n {\n label: '>>',\n insertText: '>>',\n detail: 'Descendant',\n documentation:\n 'Descendant operator. Looks for spans matching {condB} that are descendants of a span matching {condA}',\n },\n {\n label: '>',\n insertText: '>',\n detail: 'Child',\n documentation:\n 'Child operator. Looks for spans matching {condB} that are direct child spans of a parent matching {condA}',\n },\n {\n label: '<<',\n insertText: '<<',\n detail: 'Ancestor',\n documentation:\n 'Ancestor operator. Looks for spans matching {condB} that are ancestors of a span matching {condA}',\n },\n {\n label: '<',\n insertText: '<',\n detail: 'Parent',\n documentation:\n 'Parent operator. Looks for spans matching {condB} that are direct parent spans of a child matching {condA}',\n },\n {\n label: '~',\n insertText: '~',\n detail: 'Sibling',\n documentation:\n 'Sibling operator. Checks that spans matching {condA} and {condB} are siblings of the same parent span.',\n },\n ];\n\n static readonly spansetOps: MinimalCompletionItem[] = [\n {\n label: '|',\n insertText: '|',\n detail: 'Pipe',\n },\n ...CompletionProvider.logicalOps,\n ...CompletionProvider.structuralOps,\n ];\n\n // Functions (aggregator, selector, and combining operators)\n static readonly spansetAggregatorOps: MinimalCompletionItem[] = [\n {\n label: 'count',\n insertText: 'count()$0',\n detail: 'Number of spans',\n documentation: 'Counts the number of spans in a spanset',\n },\n {\n label: 'avg',\n insertText: 'avg($0)',\n detail: 'Average of attribute',\n documentation: 'Computes the average of a given numeric attribute or intrinsic for a spanset.',\n },\n {\n label: 'max',\n insertText: 'max($0)',\n detail: 'Max value of attribute',\n documentation: 'Computes the maximum value of a given numeric attribute or intrinsic for a spanset.',\n },\n {\n label: 'min',\n insertText: 'min($0)',\n detail: 'Min value of attribute',\n documentation: 'Computes the minimum value of a given numeric attribute or intrinsic for a spanset.',\n },\n {\n label: 'sum',\n insertText: 'sum($0)',\n detail: 'Sum value of attribute',\n documentation: 'Computes the sum value of a given numeric attribute or intrinsic for a spanset.',\n },\n ];\n\n static readonly functions: MinimalCompletionItem[] = [\n ...this.spansetAggregatorOps,\n {\n label: 'by',\n insertText: 'by($0)',\n detail: 'Grouping of attributes',\n documentation: 'Groups by arbitrary attributes.',\n },\n {\n label: 'select',\n insertText: 'select($0)',\n detail: 'Selection of fields',\n documentation: 'Selects arbitrary fields from spans.',\n },\n ];\n\n // We set these directly and ae required for the provider to function.\n monaco: Monaco | undefined;\n editor: monacoTypes.editor.IStandaloneCodeEditor | undefined;\n\n private cachedValues: { [key: string]: Array<SelectableValue<string>> } = {};\n\n provideCompletionItems(\n model: monacoTypes.editor.ITextModel,\n position: monacoTypes.Position\n ): monacoTypes.languages.ProviderResult<monacoTypes.languages.CompletionList> {\n // Should not happen, this should not be called before it is initialized\n if (!(this.monaco && this.editor)) {\n throw new Error('provideCompletionItems called before CompletionProvider was initialized');\n }\n\n // if the model-id does not match, then this call is from a different editor-instance,\n // not \"our instance\", so return nothing\n if (this.editor.getModel()?.id !== model.id) {\n return { suggestions: [] };\n }\n\n const { range, offset } = getRangeAndOffset(this.monaco, model, position);\n const situation = getSituation(model.getValue(), offset);\n const completionItems = situation != null ? this.getCompletions(situation) : Promise.resolve([]);\n\n return completionItems.then((items) => {\n // monaco by-default alphabetically orders the items.\n // to stop it, we use a number-as-string sortkey,\n // so that monaco keeps the order we use\n const maxIndexDigits = items.length.toString().length;\n const suggestions: monacoTypes.languages.CompletionItem[] = items.map((item, index) => {\n const suggestion: monacoTypes.languages.CompletionItem = {\n kind: getMonacoCompletionItemKind(item.type, this.monaco!),\n label: item.label,\n insertText: item.insertText,\n insertTextRules: item.insertTextRules,\n detail: item.detail,\n documentation: item.documentation,\n sortText: index.toString().padStart(maxIndexDigits, '0'), // to force the order we have\n range,\n command: {\n id: this.registerInteractionCommandId || 'noOp',\n title: 'Report Interaction',\n arguments: [item.label, item.type],\n },\n };\n fixSuggestion(suggestion, item.type, model, offset);\n return suggestion;\n });\n return { suggestions };\n });\n }\n\n /**\n * Set the ID for the registerInteraction command, to be used to keep track of how many completions are used by the users\n */\n setRegisterInteractionCommandId(id: string | null) {\n this.registerInteractionCommandId = id;\n }\n\n private async getTagValues(tagName: string, query: string): Promise<Array<SelectableValue<string>>> {\n let tagValues: Array<SelectableValue<string>>;\n const cacheKey = `${tagName}:${query}`;\n\n if (this.cachedValues.hasOwnProperty(cacheKey)) {\n tagValues = this.cachedValues[cacheKey];\n } else {\n tagValues = await this.languageProvider.getOptionsV2(tagName, query);\n this.cachedValues[cacheKey] = tagValues;\n }\n return tagValues;\n }\n\n /**\n * Get suggestion based on the situation we are in like whether we should suggest tag names or values.\n * @param situation\n * @private\n */\n private async getCompletions(situation: Situation): Promise<Completion[]> {\n switch (situation.type) {\n // This should only happen for cases that we do not support yet\n case 'UNKNOWN': {\n return [];\n }\n case 'EMPTY': {\n return this.getScopesCompletions('{ ', '$0 }')\n .concat(this.getIntrinsicsCompletions('{ ', '$0 }'))\n .concat(this.getTagsCompletions('{ .'));\n }\n case 'SPANSET_EMPTY':\n return this.getScopesCompletions().concat(this.getIntrinsicsCompletions()).concat(this.getTagsCompletions('.'));\n case 'SPANSET_ONLY_DOT': {\n return this.getTagsCompletions();\n }\n case 'SPANSET_IN_THE_MIDDLE':\n return [...CompletionProvider.comparisonOps, ...CompletionProvider.logicalOps].map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANSET_EXPRESSION_OPERATORS_WITH_MISSING_CLOSED_BRACE':\n return [...CompletionProvider.comparisonOps, ...CompletionProvider.logicalOps].map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANSET_IN_NAME':\n return this.getScopesCompletions().concat(this.getIntrinsicsCompletions()).concat(this.getTagsCompletions());\n case 'SPANSET_IN_NAME_SCOPE':\n return this.getTagsCompletions(undefined, situation.scope);\n case 'SPANSET_EXPRESSION_OPERATORS':\n return [\n ...CompletionProvider.comparisonOps,\n ...CompletionProvider.logicalOps,\n ...CompletionProvider.arithmeticOps,\n ].map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANFIELD_COMBINING_OPERATORS':\n return [\n ...CompletionProvider.logicalOps,\n ...CompletionProvider.arithmeticOps,\n ...CompletionProvider.comparisonOps,\n ].map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANSET_COMBINING_OPERATORS':\n return CompletionProvider.spansetOps.map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANSET_PIPELINE_AFTER_OPERATOR':\n const functions = CompletionProvider.functions.map((key) => ({\n ...key,\n insertTextRules: this.monaco?.languages.CompletionItemInsertTextRule?.InsertAsSnippet,\n type: 'FUNCTION' as const,\n }));\n const tags = this.getScopesCompletions()\n .concat(this.getIntrinsicsCompletions())\n .concat(this.getTagsCompletions('.'));\n return [...functions, ...tags];\n case 'SPANSET_COMPARISON_OPERATORS':\n return CompletionProvider.comparisonOps.map((key) => ({\n ...key,\n type: 'OPERATOR',\n }));\n case 'SPANSET_IN_VALUE':\n let tagValues;\n try {\n tagValues = await this.getTagValues(situation.tagName, situation.query);\n } catch (error) {\n if (isFetchError(error)) {\n dispatch(notifyApp(createErrorNotification(error.data.error, new Error(error.data.message))));\n } else if (error instanceof Error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n }\n }\n\n const items: Completion[] = [];\n\n const getInsertionText = (val: SelectableValue<string>): string => {\n if (situation.betweenQuotes) {\n return val.label!;\n }\n return val.type === 'string' ? `\"${val.label}\"` : val.label!;\n };\n\n tagValues?.forEach((val) => {\n if (val?.label) {\n items.push({\n label: val.label,\n insertText: getInsertionText(val),\n type: 'TAG_VALUE',\n });\n }\n });\n return items;\n case 'SPANSET_AFTER_VALUE':\n return CompletionProvider.logicalOps.map((key) => ({\n label: key.label,\n insertText: key.insertText + '}',\n type: 'OPERATOR',\n }));\n case 'NEW_SPANSET':\n return this.getScopesCompletions('{ ', '$0 }')\n .concat(this.getIntrinsicsCompletions('{ ', '$0 }'))\n .concat(this.getTagsCompletions('.'));\n case 'ATTRIBUTE_FOR_FUNCTION':\n return this.getScopesCompletions().concat(this.getIntrinsicsCompletions()).concat(this.getTagsCompletions('.'));\n default:\n throw new Error(`Unexpected situation ${situation}`);\n }\n }\n\n private getTagsCompletions(prepend?: string, scope?: string): Completion[] {\n const tags = this.languageProvider.getTraceqlAutocompleteTags(scope);\n return tags\n .sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'accent' }))\n .map((key) => ({\n label: key,\n insertText: (prepend || '') + key,\n type: 'TAG_NAME',\n }));\n }\n\n private getIntrinsicsCompletions(prepend?: string, append?: string): Completion[] {\n return intrinsics.map((key) => ({\n label: key,\n insertText: (prepend || '') + key + (append || ''),\n type: 'KEYWORD',\n insertTextRules: this.monaco?.languages.CompletionItemInsertTextRule?.InsertAsSnippet,\n }));\n }\n\n private getScopesCompletions(prepend?: string, append?: string): Completion[] {\n return scopes.map((key) => ({\n label: key,\n insertText: (prepend || '') + key + (append || ''),\n type: 'SCOPE',\n insertTextRules: this.monaco?.languages.CompletionItemInsertTextRule?.InsertAsSnippet,\n }));\n }\n}\n\n/**\n * Get item kind which is used for icon next to the suggestion.\n * @param type\n * @param monaco\n */\nfunction getMonacoCompletionItemKind(type: CompletionType, monaco: Monaco): monacoTypes.languages.CompletionItemKind {\n switch (type) {\n case 'TAG_NAME':\n return monaco.languages.CompletionItemKind.Enum;\n case 'KEYWORD':\n return monaco.languages.CompletionItemKind.Keyword;\n case 'OPERATOR':\n return monaco.languages.CompletionItemKind.Operator;\n case 'TAG_VALUE':\n return monaco.languages.CompletionItemKind.EnumMember;\n case 'SCOPE':\n return monaco.languages.CompletionItemKind.Class;\n case 'FUNCTION':\n return monaco.languages.CompletionItemKind.Function;\n default:\n throw new Error(`Unexpected CompletionType: ${type}`);\n }\n}\n\nexport type CompletionType = 'TAG_NAME' | 'TAG_VALUE' | 'KEYWORD' | 'OPERATOR' | 'SCOPE' | 'FUNCTION';\ntype Completion = {\n type: CompletionType;\n label: string;\n insertText: string;\n insertTextRules?: monacoTypes.languages.CompletionItemInsertTextRule; // we used it to position the cursor\n documentation?: string | IMarkdownString;\n detail?: string;\n};\n\nexport type Tag = {\n name: string;\n value: string;\n};\n\nfunction getRangeAndOffset(monaco: Monaco, model: monacoTypes.editor.ITextModel, position: monacoTypes.Position) {\n const word = model.getWordAtPosition(position);\n const range =\n word != null\n ? monaco.Range.lift({\n startLineNumber: position.lineNumber,\n endLineNumber: position.lineNumber,\n startColumn: word.startColumn,\n endColumn: word.endColumn,\n })\n : monaco.Range.fromPositions(position);\n\n // documentation says `position` will be \"adjusted\" in `getOffsetAt` so we clone it here just for sure.\n const positionClone = {\n column: position.column,\n lineNumber: position.lineNumber,\n };\n\n const offset = model.getOffsetAt(positionClone);\n return { offset, range };\n}\n\n/**\n * Fix the suggestions range and insert text. For the range we have to adjust because monaco by default replaces just\n * the last word which stops at dot while traceQL tags contain dots themselves and we want to replace the whole tag\n * name when suggesting. The insert text needs to be adjusted for scope (leading dot) if scope is currently missing.\n * This may be doable also when creating the suggestions but for a particular situation this seems to be easier to do\n * here.\n */\nfunction fixSuggestion(\n suggestion: monacoTypes.languages.CompletionItem,\n itemType: CompletionType,\n model: monacoTypes.editor.ITextModel,\n offset: number\n) {\n if (itemType === 'TAG_NAME') {\n const match = model\n .getValue()\n .substring(0, offset)\n .match(/(span\\.|resource\\.|\\.)?([\\w./-]*)$/);\n\n if (match) {\n const scope = match[1];\n const tag = match[2];\n\n if (tag) {\n // Add the default scope if needed.\n if (!scope && suggestion.insertText[0] !== '.') {\n suggestion.insertText = '.' + suggestion.insertText;\n }\n\n // Adjust the range, so that we will replace the whole tag.\n suggestion.range = {\n ...suggestion.range,\n startColumn: offset - tag.length + 1,\n };\n }\n }\n }\n}\n","import { SyntaxNode } from '@lezer/common';\n\nimport {\n Aggregate,\n And,\n AttributeField,\n ComparisonOp,\n FieldExpression,\n FieldOp,\n GroupOperation,\n Identifier,\n IntrinsicField,\n Or,\n Parent,\n parser,\n Pipe,\n Resource,\n ScalarExpression,\n ScalarFilter,\n SelectOperation,\n Span,\n SpansetFilter,\n SpansetPipelineExpression,\n} from '@grafana/lezer-traceql';\nimport { monacoTypes } from '@grafana/ui';\n\n/**\n * Given an error node, generate an error message to be displayed to the user.\n *\n * @param errorNode the error node, as returned by the TraceQL Lezer parser\n * @returns the error message\n */\nexport const computeErrorMessage = (errorNode: SyntaxNode) => {\n switch (errorNode.parent?.type.id) {\n case FieldExpression:\n switch (errorNode.prevSibling?.type.id) {\n case And:\n case Or:\n return 'Invalid value after logical operator.';\n case FieldOp:\n return 'Invalid value after comparison or arithmetic operator.';\n default:\n return 'Invalid operator after field expression.';\n }\n case SpansetFilter:\n if (errorNode.prevSibling?.type.id === FieldExpression) {\n return 'Invalid comparison operator after field expression.';\n }\n return 'Invalid expression for spanset.';\n case SpansetPipelineExpression:\n switch (errorNode.prevSibling?.type.id) {\n case SpansetPipelineExpression:\n return 'Invalid spanset combining operator after spanset expression.';\n case Pipe:\n return 'Invalid aggregation operator after pipepile operator.';\n default:\n return 'Invalid spanset expression after spanset combining operator.';\n }\n case IntrinsicField:\n case Aggregate:\n return 'Invalid expression for aggregator operator.';\n case GroupOperation:\n return 'Invalid expression for by operator.';\n case SelectOperation:\n return 'Invalid expression for select operator.';\n case AttributeField:\n return 'Invalid expression for spanset.';\n case ScalarFilter:\n switch (errorNode.prevSibling?.type.id) {\n case ComparisonOp:\n return 'Invalid value after comparison operator.';\n case ScalarExpression:\n if (errorNode.prevSibling?.firstChild?.type.id === Aggregate) {\n return 'Invalid comparison operator after aggregator operator.';\n }\n default:\n return 'Invalid value after comparison operator.';\n }\n default:\n return 'Invalid query.';\n }\n};\n\n/**\n * Parse the given query and find the error nodes, if any, in the resulting tree.\n *\n * @param query the TraceQL query of the user\n * @returns the error nodes\n */\nexport const getErrorNodes = (query: string): SyntaxNode[] => {\n // Return immediately if the query is empty, to avoid raising exceptions in processing it\n if (query.trim() === '') {\n return [];\n }\n\n // Check whether this is a trace ID or traceQL query by checking if it only contains hex characters\n const hexOnlyRegex = /^[0-9A-Fa-f]*$/;\n if (query.trim().match(hexOnlyRegex)) {\n return [];\n }\n\n const tree = parser.parse(query);\n\n // Find all error nodes and compute the associated erro boundaries\n const errorNodes: SyntaxNode[] = [];\n tree.iterate({\n enter: (nodeRef) => {\n if (nodeRef.type.id === 0) {\n errorNodes.push(nodeRef.node);\n }\n },\n });\n\n return errorNodes;\n};\n\n/**\n * Use red markers (squiggles) to highlight syntax errors in queries.\n *\n */\nexport const setMarkers = (\n monaco: typeof monacoTypes,\n model: monacoTypes.editor.ITextModel,\n errorNodes: SyntaxNode[]\n) => {\n const markers = [\n ...getErrorMarkers(monaco.MarkerSeverity.Error, model, errorNodes),\n ...getWarningMarkers(monaco.MarkerSeverity.Warning, model),\n ];\n monaco.editor.setModelMarkers(\n model,\n 'owner', // default value\n markers\n );\n};\n\nexport const getErrorMarkers = (severity: number, model: monacoTypes.editor.ITextModel, errorNodes: SyntaxNode[]) => {\n return errorNodes.map((errorNode) => {\n const message = computeErrorMessage(errorNode);\n return getMarker(severity, message, model, errorNode.from, errorNode.to);\n });\n};\n\nexport const getWarningMarkers = (severity: number, model: monacoTypes.editor.ITextModel) => {\n let markers = [];\n\n // Check if there are issues that should result in a warning marker\n const text = model.getValue();\n const tree = parser.parse(text);\n const indexOfDot = text.indexOf('.');\n if (indexOfDot > -1) {\n const cur = tree.cursorAt(0);\n do {\n const { node } = cur;\n if (node.type.id === Identifier) {\n // Make sure prevSibling is using the proper scope\n if (\n node.prevSibling?.type.id !== Parent &&\n node.prevSibling?.type.id !== Resource &&\n node.prevSibling?.type.id !== Span\n ) {\n const from = node.prevSibling ? node.prevSibling.from : node.from - 1;\n const to = node.prevSibling ? node.prevSibling.to : node.from - 1;\n const message = 'Add resource or span scope to attribute to improve query performance.';\n markers.push(getMarker(severity, message, model, from, to));\n }\n }\n } while (cur.next());\n }\n\n return markers;\n};\n\nexport const getMarker = (\n severity: number,\n message: string,\n model: monacoTypes.editor.ITextModel,\n from: number,\n to: number\n) => {\n let startLine = 0;\n let endLine = 0;\n let start = from;\n let end = to;\n\n while (start > 0) {\n startLine++;\n start -= model.getLineLength(startLine) + 1; // new lines don't count for getLineLength() but they still count as a character for the parser\n }\n while (end > 0) {\n endLine++;\n end -= model.getLineLength(endLine) + 1;\n }\n\n return {\n message,\n severity,\n\n startLineNumber: startLine,\n endLineNumber: endLine,\n\n // `+ 2` because of the above computations\n startColumn: start + model.getLineLength(startLine) + 2,\n endColumn: end + model.getLineLength(endLine) + 2,\n };\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { TemporaryAlert } from '@grafana/o11y-ds-frontend';\nimport { reportInteraction } from '@grafana/runtime';\nimport { CodeEditor, Monaco, monacoTypes, useTheme2 } from '@grafana/ui';\n\nimport { TempoDatasource } from '../datasource';\nimport { TempoQuery } from '../types';\n\nimport { CompletionProvider, CompletionType } from './autocomplete';\nimport { getErrorNodes, setMarkers } from './highlighting';\nimport { languageDefinition } from './traceql';\n\ninterface Props {\n placeholder: string;\n query: TempoQuery;\n onChange: (val: TempoQuery) => void;\n onRunQuery: () => void;\n datasource: TempoDatasource;\n readOnly?: boolean;\n}\n\nexport function TraceQLEditor(props: Props) {\n const [alertText, setAlertText] = useState('');\n\n const { query, onChange, onRunQuery, placeholder } = props;\n const setupAutocompleteFn = useAutocomplete(props.datasource, setAlertText);\n const theme = useTheme2();\n const styles = getStyles(theme, placeholder);\n\n // The Monaco Editor uses the first version of props.onChange in handleOnMount i.e. always has the initial\n // value of query because underlying Monaco editor is passed `query` below in the onEditorChange callback.\n // handleOnMount is called only once when the editor is mounted and does not get updates to query.\n // So we need useRef to get the latest version of query in the onEditorChange callback.\n const queryRef = useRef(query);\n queryRef.current = query;\n const onEditorChange = (value: string) => {\n onChange({ ...queryRef.current, query: value });\n };\n\n // work around the problem that `onEditorDidMount` is called once\n // and wouldn't get new version of onRunQuery\n const onRunQueryRef = useRef(onRunQuery);\n onRunQueryRef.current = onRunQuery;\n\n const errorTimeoutId = useRef<number>();\n\n return (\n <>\n <CodeEditor\n value={query.query || ''}\n language={langId}\n onBlur={onEditorChange}\n onChange={onEditorChange}\n containerStyles={styles.queryField}\n readOnly={props.readOnly}\n monacoOptions={{\n folding: false,\n fontSize: 14,\n lineNumbers: 'off',\n overviewRulerLanes: 0,\n renderLineHighlight: 'none',\n scrollbar: {\n vertical: 'hidden',\n verticalScrollbarSize: 8, // used as \"padding-right\"\n horizontal: 'hidden',\n horizontalScrollbarSize: 0,\n },\n scrollBeyondLastLine: false,\n wordWrap: 'on',\n }}\n onBeforeEditorMount={ensureTraceQL}\n onEditorDidMount={(editor, monaco) => {\n if (!props.readOnly) {\n setupAutocompleteFn(editor, monaco, setupRegisterInteractionCommand(editor));\n setupActions(editor, monaco, () => onRunQueryRef.current());\n setupPlaceholder(editor, monaco, styles);\n }\n setupAutoSize(editor);\n\n // Parse query that might already exist (e.g., after a page refresh)\n const model = editor.getModel();\n if (model) {\n const errorNodes = getErrorNodes(model.getValue());\n setMarkers(monaco, model, errorNodes);\n }\n\n // Register callback for query changes\n editor.onDidChangeModelContent((changeEvent) => {\n const model = editor.getModel();\n\n if (!model) {\n return;\n }\n\n // Remove previous callback if existing, to prevent squiggles from been shown while the user is still typing\n window.clearTimeout(errorTimeoutId.current);\n\n const errorNodes = getErrorNodes(model.getValue());\n const cursorPosition = changeEvent.changes[0].rangeOffset;\n\n // Immediately updates the squiggles, in case the user fixed an error,\n // excluding the error around the cursor position\n setMarkers(\n monaco,\n model,\n errorNodes.filter((errorNode) => !(errorNode.from <= cursorPosition && cursorPosition <= errorNode.to))\n );\n\n // Later on, show all errors\n errorTimeoutId.current = window.setTimeout(() => {\n setMarkers(monaco, model, errorNodes);\n }, 500);\n });\n }}\n />\n {alertText && <TemporaryAlert severity={'error'} text={alertText} />}\n </>\n );\n}\n\nfunction setupPlaceholder(editor: monacoTypes.editor.IStandaloneCodeEditor, monaco: Monaco, styles: EditorStyles) {\n const placeholderDecorators = [\n {\n range: new monaco.Range(1, 1, 1, 1),\n options: {\n className: styles.placeholder, // The placeholder text is in styles.placeholder\n isWholeLine: true,\n },\n },\n ];\n\n let decorators: string[] = [];\n\n const checkDecorators = (): void => {\n const model = editor.getModel();\n\n if (!model) {\n return;\n }\n\n const newDecorators = model.getValueLength() === 0 ? placeholderDecorators : [];\n decorators = model.deltaDecorations(decorators, newDecorators);\n };\n\n checkDecorators();\n editor.onDidChangeModelContent(checkDecorators);\n}\n\nfunction setupActions(editor: monacoTypes.editor.IStandaloneCodeEditor, monaco: Monaco, onRunQuery: () => void) {\n editor.addAction({\n id: 'run-query',\n label: 'Run Query',\n keybindings: [monaco.KeyMod.Shift | monaco.KeyCode.Enter],\n contextMenuGroupId: 'navigation',\n contextMenuOrder: 1.5,\n run: function () {\n onRunQuery();\n },\n });\n}\n\nfunction setupRegisterInteractionCommand(editor: monacoTypes.editor.IStandaloneCodeEditor): string | null {\n return editor.addCommand(0, function (_, label, type: CompletionType) {\n const properties: Record<string, unknown> = { datasourceType: 'tempo', type };\n // Filter out the label for TAG_VALUE completions to avoid potentially exposing sensitive data\n if (type !== 'TAG_VALUE') {\n properties.label = label;\n }\n reportInteraction('grafana_traces_traceql_completion', properties);\n });\n}\n\nfunction setupAutoSize(editor: monacoTypes.editor.IStandaloneCodeEditor) {\n const container = editor.getDomNode();\n const updateHeight = () => {\n if (container) {\n const contentHeight = Math.min(1000, editor.getContentHeight());\n const width = parseInt(container.style.width, 10);\n container.style.width = `${width}px`;\n container.style.height = `${contentHeight}px`;\n editor.layout({ width, height: contentHeight });\n }\n };\n editor.onDidContentSizeChange(updateHeight);\n updateHeight();\n}\n\n/**\n * Hook that returns function that will set up monaco autocomplete for the label selector\n * @param datasource the Tempo datasource instance\n * @param setAlertText setter for alert's text\n */\nfunction useAutocomplete(datasource: TempoDatasource, setAlertText: (text: string) => void) {\n // We need the provider ref so we can pass it the label/values data later. This is because we run the call for the\n // values here but there is additional setup needed for the provider later on. We could run the getSeries() in the\n // returned function but that is run after the monaco is mounted so would delay the request a bit when it does not\n // need to.\n const providerRef = useRef<CompletionProvider>(\n new CompletionProvider({ languageProvider: datasource.languageProvider })\n );\n\n useEffect(() => {\n const fetchTags = async () => {\n try {\n await datasource.languageProvider.start();\n } catch (error) {\n if (error instanceof Error) {\n console.error(error);\n setAlertText(error.message);\n }\n }\n };\n fetchTags();\n }, [datasource, setAlertText]);\n\n const autocompleteDisposeFun = useRef<(() => void) | null>(null);\n useEffect(() => {\n // when we unmount, we unregister the autocomplete-function, if it was registered\n return () => {\n autocompleteDisposeFun.current?.();\n };\n }, []);\n\n // This should be run in monaco onEditorDidMount\n return (\n editor: monacoTypes.editor.IStandaloneCodeEditor,\n monaco: Monaco,\n registerInteractionCommandId: string | null\n ) => {\n providerRef.current.editor = editor;\n providerRef.current.monaco = monaco;\n providerRef.current.setRegisterInteractionCommandId(registerInteractionCommandId);\n\n const { dispose } = monaco.languages.registerCompletionItemProvider(langId, providerRef.current);\n autocompleteDisposeFun.current = dispose;\n };\n}\n\n// we must only run the setup code once\nlet traceqlSetupDone = false;\nconst langId = 'traceql';\n\nfunction ensureTraceQL(monaco: Monaco) {\n if (!traceqlSetupDone) {\n traceqlSetupDone = true;\n const { aliases, extensions, mimetypes, def } = languageDefinition;\n monaco.languages.register({ id: langId, aliases, extensions, mimetypes });\n monaco.languages.setMonarchTokensProvider(langId, def.language);\n monaco.languages.setLanguageConfiguration(langId, def.languageConfiguration);\n }\n}\n\ninterface EditorStyles {\n placeholder: string;\n queryField: string;\n}\n\nconst getStyles = (theme: GrafanaTheme2, placeholder: string): EditorStyles => {\n return {\n queryField: css({\n borderRadius: theme.shape.radius.default,\n border: `1px solid ${theme.components.input.borderColor}`,\n flex: 1,\n }),\n placeholder: css({\n '::after': {\n content: `'${placeholder}'`,\n fontFamily: theme.typography.fontFamilyMonospace,\n opacity: 0.3,\n },\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport { defaults } from 'lodash';\nimport React, { useState } from 'react';\n\nimport { GrafanaTheme2, QueryEditorProps } from '@grafana/data';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { Button, InlineLabel, useStyles2 } from '@grafana/ui';\n\nimport { generateQueryFromFilters } from '../SearchTraceQLEditor/utils';\nimport { TempoDatasource } from '../datasource';\nimport { defaultQuery, MyDataSourceOptions, TempoQuery } from '../types';\n\nimport { TempoQueryBuilderOptions } from './TempoQueryBuilderOptions';\nimport { TraceQLEditor } from './TraceQLEditor';\n\ntype EditorProps = {\n onClearResults: () => void;\n};\n\ntype Props = EditorProps & QueryEditorProps<TempoDatasource, TempoQuery, MyDataSourceOptions>;\n\nexport function QueryEditor(props: Props) {\n const styles = useStyles2(getStyles);\n const query = defaults(props.query, defaultQuery);\n const [showCopyFromSearchButton, setShowCopyFromSearchButton] = useState(() => {\n const genQuery = generateQueryFromFilters(query.filters || []);\n return genQuery === query.query || genQuery === '{}';\n });\n\n return (\n <>\n <InlineLabel>\n Build complex queries using TraceQL to select a list of traces.{' '}\n <a rel=\"noreferrer\" target=\"_blank\" href=\"https://grafana.com/docs/tempo/latest/traceql/\">\n Documentation\n </a>\n </InlineLabel>\n {!showCopyFromSearchButton && (\n <div className={styles.copyContainer}>\n <span>Continue editing the query from the Search tab?</span>\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n reportInteraction('grafana_traces_copy_to_traceql_clicked', {\n app: props.app ?? '',\n grafana_version: config.buildInfo.version,\n location: 'traceql_tab',\n });\n\n props.onClearResults();\n props.onChange({\n ...query,\n query: generateQueryFromFilters(query.filters || []),\n });\n setShowCopyFromSearchButton(true);\n }}\n style={{ marginLeft: '10px' }}\n >\n Copy query from Search\n </Button>\n </div>\n )}\n <TraceQLEditor\n placeholder=\"Enter a TraceQL query or trace ID (run with Shift+Enter)\"\n query={query}\n onChange={props.onChange}\n datasource={props.datasource}\n onRunQuery={props.onRunQuery}\n />\n <div className={styles.optionsContainer}>\n <TempoQueryBuilderOptions query={query} onChange={props.onChange} />\n </div>\n </>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n optionsContainer: css({\n marginTop: '10px',\n }),\n copyContainer: css({\n backgroundColor: theme.colors.background.secondary,\n padding: theme.spacing(0.5, 1),\n fontSize: theme.typography.body.fontSize,\n }),\n});\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { QueryEditorProps, SelectableValue } from '@grafana/data';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport {\n Button,\n FileDropzone,\n HorizontalGroup,\n InlineField,\n InlineFieldRow,\n Modal,\n RadioButtonGroup,\n Themeable2,\n withTheme2,\n} from '@grafana/ui';\n\nimport { LokiSearch } from './LokiSearch';\nimport NativeSearch from './NativeSearch/NativeSearch';\nimport TraceQLSearch from './SearchTraceQLEditor/TraceQLSearch';\nimport { ServiceGraphSection } from './ServiceGraphSection';\nimport { LokiQuery } from './_importedDependencies/datasources/loki/types';\nimport { TempoQueryType } from './dataquery.gen';\nimport { TempoDatasource } from './datasource';\nimport { QueryEditor } from './traceql/QueryEditor';\nimport { TempoQuery } from './types';\n\ninterface Props extends QueryEditorProps<TempoDatasource, TempoQuery>, Themeable2 {}\ninterface State {\n uploadModalOpen: boolean;\n}\n\n// This needs to default to traceql for data sources like Splunk, where clicking on a\n// data link should open the traceql tab and run a search based on the configured query.\nconst DEFAULT_QUERY_TYPE: TempoQueryType = 'traceql';\n\nclass TempoQueryFieldComponent extends React.PureComponent<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = {\n uploadModalOpen: false,\n };\n }\n\n // Set the default query type when the component mounts.\n // Also do this if queryType is 'clear' (which is the case when the user changes the query type)\n // otherwise if the user changes the query type and refreshes the page, no query type will be selected\n // which is inconsistent with how the UI was originally when they selected the Tempo data source.\n async componentDidMount() {\n if (!this.props.query.queryType || this.props.query.queryType === 'clear') {\n this.props.onChange({\n ...this.props.query,\n queryType: DEFAULT_QUERY_TYPE,\n });\n }\n }\n\n onChangeLinkedQuery = (value: LokiQuery) => {\n const { query, onChange } = this.props;\n onChange({\n ...query,\n linkedQuery: { ...value, refId: 'linked' },\n });\n };\n\n onRunLinkedQuery = () => {\n this.props.onRunQuery();\n };\n\n onClearResults = () => {\n // Run clear query to clear results\n const { onChange, query, onRunQuery } = this.props;\n onChange({\n ...query,\n queryType: 'clear',\n });\n onRunQuery();\n };\n\n render() {\n const { query, onChange, datasource, app } = this.props;\n\n const logsDatasourceUid = datasource.getLokiSearchDS();\n\n const graphDatasourceUid = datasource.serviceMap?.datasourceUid;\n\n let queryTypeOptions: Array<SelectableValue<TempoQueryType>> = [\n { value: 'traceqlSearch', label: 'Search' },\n { value: 'traceql', label: 'TraceQL' },\n { value: 'serviceMap', label: 'Service Graph' },\n ];\n\n if (logsDatasourceUid) {\n if (datasource?.search?.hide) {\n // Place at beginning as Search if no native search\n queryTypeOptions.unshift({ value: 'search', label: 'Search' });\n } else {\n // Place at end as Loki Search if native search is enabled\n queryTypeOptions.push({ value: 'search', label: 'Loki Search' });\n }\n }\n\n // Show the deprecated search option if any of the deprecated search fields are set\n if (\n query.spanName ||\n query.serviceName ||\n query.search ||\n query.maxDuration ||\n query.minDuration ||\n query.queryType === 'nativeSearch'\n ) {\n queryTypeOptions.unshift({ value: 'nativeSearch', label: '[Deprecated] Search' });\n }\n\n return (\n <>\n <Modal\n title={'Upload trace'}\n isOpen={this.state.uploadModalOpen}\n onDismiss={() => this.setState({ uploadModalOpen: false })}\n >\n <div className={css({ padding: this.props.theme.spacing(2) })}>\n <FileDropzone\n options={{ multiple: false }}\n onLoad={(result) => {\n if (typeof result !== 'string' && result !== null) {\n throw Error(`Unexpected result type: ${typeof result}`);\n }\n this.props.datasource.uploadedJson = result;\n onChange({\n ...query,\n queryType: 'upload',\n });\n this.setState({ uploadModalOpen: false });\n this.props.onRunQuery();\n }}\n />\n </div>\n </Modal>\n <InlineFieldRow>\n <InlineField label=\"Query type\" grow={true}>\n <HorizontalGroup spacing={'sm'} align={'center'} justify={'space-between'}>\n <RadioButtonGroup<TempoQueryType>\n options={queryTypeOptions}\n value={query.queryType}\n onChange={(v) => {\n reportInteraction('grafana_traces_query_type_changed', {\n datasourceType: 'tempo',\n app: app ?? '',\n grafana_version: config.buildInfo.version,\n newQueryType: v,\n previousQueryType: query.queryType ?? '',\n });\n\n this.onClearResults();\n onChange({\n ...query,\n queryType: v,\n });\n }}\n size=\"md\"\n />\n <Button\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n this.setState({ uploadModalOpen: true });\n }}\n >\n Import trace\n </Button>\n </HorizontalGroup>\n </InlineField>\n </InlineFieldRow>\n {query.queryType === 'search' && (\n <LokiSearch\n logsDatasourceUid={logsDatasourceUid}\n query={query}\n onRunQuery={this.onRunLinkedQuery}\n onChange={this.onChangeLinkedQuery}\n />\n )}\n {query.queryType === 'nativeSearch' && (\n <NativeSearch\n datasource={this.props.datasource}\n query={query}\n onChange={onChange}\n onBlur={this.props.onBlur}\n onRunQuery={this.props.onRunQuery}\n />\n )}\n {query.queryType === 'traceqlSearch' && (\n <TraceQLSearch\n datasource={this.props.datasource}\n query={query}\n onChange={onChange}\n onBlur={this.props.onBlur}\n app={app}\n onClearResults={this.onClearResults}\n />\n )}\n {query.queryType === 'serviceMap' && (\n <ServiceGraphSection graphDatasourceUid={graphDatasourceUid} query={query} onChange={onChange} />\n )}\n {query.queryType === 'traceql' && (\n <QueryEditor\n datasource={this.props.datasource}\n query={query}\n onRunQuery={this.props.onRunQuery}\n onChange={onChange}\n app={app}\n onClearResults={this.onClearResults}\n />\n )}\n </>\n );\n }\n}\n\nexport const TempoQueryField = withTheme2(TempoQueryFieldComponent);\n","import React, { useEffect, useMemo, useState } from 'react';\n\nimport { Cascader, CascaderOption } from '@grafana/ui';\n\nimport { PyroscopeDataSource } from './datasource';\nimport { ProfileTypeMessage } from './types';\n\ntype Props = {\n initialProfileTypeId?: string;\n profileTypes?: ProfileTypeMessage[];\n onChange: (value: string) => void;\n placeholder?: string;\n width?: number;\n};\n\nexport function ProfileTypesCascader(props: Props) {\n const cascaderOptions = useCascaderOptions(props.profileTypes);\n\n return (\n <Cascader\n placeholder={props.placeholder}\n separator={'-'}\n displayAllSelectedLevels={true}\n initialValue={props.initialProfileTypeId}\n allowCustomValue={true}\n onSelect={props.onChange}\n options={cascaderOptions}\n changeOnSelect={false}\n width={props.width ?? 26}\n />\n );\n}\n\n// Turn profileTypes into cascader options\nfunction useCascaderOptions(profileTypes?: ProfileTypeMessage[]): CascaderOption[] {\n return useMemo(() => {\n if (!profileTypes) {\n return [];\n }\n let mainTypes = new Map<string, CascaderOption>();\n // Classify profile types by name then sample type.\n // The profileTypes are something like cpu:sample:nanoseconds:sample:count or app.something.something\n for (let profileType of profileTypes) {\n let parts: string[] = [];\n if (profileType.id.indexOf(':') > -1) {\n parts = profileType.id.split(':');\n }\n\n const [name, type] = parts;\n\n if (!mainTypes.has(name)) {\n mainTypes.set(name, {\n label: name,\n value: name,\n items: [],\n });\n }\n mainTypes.get(name)?.items!.push({\n label: type,\n value: profileType.id,\n });\n }\n return Array.from(mainTypes.values());\n }, [profileTypes]);\n}\n\n/**\n * Loads the profile types.\n *\n * This is exported and not used directly in the ProfileTypesCascader component because in some case we need to know\n * the profileTypes before rendering the cascader.\n * @param datasource\n */\nexport function useProfileTypes(datasource: PyroscopeDataSource) {\n const [profileTypes, setProfileTypes] = useState<ProfileTypeMessage[]>();\n\n useEffect(() => {\n (async () => {\n const profileTypes = await datasource.getProfileTypes();\n setProfileTypes(profileTypes);\n })();\n }, [datasource]);\n\n return profileTypes;\n}\n","import { css } from '@emotion/css';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useAsync } from 'react-use';\n\nimport {\n DataSourceJsonData,\n DataSourceInstanceSettings,\n DataSourcePluginOptionsEditorProps,\n updateDatasourcePluginJsonDataOption,\n} from '@grafana/data';\nimport { ConfigDescriptionLink, ConfigSection } from '@grafana/experimental';\nimport { DataSourcePicker, DataSourceWithBackend, getDataSourceSrv } from '@grafana/runtime';\nimport { InlineField, InlineFieldRow, Input, InlineSwitch } from '@grafana/ui';\n\nimport { TagMappingInput } from '../TraceToLogs/TagMappingInput';\nimport { ProfileTypesCascader } from '../pyroscope/ProfileTypesCascader';\nimport { ProfileTypeMessage } from '../pyroscope/types';\n\nexport interface TraceToProfilesOptions {\n datasourceUid?: string;\n tags?: Array<{ key: string; value?: string }>;\n query?: string;\n profileTypeId?: string;\n customQuery: boolean;\n}\n\nexport interface TraceToProfilesData extends DataSourceJsonData {\n tracesToProfiles?: TraceToProfilesOptions;\n}\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TraceToProfilesData> {}\n\nexport function TraceToProfilesSettings({ options, onOptionsChange }: Props) {\n const supportedDataSourceTypes = useMemo(() => ['grafana-pyroscope-datasource'], []);\n\n const [profileTypes, setProfileTypes] = useState<ProfileTypeMessage[]>([]);\n const profileTypesPlaceholder = useMemo(() => {\n let placeholder = profileTypes.length === 0 ? 'No profile types found' : 'Select profile type';\n if (!options.jsonData.tracesToProfiles?.datasourceUid) {\n placeholder = 'Please select profiling data source';\n }\n return placeholder;\n }, [options.jsonData.tracesToProfiles?.datasourceUid, profileTypes]);\n\n const { value: dataSource } = useAsync(async () => {\n return await getDataSourceSrv().get(options.jsonData.tracesToProfiles?.datasourceUid);\n }, [options.jsonData.tracesToProfiles?.datasourceUid]);\n\n const { value: pTypes } = useAsync(async () => {\n if (\n dataSource instanceof DataSourceWithBackend &&\n supportedDataSourceTypes.includes(dataSource.type) &&\n dataSource.uid === options.jsonData.tracesToProfiles?.datasourceUid\n ) {\n return await dataSource?.getResource('profileTypes');\n }\n }, [dataSource]);\n\n useEffect(() => {\n setProfileTypes(pTypes ?? []);\n }, [pTypes]);\n\n return (\n <div className={css({ width: '100%' })}>\n <InlineFieldRow>\n <InlineField\n tooltip=\"The profiles data source the trace is going to navigate to\"\n label=\"Data source\"\n labelWidth={26}\n >\n <DataSourcePicker\n inputId=\"trace-to-profiles-data-source-picker\"\n filter={(ds) => supportedDataSourceTypes.includes(ds.type)}\n current={options.jsonData.tracesToProfiles?.datasourceUid}\n noDefault={true}\n width={40}\n onChange={(ds: DataSourceInstanceSettings) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {\n ...options.jsonData.tracesToProfiles,\n datasourceUid: ds.uid,\n });\n }}\n />\n </InlineField>\n </InlineFieldRow>\n\n <InlineFieldRow>\n <InlineField\n tooltip=\"Tags that will be used in the query. Default tags: 'service.name', 'service.namespace'\"\n label=\"Tags\"\n labelWidth={26}\n >\n <TagMappingInput\n values={options.jsonData.tracesToProfiles?.tags ?? []}\n onChange={(v) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {\n ...options.jsonData.tracesToProfiles,\n tags: v,\n });\n }}\n />\n </InlineField>\n </InlineFieldRow>\n\n <InlineFieldRow>\n <InlineField tooltip=\"Profile type that will be used in the query\" label=\"Profile type\" labelWidth={26}>\n <ProfileTypesCascader\n profileTypes={profileTypes}\n placeholder={profileTypesPlaceholder}\n initialProfileTypeId={options.jsonData.tracesToProfiles?.profileTypeId}\n onChange={(val) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {\n ...options.jsonData.tracesToProfiles,\n profileTypeId: val,\n });\n }}\n width={40}\n />\n </InlineField>\n </InlineFieldRow>\n\n <InlineFieldRow>\n <InlineField\n tooltip=\"Use a custom query with the possibility to interpolate variables from the trace or span\"\n label=\"Use custom query\"\n labelWidth={26}\n >\n <InlineSwitch\n id={'profilesCustomQuerySwitch'}\n value={options.jsonData.tracesToProfiles?.customQuery}\n onChange={(event: React.SyntheticEvent<HTMLInputElement>) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {\n ...options.jsonData.tracesToProfiles,\n customQuery: event.currentTarget.checked,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n\n {options.jsonData.tracesToProfiles?.customQuery && (\n <InlineField\n label=\"Query\"\n labelWidth={26}\n tooltip=\"The query that will run when navigating from a trace to profiles data source. Interpolate tags using the `$__tags` keyword\"\n grow\n >\n <Input\n label=\"Query\"\n type=\"text\"\n allowFullScreen\n value={options.jsonData.tracesToProfiles?.query || ''}\n onChange={(e) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToProfiles', {\n ...options.jsonData.tracesToProfiles,\n query: e.currentTarget.value,\n })\n }\n />\n </InlineField>\n )}\n </div>\n );\n}\n\nexport const TraceToProfilesSection = ({ options, onOptionsChange }: DataSourcePluginOptionsEditorProps) => {\n return (\n <ConfigSection\n title=\"Trace to profiles\"\n description={\n <ConfigDescriptionLink\n description=\"Navigate from a trace span to the selected data source's profiles.\"\n suffix={`${options.type}/configure-tempo-data-source/#trace-to-profiles`}\n feature=\"trace to profiles\"\n />\n }\n isCollapsible={true}\n isInitiallyOpen={true}\n >\n <TraceToProfilesSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSection>\n );\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { DataSourcePluginOptionsEditorProps, GrafanaTheme2, updateDatasourcePluginJsonDataOption } from '@grafana/data';\nimport { IntervalInput, invalidTimeShiftError } from '@grafana/o11y-ds-frontend';\nimport { InlineField, InlineSwitch, useStyles2 } from '@grafana/ui';\n\nimport { TempoJsonData } from '../types';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}\n\nexport function QuerySettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n\n const getLabel = (type: 'start' | 'end') => {\n return `Time shift for ${type} of search`;\n };\n\n const getTooltip = (type: 'start' | 'end') => {\n return `Shifts the ${type} of the time range when searching by TraceID. Searching can return traces that do not fully fall into the search time range, so we recommend using higher time shifts for longer traces. Default: 30m (Time units can be used here, for example: 5s, 1m, 3h`;\n };\n\n return (\n <div className={styles.container}>\n <InlineField\n label=\"Use time range in query\"\n tooltip=\"The time range can be used when there are performance issues or timeouts since it will narrow down the search to the defined range. Default: disabled\"\n labelWidth={26}\n >\n <InlineSwitch\n id=\"enable-time-shift\"\n value={options.jsonData.traceQuery?.timeShiftEnabled || false}\n onChange={(event) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'traceQuery', {\n ...options.jsonData.traceQuery,\n timeShiftEnabled: event.currentTarget.checked,\n });\n }}\n />\n </InlineField>\n\n <IntervalInput\n label={getLabel('start')}\n tooltip={getTooltip('start')}\n value={options.jsonData.traceQuery?.spanStartTimeShift || ''}\n disabled={!options.jsonData.traceQuery?.timeShiftEnabled}\n onChange={(val) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'traceQuery', {\n ...options.jsonData.traceQuery,\n spanStartTimeShift: val,\n });\n }}\n isInvalidError={invalidTimeShiftError}\n />\n\n <IntervalInput\n label={getLabel('end')}\n tooltip={getTooltip('end')}\n value={options.jsonData.traceQuery?.spanEndTimeShift || ''}\n disabled={!options.jsonData.traceQuery?.timeShiftEnabled}\n onChange={(val) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'traceQuery', {\n ...options.jsonData.traceQuery,\n spanEndTimeShift: val,\n });\n }}\n isInvalidError={invalidTimeShiftError}\n />\n </div>\n );\n}\n\nexport const getStyles = (theme: GrafanaTheme2) => ({\n infoText: css({\n paddingBottom: theme.spacing(2),\n color: theme.colors.text.secondary,\n }),\n container: css({\n width: '100%',\n }),\n row: css({\n alignItems: 'baseline',\n }),\n});\n","import React from 'react';\n\nimport {\n DataSourceInstanceSettings,\n DataSourcePluginOptionsEditorProps,\n updateDatasourcePluginJsonDataOption,\n} from '@grafana/data';\nimport { DataSourcePicker } from '@grafana/runtime';\nimport { Button, InlineField, InlineFieldRow, useStyles2 } from '@grafana/ui';\n\nimport { TempoJsonData } from '../types';\n\nimport { getStyles } from './QuerySettings';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}\n\nexport function LokiSearchSettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n\n // Default to the trace to logs datasource if configured and loki search was enabled\n // but only if jsonData.lokiSearch hasn't been set\n const legacyDatasource =\n options.jsonData.tracesToLogs?.lokiSearch !== false ? options.jsonData.tracesToLogs?.datasourceUid : undefined;\n if (legacyDatasource && options.jsonData.lokiSearch === undefined) {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'lokiSearch', {\n datasourceUid: legacyDatasource,\n });\n }\n\n return (\n <div className={styles.container}>\n <InlineFieldRow className={styles.row}>\n <InlineField tooltip=\"The Loki data source with the service graph data\" label=\"Data source\" labelWidth={26}>\n <DataSourcePicker\n inputId=\"loki-search-data-source-picker\"\n pluginId=\"loki\"\n current={options.jsonData.lokiSearch?.datasourceUid}\n noDefault={true}\n width={40}\n onChange={(ds: DataSourceInstanceSettings) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'lokiSearch', {\n datasourceUid: ds.uid,\n })\n }\n />\n </InlineField>\n {options.jsonData.lokiSearch?.datasourceUid ? (\n <Button\n type={'button'}\n variant={'secondary'}\n size={'sm'}\n fill={'text'}\n onClick={() => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'lokiSearch', {\n datasourceUid: undefined,\n });\n }}\n >\n Clear\n </Button>\n ) : null}\n </InlineFieldRow>\n </div>\n );\n}\n","import React from 'react';\n\nimport {\n DataSourceInstanceSettings,\n DataSourcePluginOptionsEditorProps,\n updateDatasourcePluginJsonDataOption,\n} from '@grafana/data';\nimport { DataSourcePicker } from '@grafana/runtime';\nimport { Button, InlineField, InlineFieldRow, useStyles2 } from '@grafana/ui';\n\nimport { TempoJsonData } from '../types';\n\nimport { getStyles } from './QuerySettings';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}\n\nexport function ServiceGraphSettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles.container}>\n <InlineFieldRow className={styles.row}>\n <InlineField\n tooltip=\"The Prometheus data source with the service graph data\"\n label=\"Data source\"\n labelWidth={26}\n >\n <DataSourcePicker\n inputId=\"service-graph-data-source-picker\"\n pluginId=\"prometheus\"\n current={options.jsonData.serviceMap?.datasourceUid}\n noDefault={true}\n width={40}\n onChange={(ds: DataSourceInstanceSettings) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'serviceMap', {\n datasourceUid: ds.uid,\n })\n }\n />\n </InlineField>\n {options.jsonData.serviceMap?.datasourceUid ? (\n <Button\n type={'button'}\n variant={'secondary'}\n size={'sm'}\n fill={'text'}\n onClick={() => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'serviceMap', {\n datasourceUid: undefined,\n });\n }}\n >\n Clear\n </Button>\n ) : null}\n </InlineFieldRow>\n </div>\n );\n}\n","import React, { useCallback, useEffect } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { DataSourcePluginOptionsEditorProps, updateDatasourcePluginJsonDataOption } from '@grafana/data';\nimport { Alert } from '@grafana/ui';\n\nimport TagsInput from '../SearchTraceQLEditor/TagsInput';\nimport { replaceAt } from '../SearchTraceQLEditor/utils';\nimport { TraceqlFilter, TraceqlSearchScope } from '../dataquery.gen';\nimport { TempoDatasource } from '../datasource';\nimport { TempoJsonData } from '../types';\nimport { getErrorMessage } from '../utils';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {\n datasource?: TempoDatasource;\n}\n\nexport function TraceQLSearchTags({ options, onOptionsChange, datasource }: Props) {\n const fetchTags = async () => {\n if (!datasource) {\n throw new Error('Unable to retrieve datasource');\n }\n\n try {\n await datasource.languageProvider.start();\n } catch (err) {\n // @ts-ignore\n throw new Error(getErrorMessage(err.data.message, 'Unable to query Tempo'));\n }\n };\n\n const { error, loading } = useAsync(fetchTags, [datasource, options]);\n\n const updateFilter = useCallback(\n (s: TraceqlFilter) => {\n let copy = options.jsonData.search?.filters;\n copy ||= [];\n const indexOfFilter = copy.findIndex((f) => f.id === s.id);\n if (indexOfFilter >= 0) {\n // update in place if the filter already exists, for consistency and to avoid UI bugs\n copy = replaceAt(copy, indexOfFilter, s);\n } else {\n copy.push(s);\n }\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'search', {\n ...options.jsonData.search,\n filters: copy,\n });\n },\n [onOptionsChange, options]\n );\n\n const deleteFilter = (s: TraceqlFilter) => {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'search', {\n ...options.jsonData.search,\n filters: options.jsonData.search?.filters?.filter((f) => f.id !== s.id),\n });\n };\n\n useEffect(() => {\n if (!options.jsonData.search?.filters) {\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'search', {\n ...options.jsonData.search,\n filters: [\n {\n id: 'service-name',\n tag: 'service.name',\n operator: '=',\n scope: TraceqlSearchScope.Resource,\n },\n { id: 'span-name', tag: 'name', operator: '=', scope: TraceqlSearchScope.Span },\n ],\n });\n }\n }, [onOptionsChange, options]);\n\n // filter out tags that already exist in TraceQLSearch editor\n const staticTags = ['duration'];\n\n const missingTag = options.jsonData.search?.filters?.find((f) => !f.tag);\n\n return (\n <>\n {datasource ? (\n <TagsInput\n updateFilter={updateFilter}\n deleteFilter={deleteFilter}\n filters={options.jsonData.search?.filters || []}\n datasource={datasource}\n setError={() => {}}\n staticTags={staticTags}\n isTagsLoading={loading}\n hideValues={true}\n query={'{}'}\n />\n ) : (\n <div>Invalid data source, please create a valid data source and try again</div>\n )}\n {error && (\n <Alert title={'Unable to fetch TraceQL tags'} severity={'error'} topSpacing={1}>\n {error.message}\n </Alert>\n )}\n {missingTag && (\n <Alert title={'Please ensure each filter has a selected tag'} severity={'warning'} topSpacing={1}></Alert>\n )}\n </>\n );\n}\n","import React from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { DataSourcePluginOptionsEditorProps, updateDatasourcePluginJsonDataOption } from '@grafana/data';\nimport { getDataSourceSrv } from '@grafana/runtime';\nimport { InlineField, InlineFieldRow, InlineSwitch, useStyles2 } from '@grafana/ui';\n\nimport { TempoDatasource } from '../datasource';\nimport { TempoJsonData } from '../types';\n\nimport { getStyles } from './QuerySettings';\nimport { TraceQLSearchTags } from './TraceQLSearchTags';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}\n\nexport function TraceQLSearchSettings({ options, onOptionsChange }: Props) {\n const styles = useStyles2(getStyles);\n const dataSourceSrv = getDataSourceSrv();\n const fetchDatasource = async () => {\n return (await dataSourceSrv.get({ type: options.type, uid: options.uid })) as TempoDatasource;\n };\n\n const { value: datasource } = useAsync(fetchDatasource, [dataSourceSrv, options]);\n\n return (\n <div className={styles.container}>\n <InlineFieldRow className={styles.row}>\n <InlineField tooltip=\"Removes the search tab from the query editor\" label=\"Hide search\" labelWidth={26}>\n <InlineSwitch\n id=\"hideSearch\"\n value={options.jsonData.search?.hide}\n onChange={(event: React.SyntheticEvent<HTMLInputElement>) =>\n updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'search', {\n ...options.jsonData.search,\n hide: event.currentTarget.checked,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow className={styles.row}>\n <InlineField tooltip=\"Configures which fields are available in the UI\" label=\"Static filters\" labelWidth={26}>\n <TraceQLSearchTags datasource={datasource} options={options} onOptionsChange={onOptionsChange} />\n </InlineField>\n </InlineFieldRow>\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { DataSourcePluginOptionsEditorProps, GrafanaTheme2 } from '@grafana/data';\nimport {\n AdvancedHttpSettings,\n Auth,\n ConfigSection,\n ConfigDescriptionLink,\n ConfigSubSection,\n ConnectionSettings,\n convertLegacyAuthProps,\n DataSourceDescription,\n} from '@grafana/experimental';\nimport {\n NodeGraphSection,\n SpanBarSection,\n TraceToLogsSection,\n TraceToMetricsSection,\n TraceToProfilesSection,\n} from '@grafana/o11y-ds-frontend';\nimport { config } from '@grafana/runtime';\nimport { SecureSocksProxySettings, useStyles2, Divider, Stack } from '@grafana/ui';\n\nimport { LokiSearchSettings } from './LokiSearchSettings';\nimport { QuerySettings } from './QuerySettings';\nimport { ServiceGraphSettings } from './ServiceGraphSettings';\nimport { TraceQLSearchSettings } from './TraceQLSearchSettings';\n\nexport type Props = DataSourcePluginOptionsEditorProps;\n\nexport const ConfigEditor = ({ options, onOptionsChange }: Props) => {\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles.container}>\n <DataSourceDescription\n dataSourceName=\"Tempo\"\n docsLink=\"https://grafana.com/docs/grafana/latest/datasources/tempo\"\n hasRequiredFields={false}\n />\n\n <Divider spacing={4} />\n <ConnectionSettings config={options} onChange={onOptionsChange} urlPlaceholder=\"http://localhost:3200\" />\n\n <Divider spacing={4} />\n <Auth\n {...convertLegacyAuthProps({\n config: options,\n onChange: onOptionsChange,\n })}\n />\n\n <Divider spacing={4} />\n <TraceToLogsSection options={options} onOptionsChange={onOptionsChange} />\n\n <Divider spacing={4} />\n {config.featureToggles.traceToMetrics ? (\n <>\n <TraceToMetricsSection options={options} onOptionsChange={onOptionsChange} />\n <Divider spacing={4} />\n </>\n ) : null}\n\n <TraceToProfilesSection options={options} onOptionsChange={onOptionsChange} />\n <Divider spacing={4} />\n\n <ConfigSection\n title=\"Additional settings\"\n description=\"Additional settings are optional settings that can be configured for more control over your data source.\"\n isCollapsible={true}\n isInitiallyOpen={false}\n >\n <Stack gap={5} direction=\"column\">\n <AdvancedHttpSettings config={options} onChange={onOptionsChange} />\n\n {config.secureSocksDSProxyEnabled && (\n <>\n <SecureSocksProxySettings options={options} onOptionsChange={onOptionsChange} />\n </>\n )}\n\n <ConfigSubSection\n title=\"Service graph\"\n description={\n <ConfigDescriptionLink\n description=\"Select a Prometheus data source that contains the service graph data.\"\n suffix=\"tempo/configure-tempo-data-source/#service-graph\"\n feature=\"the service graph\"\n />\n }\n >\n <ServiceGraphSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSubSection>\n\n <NodeGraphSection options={options} onOptionsChange={onOptionsChange} />\n\n <ConfigSubSection\n title=\"Tempo search\"\n description={\n <ConfigDescriptionLink\n description=\"Modify how traces are searched.\"\n suffix=\"tempo/configure-tempo-data-source/#tempo-search\"\n feature=\"Tempo search\"\n />\n }\n >\n <TraceQLSearchSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSubSection>\n\n <ConfigSubSection\n title=\"Loki search\"\n description={\n <ConfigDescriptionLink\n description=\"Select a Loki data source to search for traces. Derived fields must be configured in the Loki data source.\"\n suffix=\"tempo/configure-tempo-data-source/#loki-search\"\n feature=\"Loki search\"\n />\n }\n >\n <LokiSearchSettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSubSection>\n\n <ConfigSubSection\n title=\"TraceID query\"\n description={\n <ConfigDescriptionLink\n description=\"Modify how TraceID queries are run.\"\n suffix=\"tempo/configure-tempo-data-source/#traceid-query\"\n feature=\"the TraceID query\"\n />\n }\n >\n <QuerySettings options={options} onOptionsChange={onOptionsChange} />\n </ConfigSubSection>\n\n <SpanBarSection options={options} onOptionsChange={onOptionsChange} />\n </Stack>\n </ConfigSection>\n </div>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n container: css({\n label: 'container',\n marginBottom: theme.spacing(2),\n maxWidth: '900px',\n }),\n});\n","import { DashboardLoadedEvent } from '@grafana/data';\nimport { getTemplateSrv, reportInteraction } from '@grafana/runtime';\n\nimport pluginJson from './plugin.json';\nimport { TempoQuery } from './types';\n\ntype TempoOnDashboardLoadedTrackingEvent = {\n grafana_version?: string;\n dashboard_id?: string;\n org_id?: number;\n native_search_query_count: number;\n search_query_count: number;\n service_map_query_count: number;\n traceql_query_count: number;\n upload_query_count: number;\n native_search_queries_with_template_variables_count: number;\n search_queries_with_template_variables_count: number;\n service_map_queries_with_template_variables_count: number;\n traceql_queries_with_template_variables_count: number;\n};\n\nexport const onDashboardLoadedHandler = ({\n payload: { dashboardId, orgId, grafanaVersion, queries },\n}: DashboardLoadedEvent<TempoQuery>) => {\n try {\n const tempoQueries = queries[pluginJson.id];\n\n if (!tempoQueries?.length) {\n return;\n }\n\n let stats: TempoOnDashboardLoadedTrackingEvent = {\n grafana_version: grafanaVersion,\n dashboard_id: dashboardId,\n org_id: orgId,\n native_search_query_count: 0,\n search_query_count: 0,\n service_map_query_count: 0,\n traceql_query_count: 0,\n upload_query_count: 0,\n native_search_queries_with_template_variables_count: 0,\n search_queries_with_template_variables_count: 0,\n service_map_queries_with_template_variables_count: 0,\n traceql_queries_with_template_variables_count: 0,\n };\n\n for (const query of tempoQueries) {\n if (query.hide) {\n continue;\n }\n\n if (query.queryType === 'nativeSearch') {\n stats.native_search_query_count++;\n if (\n (query.serviceName && hasTemplateVariables(query.serviceName)) ||\n (query.spanName && hasTemplateVariables(query.spanName)) ||\n (query.search && hasTemplateVariables(query.search)) ||\n (query.minDuration && hasTemplateVariables(query.minDuration)) ||\n (query.maxDuration && hasTemplateVariables(query.maxDuration))\n ) {\n stats.native_search_queries_with_template_variables_count++;\n }\n } else if (query.queryType === 'search') {\n stats.search_query_count++;\n if (query.linkedQuery && query.linkedQuery.expr && hasTemplateVariables(query.linkedQuery.expr)) {\n stats.search_queries_with_template_variables_count++;\n }\n } else if (query.queryType === 'serviceMap') {\n stats.service_map_query_count++;\n if (query.serviceMapQuery && hasTemplateVariables(query.serviceMapQuery)) {\n stats.service_map_queries_with_template_variables_count++;\n }\n } else if (query.queryType === 'traceql') {\n stats.traceql_query_count++;\n if (hasTemplateVariables(query.query)) {\n stats.traceql_queries_with_template_variables_count++;\n }\n } else if (query.queryType === 'upload') {\n stats.upload_query_count++;\n }\n }\n\n reportInteraction('grafana_tempo_dashboard_loaded', stats);\n } catch (error) {\n console.error('error in tempo tracking handler', error);\n }\n};\n\nconst hasTemplateVariables = (val?: string | string[]): boolean => {\n return (Array.isArray(val) ? val : [val]).some((v) => getTemplateSrv().containsTemplate(v));\n};\n","import { DataSourcePlugin, DashboardLoadedEvent } from '@grafana/data';\nimport { getAppEvents } from '@grafana/runtime';\n\nimport CheatSheet from './CheatSheet';\nimport { TempoQueryField } from './QueryField';\nimport { ConfigEditor } from './configuration/ConfigEditor';\nimport { TempoDatasource } from './datasource';\nimport { onDashboardLoadedHandler } from './tracking';\nimport { TempoQuery } from './types';\n\nexport const plugin = new DataSourcePlugin(TempoDatasource)\n .setQueryEditor(TempoQueryField)\n .setConfigEditor(ConfigEditor)\n .setQueryEditorHelp(CheatSheet);\n\n// Subscribe to on dashboard loaded event so that we can track plugin adoption\ngetAppEvents().subscribe<DashboardLoadedEvent<TempoQuery>>(DashboardLoadedEvent, onDashboardLoadedHandler);\n"],"names":["__defProp","__defProps","__getOwnPropDescs","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","__spreadProps","AdvancedHttpSettings","config","onChange","className","onCookiesChange","cookies","onTimeoutChange","event","styles","NodeGraphSettings","options","onOptionsChange","getStyles","NodeGraphSection","suffix","theme","TraceToMetricsSettings","ds","val","v","query","i","e","newQueries","traceToMetricQuery","index","updatedQueries","_","TraceToMetricsSection","CheatSheet","TextLink","roundMsToMin","milliseconds","roundSecToMin","seconds","shouldRefreshLabels","range","prevRange","sameMinuteFrom","sameMinuteTo","RE2_METACHARACTERS","escapeLokiRegexp","escapeLabelValueInExactSelector","labelValue","unescapeLabelValue","escapeLabelValueInRegexSelector","escapeLabelValueInSelector","selector","isRegexSelector","isBytesString","string","BYTES_KEYWORDS","regex","Field","MonacoQueryFieldLazy","props","MonacoQueryFieldWrapper","lastRunValueRef","onRunQuery","rest","handleRunQuery","handleBlur","LokiQueryField","override","nextQuery","prevProps","languageProvider","ExtraFieldElement","datasource","history","placeholder","getErrorMessage","message","prefix","err","getDS","uid","dsSrv","error","LokiSearch","logsDatasourceUid","dsState","useAsync","InlineLabel","AppNotificationSeverity","AppNotificationTimeout","timeoutMap","MAX_STORED_NOTIFICATIONS","STORAGE_KEY","NEW_NOTIFS_KEY","initialState","deserializeNotifications","appNotificationsSlice","state","newAlert","alert","isSimilar","serializeNotifications","alertId","timestamp","notifyApp","hideAppNotification","clearNotification","clearAllNotifications","readAllNotifications","appNotificationsReducer","selectLastReadTimestamp","selectById","selectAll","byId","selectWarningsAndErrors","all","isAtLeastWarning","selectVisible","n","notif","isStoredNotification","storedNotifsRaw","parsed","notifs","reducedNotifs","prev","cur","getMessageFromError","defaultSuccessNotification","defaultErrorNotification","createSuccessNotification","title","text","traceId","createErrorNotification","component","store","initialKeyedVariablesState","setStore","newStore","getState","dispatch","action","languageConfiguration","operators","keywordOperators","stringOperators","numberOperators","intrinsics","scopes","functions","keywords","language","languageDefinition","traceqlGrammar","generateQueryFromFilters","filters","f","scopeHelper","tagHelper","valueHelper","durationType","filterScopedTag","filterTitle","getFilteredTags","tags","staticTags","t","getUnscopedTags","scope","getAllTags","getTagsByScope","s","replaceAt","array","ret","operatorSelectableValue","op","result","TempoVariableQueryType","variableOptions","refId","TempoVariableQueryEditor","label","setLabel","type","setType","labelOptions","setLabelOptions","labelNames","onQueryTypeChange","newType","onLabelChange","newLabel","newLabelValue","InlineFieldRow","InlineField","Select","TempoLanguageProvider","initialValues","url","params","tag","v1Resp","v2Resp","encodedTag","response","createTableFrameFromMetricsSummaryQuery","data","targetQuery","instanceSettings","frame","emptyResponse","dynamicMetrics","res","configQuery","getConfigQuery","series","getConfig","getPercentileRow","metricsData","transformToMetricsData","trace","field","errorPercentage","getNumberForMetric","getMetricValue","queryParts","x","isNumber","isIntrinsic","surround","closingBracketIndex","queryAfterClosingBracket","commonConfig","NO_VALUE","getSpanStatusCode","getSpanKind","statusCode","kind","name","metric","number","MutableDataFrame","getLiveStreamKey","doTempoChannelStream","frames","requestTime","DEFAULT_SPSS","takeWhile","evt","frameState","map","elapsedTime","traces","metrics","metricsDataFrame","progressThresholds","TempoVariableSupport","request","from","DEFAULT_LIMIT","FeatureName","featuresToTempoVersion","defaultTempoVersion","TempoDatasource","DataSourceWithBackend","templateSrv","lastValueFrom","catchError","of","target","groupBy","summary","gb","targets","queryValue","legacyLogsDatasourceUid","labelName","tagV2","scopeAndTag","option","featureName","actualVersion","subQueries","filteredTargets","mergeMap","linkedDatasource","linkedRequest","traceLinkMatcher","throwError","timeRange","searchQuery","appliedQuery","traceqlSearchTargets","queryValueFromFilters","jsonData","isTraceData","isServiceGraphData","df","dsId","tempoDsUid","serviceMapQuery","concatMap","rateQuery","errorAndDurationQuery","merge","metricsFnRegex","hexOnlyRegex","scopedVars","queries","expandedQuery","filter","updatedFilter","validTargets","traceRequest","apiUrl","req","tempoQuery","queryPrometheus","datasourceUid","tempoDatasourceUid","serviceMapRequest","makePromServiceMapRequest","toArray","responses","errorRes","nodes","edges","nodeLength","edgeLength","serviceMapIncludeNamespace","getFieldConfig","serviceMapResponse","makeServiceGraphViewRequest","buildExpr","rateResponse","serviceGraphViewMetrics","errorRateBySpanName","durationsBySpanName","labels","spanNameField","spanNameLabels","spanNames","getEscapedSpanNames","errorAndDurationResponse","serviceGraphView","getServiceGraphView","makePromLink","expr","instant","values","targetField","tempoField","sourceField","namespaceFields","source","serverSumBy","targetNamespace","sourceNamespace","makeTempoLink","serviceName","spanName","extraSumByFields","subExprs","secondResponse","rate","errorRate","duration","buildLinkExpr","errorRateNames","errorRateValues","errorRateObj","getRateAlignedValues","durationObj","d","delimiter","extraParams","serviceMapQueryMatch","item","rateResp","objToAlign","rateNames","CompletionProvider","model","position","offset","getRangeAndOffset","situation","items","maxIndexDigits","getMonacoCompletionItemKind","tagName","tagValues","getInsertionText","textUntilCaret","matches","lastMatched","equals","monaco","word","positionClone","TagsField","onBlur","setupAutocompleteFn","useAutocomplete","CodeEditor","langId","ensureTraceQL","editor","setupPlaceholder","setupAutoSize","placeholderDecorators","decorators","checkDecorators","newDecorators","container","updateHeight","contentHeight","width","providerRef","autocompleteDisposeFun","dispose","setupDone","aliases","extensions","mimetypes","def","durationPlaceholder","serviceOptions","setServiceOptions","spanOptions","setSpanOptions","setError","inputErrors","setInputErrors","isLoading","setIsLoading","loadOptions","lpName","prevValue","fuzzy","services","spans","onKeyDown","keyEvent","handleOnChange","Alert","Input","templatedMinDuration","templatedMaxDuration","limit","RawQuery","lang","highlighted","QueryOptionGroup","children","collapsedInfo","queryStats","isOpen","toggleOpen","useToggle","Collapse","Stack","Tooltip","Icon","generateQueryStats","convertUnits","parseIntWithFallback","fallback","TempoQueryBuilderOptions","onLimitChange","onSpssChange","onTableTypeChange","collapsedInfoList","EditorRow","EditorField","AutoSizeInput","RadioButtonGroup","validationRegex","updateFilter","invalid","tooltip","GroupByField","isTagsLoading","generateId","getTags","addFilter","removeFilter","copy","indexOfFilter","scopeOptions","InlineSearchField","AccessoryButton","hideScope","hideTag","hideValue","isMulti","allowCustomValue","scopedTag","prevOperator","setPrevOperator","setPrevValue","updateOptions","isLoadingValues","o","optionsOfFirstType","uniqueOptionType","operatorList","withTemplateVariableOptions","templateVariables","deleteFilter","hideValues","requireTagAndValue","handleOnAdd","validInput","hardCodedFilterIds","onClearResults","app","setIsTagsLoading","traceQlQuery","setTraceQlQuery","findFilter","id","dynamicFilters","sf","Button","MIN_WIDTH","AdHocFilterKey","disabled","filterKey","allFilters","loadKeys","fetchFilterKeys","loadKeysWithRemove","fetchFilterKeysWithRemove","SegmentAsync","plusSegment","REMOVE_FILTER_KEY","REMOVE_VALUE","currentKey","otherFilters","m","keys","AdHocFilterValue","filterValue","placeHolder","loadValues","fetchFilterValues","OperatorSegment","Segment","AdHocFilterRenderer","operator","onKeyChange","onOperatorChange","onValueChange","tFunc","defaultMessage","AdHocFilterBuilder","appendBefore","onCompleted","setKey","setOperator","onKeyChanged","onOperatorChanged","onValueChanged","ConditionSegment","AdHocFilter","segments","ServiceGraphSection","graphDatasourceUid","hasKeys","setHasKeys","fn","getWarning","queryToFilter","filtersToQuery","newFilters","description","match","re","defaultQuery","SpanKind","AlertTimeout","getStyle","TemporaryAlert","style","visible","setVisible","timer","setTimer","parser","LineComment","BlockComment","TraceQL","SpansetPipelineExpression","And","Gt","Desc","Lt","Anc","Or","Pipe","ExperimentalOp","WrappedSpansetPipeline","SpansetPipeline","SpansetExpression","SpansetFilter","FieldExpression","FieldOp","Static","Integer","Float","Duration","TemplateVariable","IntrinsicField","Parent","AttributeField","Identifier","Resource","Span","ScalarFilter","ScalarExpression","ScalarOp","Aggregate","AggregateExpression","ComparisonOp","GroupOperation","SelectOperation","SelectArgs","CoalesceOperation","MetricsOperation","MetricsOperationType","MetricsArgs","MetricsQuery","MetricsQueryExpression","getErrorNode","tree","cursorPos","node","move","direction","walk","path","current","expectedNodeIDs","getNodeText","isPathMatch","resolverPath","cursorPath","getSituation","shiftedOffset","maybeErrorNode","currentNode","ids","situationType","resolver","RESOLVERS","ERROR_NODE_ID","resolveAttribute","resolveExpression","resolveSpansetWithNoClosedBrace","resolveAttributeForFunction","resolveSpansetPipeline","resolveArithmeticOperator","resolveSpanset","resolveNewSpansetExpression","resolveAttributeCompletion","pos","getAttributeFieldUpToDot","attributeFieldParent","attributeFieldParentText","indexOfDot","endOfPathNode","endOfPathNode2","originalPos","attributeFieldUpToDot","attributeField","_0","_1","previousNode","parent","_2","suggestion","fixSuggestion","cacheKey","prepend","append","itemType","computeErrorMessage","errorNode","getErrorNodes","errorNodes","nodeRef","setMarkers","markers","getErrorMarkers","getWarningMarkers","severity","getMarker","to","startLine","endLine","start","end","TraceQLEditor","alertText","setAlertText","queryRef","onEditorChange","onRunQueryRef","errorTimeoutId","setupRegisterInteractionCommand","setupActions","changeEvent","cursorPosition","properties","registerInteractionCommandId","traceqlSetupDone","QueryEditor","showCopyFromSearchButton","setShowCopyFromSearchButton","genQuery","DEFAULT_QUERY_TYPE","TempoQueryFieldComponent","queryTypeOptions","Modal","FileDropzone","TempoQueryField","ProfileTypesCascader","cascaderOptions","useCascaderOptions","Cascader","profileTypes","mainTypes","profileType","parts","useProfileTypes","setProfileTypes","TraceToProfilesSettings","supportedDataSourceTypes","profileTypesPlaceholder","dataSource","pTypes","DataSourcePicker","TagMappingInput","TraceToProfilesSection","ConfigSection","ConfigDescriptionLink","QuerySettings","getLabel","getTooltip","IntervalInput","LokiSearchSettings","legacyDatasource","ServiceGraphSettings","TraceQLSearchTags","fetchTags","loading","missingTag","TraceQLSearchSettings","dataSourceSrv","fetchDatasource","ConfigEditor","DataSourceDescription","Divider","ConnectionSettings","Auth","SecureSocksProxySettings","ConfigSubSection","onDashboardLoadedHandler","dashboardId","orgId","grafanaVersion","tempoQueries","stats","hasTemplateVariables"],"sourceRoot":""}
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr