mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[APM] Add 'unknown' to EventOutcome (#112077)
This commit is contained in:
parent
ef16b6a732
commit
6ea75f564c
6 changed files with 18 additions and 6 deletions
|
@ -304,7 +304,7 @@ exports[`Span ERROR_LOG_MESSAGE 1`] = `undefined`;
|
|||
|
||||
exports[`Span ERROR_PAGE_URL 1`] = `undefined`;
|
||||
|
||||
exports[`Span EVENT_OUTCOME 1`] = `undefined`;
|
||||
exports[`Span EVENT_OUTCOME 1`] = `"unknown"`;
|
||||
|
||||
exports[`Span FCP_FIELD 1`] = `undefined`;
|
||||
|
||||
|
@ -541,7 +541,7 @@ exports[`Transaction ERROR_LOG_MESSAGE 1`] = `undefined`;
|
|||
|
||||
exports[`Transaction ERROR_PAGE_URL 1`] = `undefined`;
|
||||
|
||||
exports[`Transaction EVENT_OUTCOME 1`] = `undefined`;
|
||||
exports[`Transaction EVENT_OUTCOME 1`] = `"unknown"`;
|
||||
|
||||
exports[`Transaction FCP_FIELD 1`] = `undefined`;
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ describe('Transaction', () => {
|
|||
provider: 'gcp',
|
||||
region: 'europe-west1',
|
||||
},
|
||||
event: { outcome: 'unknown' },
|
||||
http: {
|
||||
request: { method: 'GET' },
|
||||
response: { status_code: 200 },
|
||||
|
@ -87,6 +88,7 @@ describe('Span', () => {
|
|||
provider: 'gcp',
|
||||
region: 'europe-west1',
|
||||
},
|
||||
event: { outcome: 'unknown' },
|
||||
processor: {
|
||||
name: 'transaction',
|
||||
event: 'span',
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
import React from 'react';
|
||||
import { EuiBadge, EuiToolTip } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { EventOutcome } from '../../../../../../../typings/es_schemas/raw/fields/event_outcome';
|
||||
import { useTheme } from '../../../../../../hooks/use_theme';
|
||||
|
||||
import { euiStyled } from '../../../../../../../../../../src/plugins/kibana_react/common';
|
||||
|
||||
const ResetLineHeight = euiStyled.span`
|
||||
line-height: initial;
|
||||
`;
|
||||
|
||||
export function FailureBadge({ outcome }: { outcome?: 'success' | 'failure' }) {
|
||||
export function FailureBadge({ outcome }: { outcome?: EventOutcome }) {
|
||||
const theme = useTheme();
|
||||
|
||||
if (outcome !== 'failure') {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export type EventOutcome = 'success' | 'failure' | 'unknown';
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import { APMBaseDoc } from './apm_base_doc';
|
||||
import { EventOutcome } from './fields/event_outcome';
|
||||
import { Stackframe } from './fields/stackframe';
|
||||
import { TimestampUs } from './fields/timestamp_us';
|
||||
|
||||
|
@ -17,7 +18,7 @@ interface Processor {
|
|||
export interface SpanRaw extends APMBaseDoc {
|
||||
processor: Processor;
|
||||
trace: { id: string }; // trace is required
|
||||
event?: { outcome?: 'success' | 'failure' };
|
||||
event?: { outcome?: EventOutcome };
|
||||
service: {
|
||||
name: string;
|
||||
environment?: string;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import { APMBaseDoc } from './apm_base_doc';
|
||||
import { Cloud } from './fields/cloud';
|
||||
import { Container } from './fields/container';
|
||||
import { EventOutcome } from './fields/event_outcome';
|
||||
import { Host } from './fields/host';
|
||||
import { Http } from './fields/http';
|
||||
import { Kubernetes } from './fields/kubernetes';
|
||||
|
@ -28,7 +29,7 @@ export interface TransactionRaw extends APMBaseDoc {
|
|||
processor: Processor;
|
||||
timestamp: TimestampUs;
|
||||
trace: { id: string }; // trace is required
|
||||
event?: { outcome?: 'success' | 'failure' };
|
||||
event?: { outcome?: EventOutcome };
|
||||
transaction: {
|
||||
duration: { us: number };
|
||||
id: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue