mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[APM] Improve synthtrace environment (#137697)
This commit is contained in:
parent
e264a7f406
commit
db882a06d6
6 changed files with 24 additions and 5 deletions
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
|
||||
export function getSynthtraceEnvironment(filename: string) {
|
||||
return `Synthtrace: ${path.parse(filename).name}`;
|
||||
}
|
|
@ -11,8 +11,9 @@ import { ApmFields } from '../lib/apm/apm_fields';
|
|||
import { Scenario } from '../cli/scenario';
|
||||
import { getLogger } from '../cli/utils/get_common_services';
|
||||
import { RunOptions } from '../cli/utils/parse_run_cli_flags';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
|
||||
const ENVIRONMENT = __filename;
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
|
||||
const logger = getLogger(runOptions);
|
||||
|
|
|
@ -13,8 +13,9 @@ import { Instance } from '../lib/apm/instance';
|
|||
import { Scenario } from '../cli/scenario';
|
||||
import { getLogger } from '../cli/utils/get_common_services';
|
||||
import { RunOptions } from '../cli/utils/parse_run_cli_flags';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
|
||||
const ENVIRONMENT = __filename;
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
|
||||
const logger = getLogger(runOptions);
|
||||
|
|
|
@ -7,14 +7,16 @@
|
|||
*/
|
||||
|
||||
import { random } from 'lodash';
|
||||
|
||||
import { apm, timerange } from '..';
|
||||
import { Instance } from '../lib/apm/instance';
|
||||
import { Scenario } from '../cli/scenario';
|
||||
import { getLogger } from '../cli/utils/get_common_services';
|
||||
import { RunOptions } from '../cli/utils/parse_run_cli_flags';
|
||||
import { ApmFields } from '../lib/apm/apm_fields';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
|
||||
const ENVIRONMENT = __filename;
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
|
||||
const logger = getLogger(runOptions);
|
||||
|
|
|
@ -12,8 +12,9 @@ import { Instance } from '../lib/apm/instance';
|
|||
import { Scenario } from '../cli/scenario';
|
||||
import { getLogger } from '../cli/utils/get_common_services';
|
||||
import { RunOptions } from '../cli/utils/parse_run_cli_flags';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
|
||||
const ENVIRONMENT = __filename;
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
|
||||
const logger = getLogger(runOptions);
|
||||
|
|
|
@ -10,8 +10,9 @@ import { compact, shuffle } from 'lodash';
|
|||
import { apm, ApmFields, EntityArrayIterable, timerange } from '..';
|
||||
import { generateLongId, generateShortId } from '../lib/utils/generate_id';
|
||||
import { Scenario } from '../cli/scenario';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
|
||||
const ENVIRONMENT = __filename;
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
function generateExternalSpanLinks() {
|
||||
// randomly creates external span links 0 - 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue