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F,UAAW,EACpCpF,EAAOiF,QAAS,EAGhBjF,EAAOuF,cAAgBX,IAA6B,IAArBA,EAAKW,aAEpCvF,EAAOS,MAAQ,SAAU5R,GAEvB,OADA4R,EAAM4E,KAAK/N,KAAMzI,IACTmR,EAAOiF,QAajBjF,EAAO6C,MAAQ7C,EAAO9S,KAAO,SAAU2B,GAErC,OAAGkW,IACS,OAATlW,IAAekW,GAAS,GAC3BP,EAAOtX,KAAK2B,GACZmW,KAHkBhF,GAapBA,EAAOnB,GAAG,OAAO,WACfmB,EAAOsF,UAAW,GACdtF,EAAOoF,UAAYpF,EAAOuF,aAC5BvP,QAAQyP,UAAS,WACfzF,EAAOwF,gBAWbxF,EAAOxT,IAAM,SAAUqC,GACrB,IAAGgW,EAIH,OAHAA,GAAQ,EACLa,UAAUxZ,QAAQ8T,EAAOS,MAAM5R,GAClCsW,IACOnF,GAGTA,EAAOwF,QAAU,WACf,IAAGV,EAMH,OALAA,GAAY,EACZD,GAAQ,EACRL,EAAOtY,OAAS,EAChB8T,EAAOoF,SAAWpF,EAAOsF,UAAW,EACpCtF,EAAOsE,KAAK,SACLtE,GAGTA,EAAO2F,MAAQ,WACb,IAAG3F,EAAOiF,OAEV,OADAjF,EAAOiF,QAAS,EACTjF,GAGTA,EAAO4F,OAAS,WAUd,OATG5F,EAAOiF,SACRjF,EAAOiF,QAAS,EAChBjF,EAAOsE,KAAK,WAEdU,IAGIhF,EAAOiF,QACTjF,EAAOsE,KAAK,SACPtE,GAEFA,EAlGC5B,EAAOC,QAAUqE,EAC3BA,EAAQA,QAAUA,G","sources":["webpack://grafana/./public/app/core/utils/tracing.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/util.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/components/AdvancedOptions.tsx","webpack://grafana/./public/app/plugins/datasource/jaeger/components/SearchForm.tsx","webpack://grafana/./public/app/plugins/datasource/jaeger/graphTransform.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/datasource.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/module.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/components/ConfigEditor.tsx","webpack://grafana/./public/app/plugins/datasource/jaeger/components/QueryEditor.tsx","webpack://grafana/./public/app/plugins/datasource/jaeger/responseTransform.ts","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/body_parser.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/body_parser_stream.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/logfmt_parser.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/logger.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/request_logger.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/streaming.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/lib/stringify.js","webpack://grafana/../../opt/drone/yarncache/logfmt-npm-1.3.2-37fabee436-639d327c1e.zip/node_modules/logfmt/logfmt.js","webpack://grafana/../../opt/drone/yarncache/split-npm-0.2.10-a950dc8c82-9eb1195608.zip/node_modules/split/index.js","webpack://grafana/../../opt/drone/yarncache/through-npm-2.3.8-df5f72a16e-a38c3e0598.zip/node_modules/through/index.js"],"sourcesContent":["/**\n * Get non overlapping duration of the ranges as they can overlap or have gaps.\n */\nimport { FieldType, MutableDataFrame, NodeGraphDataFrameFieldNames as Fields } from '@grafana/data';\n\nexport function getNonOverlappingDuration(ranges: Array<[number, number]>): number {\n ranges.sort((a, b) => a[0] - b[0]);\n const mergedRanges = ranges.reduce((acc, range) => {\n if (!acc.length) {\n return [range];\n }\n const tail = acc.slice(-1)[0];\n const [prevStart, prevEnd] = tail;\n const [start, end] = range;\n if (end < prevEnd) {\n // In this case the range is completely inside the prev range so we can just ignore it.\n return acc;\n }\n\n if (start > prevEnd) {\n // There is no overlap so we can just add it to stack\n return [...acc, range];\n }\n\n // We know there is overlap and current range ends later than previous so we can just extend the range\n return [...acc.slice(0, -1), [prevStart, end]] as Array<[number, number]>;\n }, [] as Array<[number, number]>);\n\n return mergedRanges.reduce((acc, range) => {\n return acc + (range[1] - range[0]);\n }, 0);\n}\n\n/**\n * Returns a map of the spans with children array for easier processing. It will also contain empty spans in case\n * span is missing but other spans are it's children. This is more generic because it needs to allow iterating over\n * both arrays and dataframe views.\n */\nexport function makeSpanMap<T>(getSpan: (index: number) => { span: T; id: string; parentIds: string[] } | undefined): {\n [id: string]: { span: T; children: string[] };\n} {\n const spanMap: { [id: string]: { span?: T; children: string[] } } = {};\n\n let span;\n for (let index = 0; (span = getSpan(index)), !!span; index++) {\n if (!spanMap[span.id]) {\n spanMap[span.id] = {\n span: span.span,\n children: [],\n };\n } else {\n spanMap[span.id].span = span.span;\n }\n\n for (const parentId of span.parentIds) {\n if (parentId) {\n if (!spanMap[parentId]) {\n spanMap[parentId] = {\n span: undefined,\n children: [span.id],\n };\n } else {\n spanMap[parentId].children.push(span.id);\n }\n }\n }\n }\n return spanMap as { [id: string]: { span: T; children: string[] } };\n}\n\nexport function getStats(duration: number, traceDuration: number, selfDuration: number) {\n return {\n main: `${toFixedNoTrailingZeros(duration)}ms (${toFixedNoTrailingZeros((duration / traceDuration) * 100)}%)`,\n secondary: `${toFixedNoTrailingZeros(selfDuration)}ms (${toFixedNoTrailingZeros(\n (selfDuration / duration) * 100\n )}%)`,\n };\n}\n\nfunction toFixedNoTrailingZeros(n: number) {\n return parseFloat(n.toFixed(2));\n}\n\n/**\n * Create default frames used when returning data for node graph.\n */\nexport function makeFrames() {\n const nodesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.title, type: FieldType.string },\n { name: Fields.subTitle, type: FieldType.string },\n { name: Fields.mainStat, type: FieldType.string, config: { displayName: 'Total time (% of trace)' } },\n { name: Fields.secondaryStat, type: FieldType.string, config: { displayName: 'Self time (% of total)' } },\n {\n name: Fields.color,\n type: FieldType.number,\n config: { color: { mode: 'continuous-GrYlRd' }, displayName: 'Self time / Trace duration' },\n },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n const edgesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.target, type: FieldType.string },\n { name: Fields.source, type: FieldType.string },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n return [nodesFrame, edgesFrame];\n}\n","import logfmt from 'logfmt';\n\nexport function convertTagsLogfmt(tags: string | undefined) {\n if (!tags) {\n return '';\n }\n const data: any = logfmt.parse(tags);\n Object.keys(data).forEach((key) => {\n const value = data[key];\n if (typeof value !== 'string') {\n data[key] = String(value);\n }\n });\n return JSON.stringify(data);\n}\n\nexport function transformToLogfmt(tags: string | undefined) {\n if (!tags) {\n return '';\n }\n try {\n return logfmt.stringify(JSON.parse(tags));\n } catch {\n return tags;\n }\n}\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { GrafanaTheme } from '@grafana/data';\nimport { Icon, InlineField, InlineFieldRow, InlineLabel, Input, useStyles } from '@grafana/ui';\n\nimport { JaegerQuery } from '../types';\n\nconst durationPlaceholder = 'e.g. 1.2s, 100ms, 500us';\n\ntype Props = {\n query: JaegerQuery;\n onChange: (value: JaegerQuery) => void;\n};\n\nexport function AdvancedOptions({ query, onChange }: Props) {\n const [showAdvancedOptions, setShowAdvancedOptions] = useState(false);\n const styles = useStyles(getStyles);\n\n return (\n <div>\n <InlineFieldRow>\n <div className={styles.advancedOptionsContainer} onClick={() => setShowAdvancedOptions(!showAdvancedOptions)}>\n <InlineLabel as=\"div\">\n Advanced options{' '}\n <Icon className={showAdvancedOptions ? styles.angleUp : styles.angleDown} name=\"angle-down\" />\n </InlineLabel>\n </div>\n </InlineFieldRow>\n <CSSTransition\n in={showAdvancedOptions}\n mountOnEnter={true}\n unmountOnExit={true}\n timeout={300}\n classNames={styles}\n >\n <div>\n <InlineFieldRow>\n <InlineField label=\"Min Duration\" labelWidth={21} grow>\n <Input\n id=\"minDuration\"\n name=\"minDuration\"\n value={query.minDuration || ''}\n placeholder={durationPlaceholder}\n onChange={(v) =>\n onChange({\n ...query,\n minDuration: v.currentTarget.value,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Max Duration\" labelWidth={21} grow>\n <Input\n id=\"maxDuration\"\n name=\"maxDuration\"\n value={query.maxDuration || ''}\n placeholder={durationPlaceholder}\n onChange={(v) =>\n onChange({\n ...query,\n maxDuration: v.currentTarget.value,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Limit\" labelWidth={21} grow tooltip=\"Maximum numbers of returned results\">\n <Input\n id=\"limit\"\n name=\"limit\"\n value={query.limit || ''}\n type=\"number\"\n onChange={(v) =>\n onChange({\n ...query,\n limit: v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n </div>\n </CSSTransition>\n </div>\n );\n}\n\nfunction getStyles(theme: GrafanaTheme) {\n return {\n advancedOptionsContainer: css`\n margin: 0 ${theme.spacing.xs} ${theme.spacing.xs} 0;\n width: 100%;\n cursor: pointer;\n `,\n enter: css`\n label: enter;\n height: 0;\n opacity: 0;\n `,\n enterActive: css`\n label: enterActive;\n height: 108px;\n opacity: 1;\n transition: height 300ms ease, opacity 300ms ease;\n `,\n exit: css`\n label: exit;\n height: 108px;\n opacity: 1;\n `,\n exitActive: css`\n label: exitActive;\n height: 0;\n opacity: 0;\n transition: height 300ms ease, opacity 300ms ease;\n `,\n angleUp: css`\n transform: rotate(-180deg);\n transition: transform 300ms;\n `,\n angleDown: css`\n transform: rotate(0deg);\n transition: transform 300ms;\n `,\n };\n}\n","import { css } from '@emotion/css';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { fuzzyMatch, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport { createErrorNotification } from 'app/core/copy/appNotification';\nimport { dispatch } from 'app/store/store';\n\nimport { JaegerDatasource } from '../datasource';\nimport { JaegerQuery } from '../types';\nimport { transformToLogfmt } from '../util';\n\nimport { AdvancedOptions } from './AdvancedOptions';\n\ntype Props = {\n datasource: JaegerDatasource;\n query: JaegerQuery;\n onChange: (value: JaegerQuery) => void;\n};\n\nexport const ALL_OPERATIONS_KEY = 'All';\nconst allOperationsOption: SelectableValue<string> = {\n label: ALL_OPERATIONS_KEY,\n value: undefined,\n};\n\nexport function SearchForm({ datasource, query, onChange }: Props) {\n const [serviceOptions, setServiceOptions] = useState<Array<SelectableValue<string>>>();\n const [operationOptions, setOperationOptions] = useState<Array<SelectableValue<string>>>();\n const [isLoading, setIsLoading] = useState<{\n services: boolean;\n operations: boolean;\n }>({\n services: false,\n operations: false,\n });\n\n const loadOptions = useCallback(\n async (url: string, loaderOfType: string, query = ''): Promise<Array<SelectableValue<string>>> => {\n setIsLoading((prevValue) => ({ ...prevValue, [loaderOfType]: true }));\n\n try {\n const values: string[] | null = await datasource.metadataRequest(url);\n if (!values) {\n return [{ label: `No ${loaderOfType} found`, value: `No ${loaderOfType} found` }];\n }\n\n const options: SelectableValue[] = values.sort().map((option) => ({\n label: option,\n value: option,\n }));\n\n const filteredOptions = options.filter((item) => (item.value ? fuzzyMatch(item.value, query).found : false));\n return filteredOptions;\n } catch (error) {\n dispatch(notifyApp(createErrorNotification('Error', error)));\n return [];\n } finally {\n setIsLoading((prevValue) => ({ ...prevValue, [loaderOfType]: false }));\n }\n },\n [datasource]\n );\n\n useEffect(() => {\n const getServices = async () => {\n const services = await loadOptions('/api/services', 'services');\n setServiceOptions(services);\n };\n getServices();\n }, [datasource, loadOptions]);\n\n useEffect(() => {\n const getOperations = async () => {\n const operations = await loadOptions(\n `/api/services/${encodeURIComponent(query.service!)}/operations`,\n 'operations'\n );\n setOperationOptions([allOperationsOption, ...operations]);\n };\n if (query.service) {\n getOperations();\n }\n }, [datasource, query.service, loadOptions]);\n\n return (\n <div className={css({ maxWidth: '500px' })}>\n <InlineFieldRow>\n <InlineField label=\"Service\" labelWidth={14} grow>\n <Select\n inputId=\"service\"\n options={serviceOptions}\n onOpenMenu={() => loadOptions('/api/services', 'services')}\n isLoading={isLoading.services}\n value={serviceOptions?.find((v) => v?.value === query.service) || undefined}\n onChange={(v) =>\n onChange({\n ...query,\n service: v?.value!,\n operation: query.service !== v?.value ? undefined : query.operation,\n })\n }\n menuPlacement=\"bottom\"\n isClearable\n aria-label={'select-service-name'}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Operation\" labelWidth={14} grow disabled={!query.service}>\n <Select\n inputId=\"operation\"\n options={operationOptions}\n onOpenMenu={() =>\n loadOptions(`/api/services/${encodeURIComponent(query.service!)}/operations`, 'operations')\n }\n isLoading={isLoading.operations}\n value={operationOptions?.find((v) => v.value === query.operation) || null}\n onChange={(v) =>\n onChange({\n ...query,\n operation: v?.value! || undefined,\n })\n }\n menuPlacement=\"bottom\"\n isClearable\n aria-label={'select-operation-name'}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label=\"Tags\" labelWidth={14} grow>\n <Input\n id=\"tags\"\n value={transformToLogfmt(query.tags)}\n placeholder=\"http.status_code=200 error=true\"\n onChange={(v) =>\n onChange({\n ...query,\n tags: v.currentTarget.value,\n })\n }\n />\n </InlineField>\n </InlineFieldRow>\n <AdvancedOptions query={query} onChange={onChange} />\n </div>\n );\n}\n\nexport default SearchForm;\n","import { DataFrame, NodeGraphDataFrameFieldNames as Fields } from '@grafana/data';\n\nimport { getNonOverlappingDuration, getStats, makeFrames, makeSpanMap } from '../../../core/utils/tracing';\n\nimport { Span, TraceResponse } from './types';\n\ninterface Node {\n [Fields.id]: string;\n [Fields.title]: string;\n [Fields.subTitle]: string;\n [Fields.mainStat]: string;\n [Fields.secondaryStat]: string;\n [Fields.color]: number;\n}\n\ninterface Edge {\n [Fields.id]: string;\n [Fields.target]: string;\n [Fields.source]: string;\n}\n\nexport function createGraphFrames(data: TraceResponse): DataFrame[] {\n const { nodes, edges } = convertTraceToGraph(data);\n const [nodesFrame, edgesFrame] = makeFrames();\n\n for (const node of nodes) {\n nodesFrame.add(node);\n }\n\n for (const edge of edges) {\n edgesFrame.add(edge);\n }\n\n return [nodesFrame, edgesFrame];\n}\n\nfunction convertTraceToGraph(data: TraceResponse): { nodes: Node[]; edges: Edge[] } {\n const nodes: Node[] = [];\n const edges: Edge[] = [];\n\n const traceDuration = findTraceDuration(data.spans);\n\n const spanMap = makeSpanMap((index) => {\n if (index >= data.spans.length) {\n return undefined;\n }\n const span = data.spans[index];\n return {\n span,\n id: span.spanID,\n parentIds: span.references?.filter((r) => r.refType === 'CHILD_OF').map((r) => r.spanID) || [],\n };\n });\n\n for (const span of data.spans) {\n const process = data.processes[span.processID];\n\n const ranges: Array<[number, number]> = spanMap[span.spanID].children.map((c) => {\n const span = spanMap[c].span;\n return [span.startTime, span.startTime + span.duration];\n });\n const childrenDuration = getNonOverlappingDuration(ranges);\n const selfDuration = span.duration - childrenDuration;\n const stats = getStats(span.duration / 1000, traceDuration / 1000, selfDuration / 1000);\n\n nodes.push({\n [Fields.id]: span.spanID,\n [Fields.title]: process?.serviceName ?? '',\n [Fields.subTitle]: span.operationName,\n [Fields.mainStat]: stats.main,\n [Fields.secondaryStat]: stats.secondary,\n [Fields.color]: selfDuration / traceDuration,\n });\n\n const parentSpanID = span.references?.find((r) => r.refType === 'CHILD_OF')?.spanID;\n // Sometimes some span can be missing. Don't add edges for those.\n if (parentSpanID && spanMap[parentSpanID].span) {\n edges.push({\n [Fields.id]: parentSpanID + '--' + span.spanID,\n [Fields.target]: span.spanID,\n [Fields.source]: parentSpanID,\n });\n }\n }\n\n return { nodes, edges };\n}\n\n/**\n * Get the duration of the whole trace as it isn't a part of the response data.\n * Note: Seems like this should be the same as just longest span, but this is probably safer.\n */\nfunction findTraceDuration(spans: Span[]): number {\n let traceEndTime = 0;\n let traceStartTime = Infinity;\n\n for (const span of spans) {\n if (span.startTime < traceStartTime) {\n traceStartTime = span.startTime;\n }\n\n if (span.startTime + span.duration > traceEndTime) {\n traceEndTime = span.startTime + span.duration;\n }\n }\n\n return traceEndTime - traceStartTime;\n}\n","import { identity, omit, pick, pickBy } from 'lodash';\nimport { lastValueFrom, Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport {\n DataQueryRequest,\n DataQueryResponse,\n DataSourceApi,\n DataSourceInstanceSettings,\n DataSourceJsonData,\n dateMath,\n DateTime,\n FieldType,\n MutableDataFrame,\n} from '@grafana/data';\nimport { BackendSrvRequest, getBackendSrv, getTemplateSrv } from '@grafana/runtime';\nimport { NodeGraphOptions } from 'app/core/components/NodeGraphSettings';\nimport { serializeParams } from 'app/core/utils/fetch';\nimport { getTimeSrv, TimeSrv } from 'app/features/dashboard/services/TimeSrv';\n\nimport { ALL_OPERATIONS_KEY } from './components/SearchForm';\nimport { createGraphFrames } from './graphTransform';\nimport { createTableFrame, createTraceFrame } from './responseTransform';\nimport { JaegerQuery } from './types';\nimport { convertTagsLogfmt } from './util';\n\nexport interface JaegerJsonData extends DataSourceJsonData {\n nodeGraph?: NodeGraphOptions;\n}\n\nexport class JaegerDatasource extends DataSourceApi<JaegerQuery, JaegerJsonData> {\n uploadedJson: string | ArrayBuffer | null = null;\n nodeGraph?: NodeGraphOptions;\n constructor(\n private instanceSettings: DataSourceInstanceSettings<JaegerJsonData>,\n private readonly timeSrv: TimeSrv = getTimeSrv()\n ) {\n super(instanceSettings);\n this.nodeGraph = instanceSettings.jsonData.nodeGraph;\n }\n\n async metadataRequest(url: string, params?: Record<string, any>): Promise<any> {\n const res = await lastValueFrom(this._request(url, params, { hideFromInspector: true }));\n return res.data.data;\n }\n\n query(options: DataQueryRequest<JaegerQuery>): Observable<DataQueryResponse> {\n // At this moment we expect only one target. In case we somehow change the UI to be able to show multiple\n // traces at one we need to change this.\n const target: JaegerQuery = options.targets[0];\n if (!target) {\n return of({ data: [emptyTraceDataFrame] });\n }\n\n if (target.queryType !== 'search' && target.query) {\n return this._request(\n `/api/traces/${encodeURIComponent(getTemplateSrv().replace(target.query, options.scopedVars))}`\n ).pipe(\n map((response) => {\n const traceData = response?.data?.data?.[0];\n if (!traceData) {\n return { data: [emptyTraceDataFrame] };\n }\n let data = [createTraceFrame(traceData)];\n if (this.nodeGraph?.enabled) {\n data.push(...createGraphFrames(traceData));\n }\n return {\n data,\n };\n })\n );\n }\n\n if (target.queryType === 'upload') {\n if (!this.uploadedJson) {\n return of({ data: [] });\n }\n\n try {\n const traceData = JSON.parse(this.uploadedJson as string).data[0];\n let data = [createTraceFrame(traceData)];\n if (this.nodeGraph?.enabled) {\n data.push(...createGraphFrames(traceData));\n }\n return of({ data });\n } catch (error) {\n return of({ error: { message: 'JSON is not valid Jaeger format' }, data: [] });\n }\n }\n\n let jaegerQuery = pick(target, ['operation', 'service', 'tags', 'minDuration', 'maxDuration', 'limit']);\n // remove empty properties\n jaegerQuery = pickBy(jaegerQuery, identity);\n if (jaegerQuery.tags) {\n jaegerQuery = {\n ...jaegerQuery,\n tags: convertTagsLogfmt(getTemplateSrv().replace(jaegerQuery.tags, options.scopedVars)),\n };\n }\n\n if (jaegerQuery.operation === ALL_OPERATIONS_KEY) {\n jaegerQuery = omit(jaegerQuery, 'operation');\n }\n\n // TODO: this api is internal, used in jaeger ui. Officially they have gRPC api that should be used.\n return this._request(`/api/traces`, {\n ...jaegerQuery,\n ...this.getTimeRange(),\n lookback: 'custom',\n }).pipe(\n map((response) => {\n return {\n data: [createTableFrame(response.data.data, this.instanceSettings)],\n };\n })\n );\n }\n\n async testDatasource(): Promise<any> {\n return lastValueFrom(\n this._request('/api/services').pipe(\n map((res) => {\n const values: any[] = res?.data?.data || [];\n const testResult =\n values.length > 0\n ? { status: 'success', message: 'Data source connected and services found.' }\n : {\n status: 'error',\n message:\n 'Data source connected, but no services received. Verify that Jaeger is configured properly.',\n };\n return testResult;\n }),\n catchError((err: any) => {\n let message = 'Jaeger: ';\n if (err.statusText) {\n message += err.statusText;\n } else {\n message += 'Cannot connect to Jaeger';\n }\n\n if (err.status) {\n message += `. ${err.status}`;\n }\n\n if (err.data && err.data.message) {\n message += `. ${err.data.message}`;\n } else if (err.data) {\n message += `. ${JSON.stringify(err.data)}`;\n }\n return of({ status: 'error', message: message });\n })\n )\n );\n }\n\n getTimeRange(): { start: number; end: number } {\n const range = this.timeSrv.timeRange();\n return {\n start: getTime(range.from, false),\n end: getTime(range.to, true),\n };\n }\n\n getQueryDisplayText(query: JaegerQuery) {\n return query.query || '';\n }\n\n private _request(apiUrl: string, data?: any, options?: Partial<BackendSrvRequest>): Observable<Record<string, any>> {\n const params = data ? serializeParams(data) : '';\n const url = `${this.instanceSettings.url}${apiUrl}${params.length ? `?${params}` : ''}`;\n const req = {\n ...options,\n url,\n };\n\n return getBackendSrv().fetch(req);\n }\n}\n\nfunction getTime(date: string | DateTime, roundUp: boolean) {\n if (typeof date === 'string') {\n date = dateMath.parse(date, roundUp)!;\n }\n return date.valueOf() * 1000;\n}\n\nconst emptyTraceDataFrame = new MutableDataFrame({\n fields: [\n {\n name: 'trace',\n type: FieldType.trace,\n values: [],\n },\n ],\n meta: {\n preferredVisualisationType: 'trace',\n custom: {\n traceFormat: 'jaeger',\n },\n },\n});\n","import { DataSourcePlugin } from '@grafana/data';\n\nimport { ConfigEditor } from './components/ConfigEditor';\nimport { QueryEditor } from './components/QueryEditor';\nimport { JaegerDatasource } from './datasource';\n\nexport const plugin = new DataSourcePlugin(JaegerDatasource).setConfigEditor(ConfigEditor).setQueryEditor(QueryEditor);\n","import React from 'react';\n\nimport { DataSourcePluginOptionsEditorProps } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { DataSourceHttpSettings } from '@grafana/ui';\nimport { NodeGraphSettings } from 'app/core/components/NodeGraphSettings';\nimport { TraceToLogsSettings } from 'app/core/components/TraceToLogs/TraceToLogsSettings';\nimport { TraceToMetricsSettings } from 'app/core/components/TraceToMetrics/TraceToMetricsSettings';\n\nexport type Props = DataSourcePluginOptionsEditorProps;\n\nexport const ConfigEditor: React.FC<Props> = ({ options, onOptionsChange }) => {\n return (\n <>\n <DataSourceHttpSettings\n defaultUrl=\"http://localhost:16686\"\n dataSourceConfig={options}\n showAccessOptions={false}\n onChange={onOptionsChange}\n />\n\n <div className=\"gf-form-group\">\n <TraceToLogsSettings options={options} onOptionsChange={onOptionsChange} />\n </div>\n\n {config.featureToggles.traceToMetrics ? (\n <div className=\"gf-form-group\">\n <TraceToMetricsSettings options={options} onOptionsChange={onOptionsChange} />\n </div>\n ) : null}\n\n <div className=\"gf-form-group\">\n <NodeGraphSettings options={options} onOptionsChange={onOptionsChange} />\n </div>\n </>\n );\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { QueryEditorProps } from '@grafana/data';\nimport { FileDropzone, InlineField, InlineFieldRow, QueryField, RadioButtonGroup, useTheme2 } from '@grafana/ui';\n\nimport { JaegerDatasource } from '../datasource';\nimport { JaegerQuery, JaegerQueryType } from '../types';\n\nimport { SearchForm } from './SearchForm';\n\ntype Props = QueryEditorProps<JaegerDatasource, JaegerQuery>;\n\nexport function QueryEditor({ datasource, query, onChange, onRunQuery }: Props) {\n const theme = useTheme2();\n\n const onChangeQuery = (value: string) => {\n const nextQuery: JaegerQuery = { ...query, query: value };\n onChange(nextQuery);\n };\n\n const renderEditorBody = () => {\n switch (query.queryType) {\n case 'search':\n return <SearchForm datasource={datasource} query={query} onChange={onChange} />;\n case 'upload':\n return (\n <div className={css({ padding: theme.spacing(2) })}>\n <FileDropzone\n options={{ multiple: false }}\n onLoad={(result) => {\n datasource.uploadedJson = result;\n onRunQuery();\n }}\n />\n </div>\n );\n default:\n return (\n <InlineFieldRow>\n <InlineField label=\"Trace ID\" labelWidth={14} grow>\n <QueryField\n query={query.query}\n onChange={onChangeQuery}\n onRunQuery={onRunQuery}\n onBlur={() => {}}\n placeholder={'Enter a Trace ID (run with Shift+Enter)'}\n portalOrigin=\"jaeger\"\n />\n </InlineField>\n </InlineFieldRow>\n );\n }\n };\n\n return (\n <>\n <div className={css({ width: '100%' })}>\n <InlineFieldRow>\n <InlineField label=\"Query type\">\n <RadioButtonGroup<JaegerQueryType>\n options={[\n { value: 'search', label: 'Search' },\n { value: undefined, label: 'TraceID' },\n { value: 'upload', label: 'JSON file' },\n ]}\n value={query.queryType}\n onChange={(v) =>\n onChange({\n ...query,\n queryType: v,\n })\n }\n size=\"md\"\n />\n </InlineField>\n </InlineFieldRow>\n {renderEditorBody()}\n </div>\n </>\n );\n}\n","import {\n DataFrame,\n DataSourceInstanceSettings,\n FieldType,\n MutableDataFrame,\n TraceLog,\n TraceSpanRow,\n} from '@grafana/data';\nimport { transformTraceData } from '@jaegertracing/jaeger-ui-components';\n\nimport { JaegerResponse, Span, TraceProcess, TraceResponse } from './types';\n\nexport function createTraceFrame(data: TraceResponse): DataFrame {\n const spans = data.spans.map((s) => toSpanRow(s, data.processes));\n\n const frame = new MutableDataFrame({\n fields: [\n { name: 'traceID', type: FieldType.string },\n { name: 'spanID', type: FieldType.string },\n { name: 'parentSpanID', type: FieldType.string },\n { name: 'operationName', type: FieldType.string },\n { name: 'serviceName', type: FieldType.string },\n { name: 'serviceTags', type: FieldType.other },\n { name: 'startTime', type: FieldType.number },\n { name: 'duration', type: FieldType.number },\n { name: 'logs', type: FieldType.other },\n { name: 'tags', type: FieldType.other },\n { name: 'warnings', type: FieldType.other },\n { name: 'stackTraces', type: FieldType.other },\n ],\n meta: {\n preferredVisualisationType: 'trace',\n custom: {\n traceFormat: 'jaeger',\n },\n },\n });\n\n for (const span of spans) {\n frame.add(span);\n }\n\n return frame;\n}\n\nfunction toSpanRow(span: Span, processes: Record<string, TraceProcess>): TraceSpanRow {\n return {\n spanID: span.spanID,\n traceID: span.traceID,\n parentSpanID: span.references?.find((r) => r.refType === 'CHILD_OF')?.spanID,\n operationName: span.operationName,\n // from micro to millis\n startTime: span.startTime / 1000,\n duration: span.duration / 1000,\n logs: span.logs.map((l) => ({\n ...l,\n timestamp: l.timestamp / 1000,\n })),\n tags: span.tags,\n warnings: span.warnings ?? undefined,\n stackTraces: span.stackTraces,\n serviceName: processes[span.processID].serviceName,\n serviceTags: processes[span.processID].tags,\n };\n}\n\nexport function createTableFrame(data: TraceResponse[], instanceSettings: DataSourceInstanceSettings): DataFrame {\n const frame = new MutableDataFrame({\n fields: [\n {\n name: 'traceID',\n type: FieldType.string,\n config: {\n unit: 'string',\n displayNameFromDS: 'Trace ID',\n links: [\n {\n title: 'Trace: ${__value.raw}',\n url: '',\n internal: {\n datasourceUid: instanceSettings.uid,\n datasourceName: instanceSettings.name,\n query: {\n query: '${__value.raw}',\n },\n },\n },\n ],\n },\n },\n { name: 'traceName', type: FieldType.string, config: { displayNameFromDS: 'Trace name' } },\n { name: 'startTime', type: FieldType.time, config: { displayNameFromDS: 'Start time' } },\n { name: 'duration', type: FieldType.number, config: { displayNameFromDS: 'Duration', unit: 'µs' } },\n ],\n meta: {\n preferredVisualisationType: 'table',\n },\n });\n // Show the most recent traces\n const traceData = data.map(transformToTraceData).sort((a, b) => b?.startTime! - a?.startTime!);\n\n for (const trace of traceData) {\n frame.add(trace);\n }\n\n return frame;\n}\n\nfunction transformToTraceData(data: TraceResponse) {\n const traceData = transformTraceData(data);\n if (!traceData) {\n return;\n }\n\n return {\n traceID: traceData.traceID,\n startTime: traceData.startTime / 1000,\n duration: traceData.duration,\n traceName: traceData.traceName,\n };\n}\n\nexport function transformToJaeger(data: MutableDataFrame): JaegerResponse {\n let traceResponse: TraceResponse = {\n traceID: '',\n spans: [],\n processes: {},\n warnings: null,\n };\n let processes: string[] = [];\n\n for (let i = 0; i < data.length; i++) {\n const span = data.get(i);\n\n // Set traceID\n if (!traceResponse.traceID) {\n traceResponse.traceID = span.traceID;\n }\n\n // Create process if doesn't exist\n if (!processes.find((p) => p === span.serviceName)) {\n processes.push(span.serviceName);\n traceResponse.processes[`p${processes.length}`] = {\n serviceName: span.serviceName,\n tags: span.serviceTags,\n };\n }\n\n // Create span\n traceResponse.spans.push({\n traceID: span.traceID,\n spanID: span.spanID,\n duration: span.duration * 1000,\n references: span.parentSpanID\n ? [\n {\n refType: 'CHILD_OF',\n spanID: span.parentSpanID,\n traceID: span.traceID,\n },\n ]\n : [],\n flags: 0,\n logs: span.logs.map((l: TraceLog) => ({\n ...l,\n timestamp: l.timestamp * 1000,\n })),\n operationName: span.operationName,\n processID:\n Object.keys(traceResponse.processes).find(\n (key) => traceResponse.processes[key].serviceName === span.serviceName\n ) || '',\n startTime: span.startTime * 1000,\n tags: span.tags,\n warnings: span.warnings ? span.warnings : null,\n });\n }\n\n return { data: [traceResponse], total: 0, limit: 0, offset: 0, errors: null };\n}\n","\n/*\nModule dependencies.\n*/\n\n/*\nJSON:\n\nParse logplex request bodies, providing the\nparsed object as `req.body`.\n\nOptions: none\n\n@param content_type {String} use when Content-Type matches this string\n@param parser {Function} parsing function takes String body and returns new body\n@return {Function}\n@api public\n*/\n\nexports = module.exports = function(options) {\n var limit;\n if (options == null) options = {};\n\n return function(req, res, next) {\n if (req._body) return next();\n var is_mime = req.header('content-type') === options.contentType;\n if (!is_mime) return next();\n req._body = true;\n req.body = req.body || {};\n var buf;\n buf = \"\";\n req.setEncoding(\"utf8\");\n req.on(\"data\", function(chunk) {\n return buf += chunk;\n });\n req.on(\"end\", function() {\n try {\n var lines = []\n buf.trim().split(\"\\n\").forEach(function(line){\n lines.push(options.parser(line))\n })\n req.body = lines;\n } catch (err) {\n err.body = buf;\n err.status = 400;\n return next(err);\n }\n return next();\n });\n };\n};\n","var split = require('split');\nvar through = require('through');\nvar Readable = require('stream').Readable;\nvar PassThrough = require('stream').PassThrough;\nvar logfmt = require('../logfmt');\n\nexports = module.exports = function(options){\n if(options == null) options = {};\n var mime = options.contentType || \"application/logplex-1\";\n\n return function(req, res, next) {\n\n //honor already parsed bodies\n if (req._body) return next();\n\n //mime-type check\n var is_mime = req.header('content-type') === mime;\n if (!is_mime) return next();\n req._body = true;\n req.body = new PassThrough({objectMode: true});\n req.pipe(logfmt.streamParser()).pipe(req.body);\n\n return next();\n }\n}\n\n","exports.debug = false;\n\nexports.parse = function(line) {\n var key = '';\n var value = '';\n var is_number = true;\n var in_key = false;\n var in_value = false;\n var in_quote = false;\n var had_quote = false;\n var object = {};\n var debug = exports.debug;\n\n if(line[line.length - 1] == '\\n'){\n line = line.slice(0,line.length - 1)\n }\n\n for(var i=0; i <= line.length; i++){\n\n if((line[i] == ' ' && !in_quote) || i == line.length){\n if(in_key && key.length > 0){\n object[key] = true;\n }else if(in_value){\n if(value == 'true') value = true;\n else if(value == 'false') value = false;\n else if(value === '' && !had_quote) value = null;\n object[key] = value;\n value = '';\n }\n\n if(i == line.length) break;\n else {\n in_key = false;\n in_value = false;\n in_quote = false;\n had_quote = false;\n }\n }\n\n if(line[i] == '=' && !in_quote){\n if(debug) console.log('split')\n //split\n in_key = false;\n in_value = true;\n }\n else if(line[i] == '\\\\'){\n i ++ ;\n value += line[i];\n if(debug) console.log('escape: ' + line[i])\n }\n else if(line[i] == '\"'){\n had_quote = true;\n in_quote = !in_quote;\n if(debug) console.log('in quote: ' + in_quote)\n }\n else if(line[i] != ' ' && !in_value && !in_key){\n if(debug) console.log('start key with: ' + line[i])\n in_key = true;\n key = line[i];\n }\n else if(in_key){\n if(debug) console.log('add to key: ' + line[i])\n key += line[i]\n }\n else if(in_value){\n if(debug) console.log('add to value: ' + line[i])\n value += line[i];\n }\n }\n\n return object;\n}\n","exports.log = function(data, stream) {\n this.stream = this.stream || process.stdout;\n if(stream == undefined) stream = this.stream;\n\n var logData = Object.assign({}, this.defaultData, data);\n\n if(this.timers){\n for(var key in this.timers){\n var now = (new Date()).getTime()\n logData[key] = (now - this.timers[key]).toString() + 'ms' ;\n }\n }\n\n stream.write(this.stringify(logData) + \"\\n\");\n}\n\nexports.time = function(label) {\n var logfmt = require('../logfmt');\n var startTime = (new Date()).getTime();\n var label = label || 'elapsed';\n var timer = new logfmt();\n timer.stream = this.stream;\n timer.defaultData = this.defaultData;\n timer.timers = Object.assign({}, this.timers)\n timer.timers[label] = startTime;\n return timer;\n}\n\nexports.namespace = function(object) {\n var logfmt = require('../logfmt');\n var namespaced = new logfmt()\n var namespace = Object.assign({}, this.defaultData, object);\n namespaced.stream = this.stream;\n namespaced.defaultData = namespace\n namespaced.timers = this.timers;\n return namespaced;\n}\n\nexports.error = function(err, id) {\n this.maxErrorLines = this.maxErrorLines || 10;\n if (id === undefined) {\n id = Math.random().toString().slice(2, 12);\n }\n var errorLogger = this.namespace({\n error: true,\n id:id,\n now: (new Date()).toISOString()\n })\n errorLogger.log({ message:err.message });\n if (err.stack) {\n var stack = err.stack.split('\\n');\n for (var line in stack) {\n if (line >= this.maxErrorLines) break;\n errorLogger.log({ line:line, trace:stack[line] });\n }\n }\n}\n","var commonFormatter = function(req, res){\n if((typeof req.path) == 'function'){\n //in restify path is a function\n var path = req.path();\n }\n else{\n //in express it is an attribute\n var path = req.originalUrl || req.path || req.url;\n }\n\n var httpHeader = req.header && req.header('x-forwarded-for')\n var requestID = req.header && req.header('x-request-id')\n\n var ip = req.ip || httpHeader\n || req.connection.remoteAddress;\n\n var requestData = {\n ip: ip,\n time: (new Date()).toISOString(),\n method: req.method,\n path: path,\n \"status\": res.statusCode,\n }\n\n if (requestID) {\n requestData.request_id = requestID;\n }\n\n if(res.get){\n requestData.content_length = res.get('content-length');\n requestData.content_type = res.get('content-type');\n }\n return requestData;\n}\n\nvar immediateLogger = function(logger, options, formatter){\n return function(req, res, next){\n var data = formatter(req, res);\n logger.log(data);\n next();\n }\n}\n\nvar timingLogger = function(logger, options, formatter){\n return function(req, res, next){\n var elapsed = options.elapsed || 'elapsed';\n var timer = logger.time(elapsed);\n var end = res.end;\n res.end = function(chunk, encoding) {\n var data = formatter(req, res);\n res.end = end;\n res.end(chunk, encoding);\n timer.log(data);\n };\n next();\n }\n}\n\nexports.init = function(logger, options, formatter) {\n this.logger = logger;\n\n if(!formatter && !options){\n formatter = commonFormatter;\n options = {};\n }\n else if(!formatter){\n if(typeof options == 'function'){\n formatter = options;\n options = {};\n }else{\n formatter = commonFormatter;\n }\n }\n options = options || {};\n\n if(options.immediate){\n return immediateLogger(logger, options, formatter);\n }else{\n return timingLogger(logger, options, formatter);\n }\n}\n\nexports.commonFormatter = commonFormatter;\n","var split = require('split')\nvar through = require('through');\nvar PassThrough = require('stream').PassThrough;\n\n//returns a stream that splits and parses logfmt into objects\nexports.streamParser = function(options){\n var options = options || {};\n\n var streamParser = new PassThrough();\n var self = this;\n\n var logfmtStream = through(function(line){\n if(line !== '') this.queue(self.parse(line))\n })\n\n // When a source stream is piped to us, undo that pipe, and save\n // off the source stream piped into our internally managed streams.\n streamParser.on('pipe', function(source) {\n if(source.unpipe) source.unpipe(this);\n this.transformStream = source.pipe(split()).pipe(logfmtStream);\n });\n\n // When we're piped to another stream, instead pipe our internal\n // transform stream to that destination.\n streamParser.pipe = function(destination, options) {\n return this.transformStream.pipe(destination, options);\n };\n\n return streamParser;\n}\n\n// returns a stream that stringifies objects\nexports.streamStringify = function(options){\n var self = this;\n var options = options || {};\n if(options.hasOwnProperty('delimiter')){\n var delim = options.delimiter;\n }else{\n var delim = \"\\n\";\n }\n\n return through(function(data){\n this.queue(self.stringify(data) + delim)\n }, function(){\n this.queue(null)\n })\n}\n","exports.stringify = function(data){\n var line = '';\n\n for(var key in data) {\n var value = data[key];\n var is_null = false;\n if(value == null) {\n is_null = true;\n value = '';\n }\n else value = value.toString();\n\n var needs_quoting = value.indexOf(' ') > -1 || value.indexOf('=') > -1;\n var needs_escaping = value.indexOf('\"') > -1 || value.indexOf(\"\\\\\") > -1;\n\n if(needs_escaping) value = value.replace(/[\"\\\\]/g, '\\\\$&');\n if(needs_quoting) value = '\"' + value + '\"';\n if(value === '' && !is_null) value = '\"\"';\n\n line += key + '=' + value + ' ';\n }\n\n //trim traling space\n return line.substring(0,line.length-1);\n}\n\n","//constructor\nfunction logfmt() {\n}\nmodule.exports = logfmt;\n\nvar streaming = require('./lib/streaming');\nvar bodyParser = require('./lib/body_parser');\nvar bodyParserStream = require('./lib/body_parser_stream');\nvar logfmtParser = require('./lib/logfmt_parser');\nvar logger = require('./lib/logger');\nvar requestLogger = require('./lib/request_logger');\nvar serializer = require('./lib/stringify');\n\n//Build up logfmt prototype\nObject.assign(logfmt.prototype, logger);\nObject.assign(logfmt.prototype, streaming);\n\nlogfmt.prototype.stringify = serializer.stringify;\nlogfmt.prototype.parse = logfmtParser.parse;\n\n// Synchronous body parser\nlogfmt.prototype.bodyParser = function(options) {\n options || (options = {});\n var mime = options.contentType || \"application/logplex-1\";\n return bodyParser({ contentType: mime, parser: this.parse });\n};\n\n// Stream parser\nlogfmt.prototype.bodyParserStream = function(options) {\n options || (options = {});\n var mime = options.contentType || \"application/logplex-1\";\n return bodyParserStream({ contentType: mime });\n};\n\nlogfmt.prototype.requestLogger = function(options, formatter) {\n return requestLogger.init(this, options, formatter);\n};\n\nlogfmt.prototype.requestLogger.commonFormatter = requestLogger.commonFormatter;\n\nObject.assign(logfmt, logfmt.prototype);\n","//filter will reemit the data if cb(err,pass) pass is truthy\n\n// reduce is more tricky\n// maybe we want to group the reductions or emit progress updates occasionally\n// the most basic reduce just emits one 'data' event after it has recieved 'end'\n\n\nvar through = require('through')\nvar Decoder = require('string_decoder').StringDecoder\n\nmodule.exports = split\n\n//TODO pass in a function to map across the lines.\n\nfunction split (matcher, mapper) {\n var decoder = new Decoder()\n var soFar = ''\n if('function' === typeof matcher)\n mapper = matcher, matcher = null\n if (!matcher)\n matcher = /\\r?\\n/\n\n function emit(stream, piece) {\n if(mapper) {\n try {\n piece = mapper(piece)\n }\n catch (err) {\n return stream.emit('error', err)\n }\n if('undefined' !== typeof piece)\n stream.queue(piece)\n }\n else\n stream.queue(piece)\n }\n\n function next (stream, buffer) { \n var pieces = (soFar + buffer).split(matcher)\n soFar = pieces.pop()\n\n for (var i = 0; i < pieces.length; i++) {\n var piece = pieces[i]\n emit(stream, piece)\n }\n }\n\n return through(function (b) {\n next(this, decoder.write(b))\n },\n function () {\n if(decoder.end) \n next(this, decoder.end())\n if(soFar != null)\n emit(this, soFar)\n this.queue(null)\n })\n}\n\n","var Stream = require('stream')\n\n// through\n//\n// a stream that does nothing but re-emit the input.\n// useful for aggregating a series of changing but not ending streams into one stream)\n\nexports = module.exports = through\nthrough.through = through\n\n//create a readable writable stream.\n\nfunction through (write, end, opts) {\n write = write || function (data) { this.queue(data) }\n end = end || function () { this.queue(null) }\n\n var ended = false, destroyed = false, buffer = [], _ended = false\n var stream = new Stream()\n stream.readable = stream.writable = true\n stream.paused = false\n\n// stream.autoPause = !(opts && opts.autoPause === false)\n stream.autoDestroy = !(opts && opts.autoDestroy === false)\n\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = stream.push = function (data) {\n// console.error(ended)\n if(_ended) return stream\n if(data === null) _ended = true\n buffer.push(data)\n drain()\n return stream\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable && stream.autoDestroy)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable && stream.autoDestroy)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n return stream\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n return stream\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n return stream\n }\n\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n stream.emit('resume')\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n return stream\n }\n return stream\n}\n\n"],"names":["getNonOverlappingDuration","ranges","sort","a","b","reduce","acc","range","length","tail","slice","prevStart","prevEnd","start","end","makeSpanMap","getSpan","spanMap","span","index","id","children","parentId","parentIds","push","undefined","getStats","duration","traceDuration","selfDuration","main","toFixedNoTrailingZeros","secondary","n","parseFloat","toFixed","makeFrames","MutableDataFrame","fields","name","Fields","type","FieldType","config","displayName","color","mode","meta","preferredVisualisationType","convertTagsLogfmt","tags","data","logfmt","Object","keys","forEach","key","value","String","JSON","stringify","transformToLogfmt","parse","durationPlaceholder","AdvancedOptions","query","onChange","showAdvancedOptions","setShowAdvancedOptions","useState","styles","useStyles","getStyles","InlineFieldRow","className","advancedOptionsContainer","onClick","InlineLabel","as","Icon","angleUp","angleDown","CSSTransition","in","mountOnEnter","unmountOnExit","timeout","classNames","InlineField","label","labelWidth","grow","Input","minDuration","placeholder","v","currentTarget","maxDuration","tooltip","limit","parseInt","theme","css","spacing","xs","enter","enterActive","exit","exitActive","allOperationsOption","SearchForm","datasource","serviceOptions","setServiceOptions","operationOptions","setOperationOptions","isLoading","setIsLoading","services","operations","loadOptions","useCallback","async","url","loaderOfType","prevValue","values","metadataRequest","options","map","option","filter","item","fuzzyMatch","found","error","dispatch","notifyApp","createErrorNotification","useEffect","getServices","service","encodeURIComponent","getOperations","maxWidth","Select","inputId","onOpenMenu","find","operation","menuPlacement","isClearable","disabled","createGraphFrames","nodes","edges","spans","traceEndTime","traceStartTime","Infinity","startTime","findTraceDuration","spanID","references","r","refType","process","processes","processID","c","childrenDuration","stats","serviceName","operationName","parentSpanID","convertTraceToGraph","nodesFrame","edgesFrame","node","add","edge","JaegerDatasource","DataSourceApi","constructor","instanceSettings","timeSrv","getTimeSrv","super","this","nodeGraph","jsonData","params","lastValueFrom","_request","hideFromInspector","target","targets","of","emptyTraceDataFrame","queryType","getTemplateSrv","replace","scopedVars","pipe","response","traceData","createTraceFrame","enabled","uploadedJson","message","jaegerQuery","pick","pickBy","identity","omit","getTimeRange","lookback","createTableFrame","res","status","catchError","err","statusText","timeRange","getTime","from","to","getQueryDisplayText","apiUrl","serializeParams","req","getBackendSrv","fetch","date","roundUp","dateMath","valueOf","custom","traceFormat","plugin","DataSourcePlugin","setConfigEditor","onOptionsChange","DataSourceHttpSettings","defaultUrl","dataSourceConfig","showAccessOptions","TraceToLogsSettings","TraceToMetricsSettings","NodeGraphSettings","setQueryEditor","onRunQuery","useTheme2","onChangeQuery","nextQuery","width","RadioButtonGroup","size","padding","FileDropzone","multiple","onLoad","result","QueryField","onBlur","portalOrigin","renderEditorBody","s","toSpanRow","traceID","logs","l","timestamp","warnings","stackTraces","serviceTags","frame","unit","displayNameFromDS","links","title","internal","datasourceUid","uid","datasourceName","transformToTraceData","trace","transformTraceData","traceName","transformToJaeger","traceResponse","i","get","p","flags","total","offset","errors","module","exports","next","_body","header","contentType","body","buf","setEncoding","on","chunk","lines","trim","split","line","parser","PassThrough","mime","objectMode","streamParser","debug","in_key","in_value","in_quote","had_quote","object","console","log","stream","stdout","logData","assign","defaultData","timers","now","Date","toString","write","time","timer","namespace","namespaced","maxErrorLines","Math","random","errorLogger","toISOString","stack","commonFormatter","path","originalUrl","httpHeader","requestID","requestData","ip","connection","remoteAddress","method","statusCode","request_id","content_length","content_type","init","logger","formatter","immediate","immediateLogger","elapsed","encoding","timingLogger","through","self","logfmtStream","queue","source","unpipe","transformStream","destination","streamStringify","hasOwnProperty","delim","delimiter","is_null","needs_quoting","indexOf","substring","streaming","bodyParser","bodyParserStream","logfmtParser","requestLogger","serializer","prototype","Decoder","matcher","mapper","decoder","soFar","emit","piece","buffer","pieces","pop","Stream","opts","ended","destroyed","_ended","drain","paused","shift","_end","writable","call","readable","autoDestroy","destroy","nextTick","arguments","pause","resume"],"sourceRoot":""}