Skip to content

Commit

Permalink
move SpanId to separate file
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <[email protected]>
  • Loading branch information
joshuali925 committed Feb 12, 2024
1 parent 8aea356 commit d2405b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
14 changes: 14 additions & 0 deletions common/types/trace_analytics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export type SpanField =
| 'SPAN_ID'
| 'PARENT_SPAN_ID'
| 'SERVICE'
| 'OPERATION'
| 'DURATION'
| 'START_TIME'
| 'END_TIME'
| 'ERRORS';
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,12 @@ import moment from 'moment';
import React, { useEffect, useState } from 'react';
import { HttpSetup } from '../../../../../../../src/core/public';
import { TRACE_ANALYTICS_DATE_FORMAT } from '../../../../../common/constants/trace_analytics';
import { SpanField } from '../../../../../common/types/trace_analytics';
import { TraceAnalyticsMode } from '../../home';
import { handleSpansFlyoutRequest } from '../../requests/traces_request_handler';
import { microToMilliSec, nanoToMilliSec } from '../common/helper_functions';
import { FlyoutListItem } from './flyout_list_item';

type SpanField =
| 'SPAN_ID'
| 'PARENT_SPAN_ID'
| 'SERVICE'
| 'OPERATION'
| 'DURATION'
| 'START_TIME'
| 'END_TIME'
| 'ERRORS';

const MODE_TO_FIELDS: Record<TraceAnalyticsMode, Record<SpanField, string | undefined>> = {
data_prepper: {
SPAN_ID: 'spanId',
Expand Down

0 comments on commit d2405b7

Please sign in to comment.