[Feature] synthtrace APM intake v2 output (#136530)

This commit is contained in:
Martijn Laarman 2022-09-06 19:00:17 +02:00 committed by GitHub
parent 0d3e4fa5e8
commit c008f0ceee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 2545 additions and 47 deletions

View file

@ -446,6 +446,7 @@
"deep-freeze-strict": "^1.1.1",
"deepmerge": "^4.2.2",
"del": "^6.1.0",
"elastic-apm-http-client": "^11.0.1",
"elastic-apm-node": "^3.38.0",
"email-addresses": "^5.0.0",
"execa": "^4.0.2",

View file

@ -47,6 +47,7 @@ RUNTIME_DEPS = [
"@npm//yargs",
"@npm//node-fetch",
"@npm//semver",
"@npm//elastic-apm-http-client",
]
TYPES_DEPS = [

View file

@ -32,6 +32,11 @@ function options(y: Argv) {
describe: 'Kibana target, used to bootstrap datastreams/mappings/templates/settings',
string: true,
})
.option('apm', {
describe:
'APM Server target. Send data to APM over the intake API instead of generating ES documents',
string: true,
})
.option('cloudId', {
describe:
'Provide connection information and will force APM on the cloud to migrate to run as a Fleet integration',
@ -98,6 +103,11 @@ function options(y: Argv) {
describe: 'Force writing to legacy indices',
boolean: true,
})
.option('skipPackageInstall', {
describe: 'Skip automatically installing the package',
boolean: true,
default: false,
})
.option('scenarioOpts', {
describe: 'Options specific to the scenario',
coerce: (arg) => {
@ -144,7 +154,7 @@ export function runSynthtrace() {
const runOptions = parseRunCliFlags(argv);
const { logger, apmEsClient } = getCommonServices(runOptions);
const { logger, apmEsClient, apmIntakeClient } = getCommonServices(runOptions);
const toMs = datemath.parse(String(argv.to ?? 'now'))!.valueOf();
const to = new Date(toMs);
@ -181,12 +191,14 @@ export function runSynthtrace() {
kibanaUrl = await kibanaClient.discoverLocalKibana();
}
if (!kibanaUrl) throw Error('kibanaUrl could not be determined');
await kibanaClient.installApmPackage(
kibanaUrl,
version,
runOptions.username,
runOptions.password
);
if (!argv.skipPackageInstall) {
await kibanaClient.installApmPackage(
kibanaUrl,
version,
runOptions.username,
runOptions.password
);
}
}
}
@ -210,7 +222,11 @@ export function runSynthtrace() {
}
}
if (argv.clean) {
await apmEsClient.clean(aggregators.map((a) => a.getDataStreamName() + '-*'));
if (argv.apm) {
await apmEsClient.clean(['metrics-apm.service-*']);
} else {
await apmEsClient.clean(aggregators.map((a) => a.getDataStreamName() + '-*'));
}
}
if (runOptions.gcpRepository) {
await apmEsClient.registerGcpRepository(runOptions.gcpRepository);
@ -234,7 +250,7 @@ export function runSynthtrace() {
await startHistoricalDataUpload(apmEsClient, logger, runOptions, from, to, version);
if (live) {
await startLiveDataUpload(apmEsClient, logger, runOptions, to, version);
await startLiveDataUpload(apmEsClient, apmIntakeClient, logger, runOptions, to, version);
}
}
)

View file

@ -7,6 +7,7 @@
*/
import { Client, ClientOptions } from '@elastic/elasticsearch';
import { ApmSynthtraceApmClient } from '../../lib/apm/client/apm_synthtrace_apm_client';
import { ApmSynthtraceEsClient } from '../../lib/apm/client/apm_synthtrace_es_client';
import { createLogger, Logger } from '../../lib/utils/create_logger';
import { RunOptions } from './parse_run_cli_flags';
@ -16,7 +17,7 @@ export function getLogger({ logLevel }: RunOptions) {
}
export function getCommonServices(
{ target, cloudId, username, password, logLevel, forceLegacyIndices }: RunOptions,
{ target, cloudId, apm, username, password, logLevel, forceLegacyIndices }: RunOptions,
logger?: Logger
) {
if (!target && !cloudId) {
@ -44,10 +45,12 @@ export function getCommonServices(
forceLegacyIndices,
refreshAfterIndex: false,
});
const apmIntakeClient = apm ? new ApmSynthtraceApmClient(apm, logger) : null;
return {
logger,
apmEsClient,
apmIntakeClient,
};
}

View file

@ -66,6 +66,7 @@ export function parseRunCliFlags(flags: RunCliFlags) {
'maxDocs',
'maxDocsConfidence',
'target',
'apm',
'cloudId',
'username',
'password',

View file

@ -211,7 +211,7 @@ export async function startHistoricalDataUpload(
return Promise.all(workers.map((worker) => limiter(() => worker())))
.then(async () => {
if (!runOptions.dryRun) {
await esClient.refresh();
await esClient.refresh(runOptions.apm ? ['metrics-apm.service-*'] : []);
}
})
.then(() => {

View file

@ -14,9 +14,11 @@ import { ApmSynthtraceEsClient } from '../../lib/apm';
import { Logger } from '../../lib/utils/create_logger';
import { EntityArrayIterable } from '../../lib/entity_iterable';
import { StreamProcessor } from '../../lib/stream_processor';
import { ApmSynthtraceApmClient } from '../../lib/apm/client/apm_synthtrace_apm_client';
export async function startLiveDataUpload(
esClient: ApmSynthtraceEsClient,
apmIntakeClient: ApmSynthtraceApmClient | null,
logger: Logger,
runOptions: RunOptions,
start: Date,
@ -41,7 +43,7 @@ export async function startLiveDataUpload(
generate({ from: bucketFrom, to: bucketTo }).toArray()
);
logger.debug(
logger.info(
`Requesting ${new Date(bucketFrom).toISOString()} to ${new Date(
bucketTo
).toISOString()}, events: ${nextEvents.length}`
@ -65,18 +67,20 @@ export async function startLiveDataUpload(
maxSourceEvents: runOptions.maxDocs,
name: `Live index`,
});
await logger.perf('index_live_scenario', () =>
esClient.index(
new EntityArrayIterable(eventsToUpload),
{
concurrency: runOptions.workers,
maxDocs: runOptions.maxDocs,
mapToIndex,
dryRun: false,
},
streamProcessor
)
);
await logger.perf('index_live_scenario', async () => {
const events = new EntityArrayIterable(eventsToUpload);
const streamToBulkOptions = {
concurrency: runOptions.workers,
maxDocs: runOptions.maxDocs,
mapToIndex,
dryRun: false,
};
if (apmIntakeClient) {
await apmIntakeClient.index(events, streamToBulkOptions, streamProcessor);
} else {
await esClient.index(events, streamToBulkOptions, streamProcessor);
}
});
}
do {

View file

@ -38,7 +38,7 @@ export interface WorkerData {
const { bucketFrom, bucketTo, runOptions, workerIndex, version } = workerData as WorkerData;
const { logger, apmEsClient } = getCommonServices(runOptions, l);
const { logger, apmEsClient, apmIntakeClient } = getCommonServices(runOptions, l);
const file = runOptions.file;
let scenario: Scenario<Fields>;
let events: EntityIterable<Fields>;
@ -64,10 +64,11 @@ async function setup() {
}
};
const aggregators: StreamAggregator[] = [new ServiceLatencyAggregator()];
// If we are sending data to apm-server we do not have to create any aggregates in the stream processor
streamProcessor = new StreamProcessor({
version,
processors: StreamProcessor.apmProcessors,
streamAggregators: aggregators,
processors: apmIntakeClient ? [] : StreamProcessor.apmProcessors,
streamAggregators: apmIntakeClient ? [] : aggregators,
maxSourceEvents: runOptions.maxDocs,
logger: l,
processedCallback: (processedDocuments) => {
@ -78,10 +79,13 @@ async function setup() {
}
async function doWork() {
await logger.perf(
'index_scenario',
async () => await apmEsClient.index(events, streamToBulkOptions, streamProcessor)
);
await logger.perf('index_scenario', async () => {
if (apmIntakeClient) {
await apmIntakeClient.index(events, streamToBulkOptions, streamProcessor);
} else {
await apmEsClient.index(events, streamToBulkOptions, streamProcessor);
}
});
}
parentPort!.on('message', async (message) => {

View file

@ -0,0 +1,346 @@
/*
* 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 Client from 'elastic-apm-http-client';
import Util from 'util';
import { Logger } from '../../utils/create_logger';
import { ApmFields } from '../apm_fields';
import { EntityIterable } from '../../entity_iterable';
import { StreamProcessor } from '../../stream_processor';
import { EntityStreams } from '../../entity_streams';
import { Fields } from '../../entity';
import { Span } from './intake_v2/span';
import { Error } from './intake_v2/error';
import { Metadata } from './intake_v2/metadata';
import { Transaction } from './intake_v2/transaction';
export interface StreamToBulkOptions<TFields extends Fields = ApmFields> {
concurrency?: number;
// the maximum number of documents to process
maxDocs?: number;
// the number of documents to flush the bulk operation defaults to 10k
flushInterval?: number;
mapToIndex?: (document: Record<string, any>) => string;
dryRun: boolean;
itemStartStopCallback?: (item: TFields | null, done: boolean) => void;
}
export interface ApmSynthtraceApmClientOptions {
forceLegacyIndices?: boolean;
// defaults to true if unspecified
refreshAfterIndex?: boolean;
}
interface ClientState {
client: Client;
enqueued: number;
sendSpan: (s: Span) => Promise<void>;
sendTransaction: (s: Transaction) => Promise<void>;
sendError: (e: Error) => Promise<void>;
flush: (o: any) => Promise<void>;
}
interface ClientStats {
numEvents: number;
numEventsDropped: number;
numEventsEnqueued: number;
numEventsSent: number;
slowWriteBatch: number;
backoffReconnectCount: number;
}
export class ApmSynthtraceApmClient {
private readonly _serviceClients: Map<string, ClientState> = new Map<string, ClientState>();
constructor(
private readonly apmTarget: string,
private readonly logger: Logger,
options?: ApmSynthtraceApmClientOptions
) {}
map(fields: ApmFields): [Span | Transaction, Error[]] {
const set = <T extends keyof ApmFields, K>(
key: T,
context: NonNullable<K>,
setter: (context: NonNullable<K>, value: NonNullable<ApmFields[T]>) => void
) => {
if (fields[key]) {
setter(context, fields[key]!);
}
};
const metadata: Metadata = {
service: {
name: fields['service.name'] ?? 'unknown',
agent: {
name: fields['agent.name'] ?? 'unknown',
version: fields['agent.version'] ?? 'unknown',
},
},
};
const system = (metadata.system = metadata.system ?? {});
const container = (system.container = system.container ?? {});
const kubernetes = (system.kubernetes = system.kubernetes ?? {});
const pod = (kubernetes.pod = kubernetes.pod ?? {});
set('container.id', container, (c, v) => (c.id = v));
set('host.name', system, (c, v) => (c.hostname = v));
set('host.hostname', system, (c, v) => (c.configured_hostname = v));
set('kubernetes.pod.name', pod, (c, v) => (c.name = v));
set('kubernetes.pod.uid', pod, (c, v) => (c.uid = v));
const e: Span | Transaction = fields['span.id']
? {
kind: 'span',
duration: fields['span.duration.us'] ?? 0,
id: fields['span.id'] ?? '',
name: fields['span.name'] ?? 'unknown',
parent_id: fields['parent.id'] ?? '',
type: fields['span.type'] ?? '',
timestamp: Math.trunc((fields['@timestamp'] ?? 0) * 1000),
trace_id: fields['trace.id'] ?? '',
}
: {
kind: 'transaction',
timestamp: Math.trunc((fields['@timestamp'] ?? 0) * 1000),
duration: fields['transaction.duration.us'] ?? 0,
id: fields['transaction.id'] ?? '',
type: fields['transaction.type'] ?? '',
trace_id: fields['trace.id'] ?? '',
span_count: { dropped: null, started: 0 },
};
set('trace.id', e, (c, v) => (c.trace_id = v));
set('parent.id', e, (c, v) => (c.parent_id = v));
set(
'span.links',
e,
(c, v) => (c.links = v.map((l) => ({ span_id: l.span?.id, trace_id: l.span?.id })))
);
e.context = {};
const service = (e.context.service = e.context.service ?? {});
set('service.name', service, (c, v) => (c.name = v));
set('service.version', service, (c, v) => (c.version = v));
set('service.environment', service, (c, v) => (c.environment = v));
const node = (service.node = service.node ?? {});
set('service.node.name', node, (c, v) => (c.configured_name = v));
const agent = (service.agent = service.agent ?? {});
set('agent.name', agent, (c, v) => (c.name = v));
set('agent.version', agent, (c, v) => (c.version = v));
const runtime = (service.runtime = service.runtime ?? {});
set('service.runtime.name', runtime, (c, v) => (c.name = v));
set('service.runtime.version', runtime, (c, v) => (c.version = v));
const framework = (service.framework = service.framework ?? {});
set('service.framework.name', framework, (c, v) => (c.name = v));
set(
'event.outcome',
e,
(c, v) => (c.outcome = v === 'failure' ? 'failure' : v === 'success' ? 'success' : 'unknown')
);
if (e.kind === 'span') {
set('span.duration.us', e, (c, v) => (c.duration = v / 1000));
set('span.type', e, (c, v) => (c.type = v));
set('span.subtype', e, (c, v) => (c.subtype = v));
const destination = (e.context.destination = e.context.destination ?? {});
const destinationService = (destination.service = destination.service ?? { resource: '' });
set('span.destination.service.name', destinationService, (c, v) => (c.name = v));
set('span.destination.service.resource', destinationService, (c, v) => (c.resource = v));
set('span.destination.service.type', destinationService, (c, v) => (c.type = v));
}
if (e.kind === 'transaction') {
set('transaction.name', e, (c, v) => (c.name = v));
set('transaction.type', e, (c, v) => (c.type = v));
set('transaction.id', e, (c, v) => (c.id = v));
set('transaction.duration.us', e, (c, v) => (c.duration = v / 1000));
set('transaction.sampled', e, (c, v) => (c.sampled = v));
}
let errors: Error[] = [];
if (fields['error.id']) {
const exceptions = fields['error.exception'] ?? [];
errors = exceptions.map((ex) => {
const err: Error = {
id: '0',
timestamp: Math.trunc((fields['@timestamp'] ?? 0) * 1000),
context: e.context,
};
set('error.id', err, (c, v) => (c.id = v));
set('parent.id', err, (c, v) => (c.parent_id = v));
set('trace.id', err, (c, v) => (c.trace_id = v));
set('transaction.id', err, (c, v) => (c.transaction_id = v));
set('error.grouping_name', err, (c, v) => (c.culprit = v));
err.exception = {
message: ex.message,
type: 'Exception',
};
if (!err.parent_id) err.parent_id = err.transaction_id ?? err.trace_id;
return err;
});
}
// TODO include event more context
// 'cloud.provider': string;
// 'cloud.project.name': string;
// 'cloud.service.name': string;
// 'cloud.availability_zone': string;
// 'cloud.machine.type': string;
// 'cloud.region': string;
// 'host.os.platform': string;
// 'faas.id': string;
// 'faas.coldstart': boolean;
// 'faas.execution': string;
// 'faas.trigger.type': string;
// 'faas.trigger.request_id': string;
return [e, errors];
}
async index<TFields>(
events: EntityIterable<TFields> | Array<EntityIterable<TFields>>,
options?: StreamToBulkOptions,
streamProcessor?: StreamProcessor
) {
const dataStream = Array.isArray(events) ? new EntityStreams(events) : events;
const sp =
streamProcessor != null
? streamProcessor
: new StreamProcessor({
processors: [],
maxSourceEvents: options?.maxDocs,
logger: this.logger,
});
let yielded = 0;
let fields: ApmFields | null = null;
// intentionally leaks `fields` so it can be pushed to callback events
const sideEffectYield = () =>
sp.streamToDocumentAsync((e) => {
fields = e;
return this.map(e);
}, dataStream);
if (options?.dryRun) {
await this.logger.perf('enumerate_scenario', async () => {
// @ts-ignore
// We just want to enumerate
for await (const item of sideEffectYield()) {
if (yielded === 0) {
options.itemStartStopCallback?.apply(this, [fields, false]);
yielded++;
}
}
options.itemStartStopCallback?.apply(this, [fields, true]);
});
return;
}
const queueSize = 10000;
for await (const [item, _] of sideEffectYield()) {
if (item == null) continue;
const service = item.context?.service?.name ?? 'unknown';
const hostName = fields ? fields['host.name'] : 'unknown';
// TODO evaluate if we really need service specific clients
// const lookup = `${service}::${hostName}`;
const lookup = `constant_key::1`;
if (!this._serviceClients.has(lookup)) {
const client = new Client({
userAgent: `apm-agent-synthtrace/${sp.version}`,
serverUrl: this.apmTarget,
maxQueueSize: queueSize,
bufferWindowSize: queueSize / 2,
serviceName: service,
serviceNodeName: service,
agentName: 'synthtrace',
agentVersion: sp.version,
serviceVersion: item.context?.service?.version ?? sp.version,
frameworkName: item.context?.service?.framework?.name ?? undefined,
frameworkVersion: item.context?.service?.framework?.version ?? undefined,
hostname: hostName,
});
this._serviceClients.set(lookup, {
client,
enqueued: 0,
sendSpan: Util.promisify(client.sendSpan).bind(client),
sendTransaction: Util.promisify(client.sendTransaction).bind(client),
sendError: Util.promisify(client.sendError).bind(client),
flush: Util.promisify(client.flush).bind(client),
});
}
const clientState = this._serviceClients.get(lookup)!;
if (yielded === 0) {
options?.itemStartStopCallback?.apply(this, [fields, false]);
}
if (item.kind === 'span') {
clientState.sendSpan(item);
} else if (item.kind === 'transaction') {
clientState.sendTransaction(item);
}
yielded++;
clientState.enqueued++;
/* TODO finish implementing sending errors
errors.forEach((e) => {
clientState.sendError(e);
clientState.enqueued++;
});*/
if (clientState.enqueued % queueSize === 0) {
this.logger.debug(
` -- ${sp.name} Flushing client: ${lookup} after enqueueing ${clientState.enqueued}`
);
await clientState.flush({});
}
}
for (const [, state] of this._serviceClients) {
await state.flush({});
}
// this attempts to group similar service names together for cleaner reporting
const totals = Array.from(this._serviceClients).reduce((p, c, i, a) => {
const serviceName = c[0].split('::')[0].replace(/-\d+$/, '');
if (!p.has(serviceName)) {
p.set(serviceName, { enqueued: 0, sent: 0, names: new Set<string>() });
}
const s = p.get(serviceName)!;
s.enqueued += c[1].enqueued;
s.sent += c[1].client.sent;
s.names.add(c[0]);
const stats = c[1].client._getStats();
if (!s.stats) {
s.stats = stats;
} else {
s.stats.backoffReconnectCount += stats.backoffReconnectCount;
s.stats.numEvents += stats.numEvents;
s.stats.numEventsSent += stats.numEventsSent;
s.stats.numEventsDropped += stats.numEventsDropped;
s.stats.numEventsEnqueued += stats.numEventsEnqueued;
s.stats.slowWriteBatch += stats.slowWriteBatch;
}
return p;
}, new Map<string, { enqueued: number; sent: number; names: Set<string>; stats?: ClientStats }>());
for (const [serviceGroup, state] of totals) {
// only report details if there is a discrepancy in the bookkeeping of synthtrace and the client
if (
state.stats &&
(state.stats.numEventsDropped > 0 || state.enqueued !== state.stats.numEventsSent)
) {
this.logger.info(
` -- ${serviceGroup} (${state.names.size} services) sent: ${state.sent}, enqueued: ${state.enqueued}`
);
this.logger.info(` -- ${serviceGroup} (${state.names.size} services) client stats`);
this.logger.info(` -- numEvents: ${state.stats.numEvents}`);
this.logger.info(` -- numEventsSent: ${state.stats.numEventsSent}`);
this.logger.info(` -- numEventsEnqueued: ${state.stats.numEventsEnqueued}`);
this.logger.info(` -- numEventsDropped: ${state.stats.numEventsDropped}`);
this.logger.info(` -- backoffReconnectCount: ${state.stats.backoffReconnectCount}`);
this.logger.info(` -- slowWriteBatch: ${state.stats.slowWriteBatch}`);
}
}
options?.itemStartStopCallback?.apply(this, [fields, true]);
}
}

View file

@ -62,7 +62,7 @@ export class ApmSynthtraceEsClient {
async clean(dataStreams?: string[]) {
return this.getWriteTargets().then(async (writeTargets) => {
const indices = Object.values(writeTargets);
this.logger.info(`Attempting to clean: ${indices}`);
this.logger.info(`Attempting to clean: ${indices} + ${dataStreams ?? []}`);
if (this.forceLegacyIndices) {
return cleanWriteTargets({
client: this.client,
@ -132,10 +132,10 @@ export class ApmSynthtraceEsClient {
this.logger.info(verifyRepository);
}
async refresh() {
async refresh(dataStreams?: string[]) {
const writeTargets = await this.getWriteTargets();
const indices = Object.values(writeTargets);
const indices = Object.values(writeTargets).concat(dataStreams ?? []);
this.logger.info(`Indexed all data attempting to refresh: ${indices}`);
return this.client.indices.refresh({

View file

@ -0,0 +1,83 @@
/*
* 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.
*/
// eslint-disable-next-line max-classes-per-file
declare module 'elastic-apm-http-client' {
import EventEmitter from 'events';
class Client extends EventEmitter {
constructor(opts: ClientOptions);
sent: number;
public setExtraMetadata(metadata: import('././intake_v2/metadata').Metadata): void;
public sendSpan(span: import('././intake_v2/span').Span, callback: () => void): void;
public sendTransaction(
transaction: import('././intake_v2/transaction').Transaction,
callback: () => void
): void;
public sendError(error: import('././intake_v2/error').Error, callback: () => void): void;
public flush(opts: FlushOptions, callback: () => void): void;
public destroy(): void;
public _getStats(): ClientStats;
}
interface ClientStats {
numEvents: number;
numEventsDropped: number;
numEventsEnqueued: number;
numEventsSent: number;
slowWriteBatch: number;
backoffReconnectCount: number;
}
interface ClientOptions {
/** (required) The HTTP user agent that your module should identify itself as */
userAgent: string;
/** The Elastic APM intake API secret token */
secretToken?: string;
/** Elastic APM API key */
apiKey?: string;
/** The APM Server URL (default: http://localhost:8200) */
serverUrl: string;
maxQueueSize?: number;
bufferWindowSize?: number;
/** (required) The APM agent name */
agentName: string;
/** (required) The APM agent version */
agentVersion: string;
/** The name of the service being instrumented */
serviceName: string;
/** Unique name of the service being instrumented */
serviceNodeName?: string;
/** The version of the service being instrumented */
serviceVersion?: string;
/** If the service being instrumented is running a specific framework, use this config option to log its name */
frameworkName?: string;
/** If the service being instrumented is running a specific framework, use this config option to log its version */
frameworkVersion?: string;
/** Custom hostname (default: OS hostname) */
hostname?: string;
/** Environment name (default: process.env.NODE_ENV || 'development') */
environment?: string;
/** Docker container id, if not given will be parsed from /proc/self/cgroup */
containerId?: string;
/** Kubernetes node name */
kubernetesNodeName?: string;
/** Kubernetes namespace */
kubernetesNamespace?: string;
/** Kubernetes pod name, if not given will be the hostname */
kubernetesPodName?: string;
/** Kubernetes pod id, if not given will be parsed from /proc/self/cgroup */
kubernetesPodUID?: string;
/** An object of key/value pairs to use to label all data reported (only applied when using APM Server 7.1+) */
globalLabels?: Record<string, string>;
}
class FlushOptions {}
export = Client;
}

View file

@ -0,0 +1,513 @@
/*
* 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.
*/
/**
* errorEvent represents an error or a logged error message, captured by an APM agent in a monitored service.
*/
export interface Error {
/**
* Context holds arbitrary contextual information for the event.
*/
context?: null | {
/**
* Cloud holds fields related to the cloud or infrastructure the events are coming from.
*/
cloud?: null | {
/**
* Origin contains the self-nested field groups for cloud.
*/
origin?: null | {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
*/
account?: null | {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
*/
id?: null | string;
[k: string]: unknown;
};
/**
* Name of the cloud provider.
*/
provider?: null | string;
/**
* Region in which this host, resource, or service is located.
*/
region?: null | string;
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider.
*/
service?: null | {
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider.
*/
name?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Custom can contain additional metadata to be stored with the event. The format is unspecified and can be deeply nested objects. The information will not be indexed or searchable in Elasticsearch.
*/
custom?: null | {
[k: string]: unknown;
};
/**
* Message holds details related to message receiving and publishing if the captured event integrates with a messaging system
*/
message?: null | {
/**
* Age of the message. If the monitored messaging framework provides a timestamp for the message, agents may use it. Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the receiving agent. If a timestamp is not available, agents should omit this field.
*/
age?: null | {
/**
* Age of the message in milliseconds.
*/
ms?: null | number;
[k: string]: unknown;
};
/**
* Body of the received message, similar to an HTTP request body
*/
body?: null | string;
/**
* Headers received with the message, similar to HTTP request headers.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* Queue holds information about the message queue where the message is received.
*/
queue?: null | {
/**
* Name holds the name of the message queue where the message is received.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* RoutingKey holds the optional routing key of the received message as set on the queuing system, such as in RabbitMQ.
*/
routing_key?: null | string;
[k: string]: unknown;
};
/**
* Page holds information related to the current page and page referers. It is only sent from RUM agents.
*/
page?: null | {
/**
* Referer holds the URL of the page that 'linked' to the current page.
*/
referer?: null | string;
/**
* URL of the current page
*/
url?: null | string;
[k: string]: unknown;
};
/**
* Request describes the HTTP request information in case the event was created as a result of an HTTP request.
*/
request?: null | {
/**
* Body only contais the request bod, not the query string information. It can either be a dictionary (for standard HTTP requests) or a raw request body.
*/
body?:
| null
| string
| {
[k: string]: unknown;
};
/**
* Cookies used by the request, parsed as key-value objects.
*/
cookies?: null | {
[k: string]: unknown;
};
/**
* Env holds environment variable information passed to the monitored service.
*/
env?: null | {
[k: string]: unknown;
};
/**
* Headers includes any HTTP headers sent by the requester. Cookies will be taken by headers if supplied.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* HTTPVersion holds information about the used HTTP version.
*/
http_version?: null | string;
/**
* Method holds information about the method of the HTTP request.
*/
method: string;
/**
* Socket holds information related to the recorded request, such as whether or not data were encrypted and the remote address.
*/
socket?: null | {
/**
* Encrypted indicates whether a request was sent as TLS/HTTPS request. DEPRECATED: this field will be removed in a future release.
*/
encrypted?: null | boolean;
/**
* RemoteAddress holds the network address sending the request. It should be obtained through standard APIs and not be parsed from any headers like 'Forwarded'.
*/
remote_address?: null | string;
[k: string]: unknown;
};
/**
* URL holds information sucha as the raw URL, scheme, host and path.
*/
url?: null | {
/**
* Full, possibly agent-assembled URL of the request, e.g. https://example.com:443/search?q=elasticsearch#top.
*/
full?: null | string;
/**
* Hash of the request URL, e.g. 'top'
*/
hash?: null | string;
/**
* Hostname information of the request, e.g. 'example.com'."
*/
hostname?: null | string;
/**
* Path of the request, e.g. '/search'
*/
pathname?: null | string;
/**
* Port of the request, e.g. '443'. Can be sent as string or int.
*/
port?: null | string | number;
/**
* Protocol information for the recorded request, e.g. 'https:'.
*/
protocol?: null | string;
/**
* Raw unparsed URL of the HTTP request line, e.g https://example.com:443/search?q=elasticsearch. This URL may be absolute or relative. For more details, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2.
*/
raw?: null | string;
/**
* Search contains the query string information of the request. It is expected to have values delimited by ampersands.
*/
search?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Response describes the HTTP response information in case the event was created as a result of an HTTP request.
*/
response?: null | {
/**
* DecodedBodySize holds the size of the decoded payload.
*/
decoded_body_size?: null | number;
/**
* EncodedBodySize holds the size of the encoded payload.
*/
encoded_body_size?: null | number;
/**
* Finished indicates whether the response was finished or not.
*/
finished?: null | boolean;
/**
* Headers holds the http headers sent in the http response.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* HeadersSent indicates whether http headers were sent.
*/
headers_sent?: null | boolean;
/**
* StatusCode sent in the http response.
*/
status_code?: null | number;
/**
* TransferSize holds the total size of the payload.
*/
transfer_size?: null | number;
[k: string]: unknown;
};
/**
* Service related information can be sent per event. Information provided here will override the more generic information retrieved from metadata, missing service fields will be retrieved from the metadata information.
*/
service?: null | {
/**
* Agent holds information about the APM agent capturing the event.
*/
agent?: null | {
/**
* EphemeralID is a free format ID used for metrics correlation by agents
*/
ephemeral_id?: null | string;
/**
* Name of the APM agent capturing information.
*/
name?: null | string;
/**
* Version of the APM agent capturing information.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Environment in which the monitored service is running, e.g. `production` or `staging`.
*/
environment?: null | string;
/**
* Framework holds information about the framework used in the monitored service.
*/
framework?: null | {
/**
* Name of the used framework
*/
name?: null | string;
/**
* Version of the used framework
*/
version?: null | string;
[k: string]: unknown;
};
/**
* ID holds a unique identifier for the service.
*/
id?: null | string;
/**
* Language holds information about the programming language of the monitored service.
*/
language?: null | {
/**
* Name of the used programming language
*/
name?: null | string;
/**
* Version of the used programming language
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Name of the monitored service.
*/
name?: null | string;
/**
* Node must be a unique meaningful name of the service node.
*/
node?: null | {
/**
* Name of the service node
*/
configured_name?: null | string;
[k: string]: unknown;
};
/**
* Origin contains the self-nested field groups for service.
*/
origin?: null | {
/**
* Immutable id of the service emitting this event.
*/
id?: null | string;
/**
* Immutable name of the service emitting this event.
*/
name?: null | string;
/**
* The version of the service the data was collected from.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Runtime holds information about the language runtime running the monitored service
*/
runtime?: null | {
/**
* Name of the language runtime
*/
name?: null | string;
/**
* Version of the language runtime
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Target holds information about the outgoing service in case of an outgoing event
*/
target?: (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
(
| ((
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
null)
| (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
)
);
/**
* Version of the monitored service.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Tags are a flat mapping of user-defined tags. On the agent side, tags are called labels. Allowed value types are string, boolean and number values. Tags are indexed and searchable.
*/
tags?: null | {
[k: string]: null | string | boolean | number;
};
/**
* User holds information about the correlated user for this event. If user data are provided here, all user related information from metadata is ignored, otherwise the metadata's user information will be stored with the event.
*/
user?: null | {
/**
* Domain of the logged in user
*/
domain?: null | string;
/**
* Email of the user.
*/
email?: null | string;
/**
* ID identifies the logged in user, e.g. can be the primary key of the user
*/
id?: null | string | number;
/**
* Name of the user.
*/
username?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Culprit identifies the function call which was the primary perpetrator of this event.
*/
culprit?: null | string;
/**
* Exception holds information about the original error. The information is language specific.
*/
exception?: { message: string; type: string };
/**
* ID holds the hex encoded 128 random bits ID of the event.
*/
id: string;
/**
* Log holds additional information added when the error is logged.
*/
log?: null | {
/**
* Level represents the severity of the recorded log.
*/
level?: null | string;
/**
* LoggerName holds the name of the used logger instance.
*/
logger_name?: null | string;
/**
* Message of the logged error. In case a parameterized message is captured, Message should contain the same information, but with any placeholders being replaced.
*/
message: string;
/**
* ParamMessage should contain the same information as Message, but with placeholders where parameters were logged, e.g. 'error connecting to %s'. The string is not interpreted, allowing differnt placeholders per client languange. The information might be used to group errors together.
*/
param_message?: null | string;
/**
* Stacktrace information of the captured error.
*/
stacktrace?: null | Array<
| {
classname: string;
[k: string]: unknown;
}
| {
filename: string;
[k: string]: unknown;
}
>;
};
/**
* ParentID holds the hex encoded 64 random bits ID of the parent transaction or span.
*/
parent_id?: null | string;
/**
* Timestamp holds the recorded time of the event, UTC based and formatted as microseconds since Unix epoch.
*/
timestamp?: null | number;
/**
* TraceID holds the hex encoded 128 random bits ID of the correlated trace.
*/
trace_id?: null | string;
/**
* Transaction holds information about the correlated transaction.
*/
transaction?: null | {
/**
* Name is the generic designation of a transaction in the scope of a single service, eg: 'GET /users/:id'.
*/
name?: null | string;
/**
* Sampled indicates whether or not the full information for a transaction is captured. If a transaction is unsampled no spans and less context information will be reported.
*/
sampled?: null | boolean;
/**
* Type expresses the correlated transaction's type as keyword that has specific relevance within the service's domain, eg: 'request', 'backgroundjob'.
*/
type?: null | string;
};
/**
* TransactionID holds the hex encoded 64 random bits ID of the correlated transaction.
*/
transaction_id?: null | string;
}

View file

@ -0,0 +1,312 @@
/*
* 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.
*/
export interface Metadata {
/**
* Cloud metadata about where the monitored service is running.
*/
cloud?: null | {
/**
* Account where the monitored service is running.
*/
account?: null | {
/**
* ID of the cloud account.
*/
id?: null | string;
/**
* Name of the cloud account.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* AvailabilityZone where the monitored service is running, e.g. us-east-1a
*/
availability_zone?: null | string;
/**
* Instance on which the monitored service is running.
*/
instance?: null | {
/**
* ID of the cloud instance.
*/
id?: null | string;
/**
* Name of the cloud instance.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* Machine on which the monitored service is running.
*/
machine?: null | {
/**
* ID of the cloud machine.
*/
type?: null | string;
[k: string]: unknown;
};
/**
* Project in which the monitored service is running.
*/
project?: null | {
/**
* ID of the cloud project.
*/
id?: null | string;
/**
* Name of the cloud project.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* Provider that is used, e.g. aws, azure, gcp, digitalocean.
*/
provider: string;
/**
* Region where the monitored service is running, e.g. us-east-1
*/
region?: null | string;
/**
* Service that is monitored on cloud
*/
service?: null | {
/**
* Name of the cloud service, intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
*/
name?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Labels are a flat mapping of user-defined tags. Allowed value types are string, boolean and number values. Labels are indexed and searchable.
*/
labels?: null | {
[k: string]: null | string | boolean | number;
};
/**
* Network holds information about the network over which the monitored service is communicating.
*/
network?: null | {
connection?: null | {
type?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Process metadata about the monitored service.
*/
process?: null | {
/**
* Argv holds the command line arguments used to start this process.
*/
argv?: null | string[];
/**
* PID holds the process ID of the service.
*/
pid: number;
/**
* Ppid holds the parent process ID of the service.
*/
ppid?: null | number;
/**
* Title is the process title. It can be the same as process name.
*/
title?: null | string;
[k: string]: unknown;
};
/**
* Service metadata about the monitored service.
*/
service: {
/**
* Agent holds information about the APM agent capturing the event.
*/
agent: {
/**
* EphemeralID is a free format ID used for metrics correlation by agents
*/
ephemeral_id?: null | string;
/**
* Name of the APM agent capturing information.
*/
name: string;
/**
* Version of the APM agent capturing information.
*/
version: string;
[k: string]: unknown;
};
/**
* Environment in which the monitored service is running, e.g. `production` or `staging`.
*/
environment?: null | string;
/**
* Framework holds information about the framework used in the monitored service.
*/
framework?: null | {
/**
* Name of the used framework
*/
name?: null | string;
/**
* Version of the used framework
*/
version?: null | string;
[k: string]: unknown;
};
/**
* ID holds a unique identifier for the running service.
*/
id?: null | string;
/**
* Language holds information about the programming language of the monitored service.
*/
language?: null | {
/**
* Name of the used programming language
*/
name: string;
/**
* Version of the used programming language
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Name of the monitored service.
*/
name: string;
/**
* Node must be a unique meaningful name of the service node.
*/
node?: null | {
/**
* Name of the service node
*/
configured_name?: null | string;
[k: string]: unknown;
};
/**
* Runtime holds information about the language runtime running the monitored service
*/
runtime?: null | {
/**
* Name of the language runtime
*/
name: string;
/**
* Name of the language runtime
*/
version: string;
[k: string]: unknown;
};
/**
* Version of the monitored service.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* System metadata
*/
system?: null | {
/**
* Architecture of the system the monitored service is running on.
*/
architecture?: null | string;
/**
* ConfiguredHostname is the configured name of the host the monitored service is running on. It should only be sent when configured by the user. If given, it is used as the event's hostname.
*/
configured_hostname?: null | string;
/**
* Container holds the system's container ID if available.
*/
container?: null | {
/**
* ID of the container the monitored service is running in.
*/
id?: null | string;
[k: string]: unknown;
};
/**
* DetectedHostname is the hostname detected by the APM agent. It usually contains what the hostname command returns on the host machine. It will be used as the event's hostname if ConfiguredHostname is not present.
*/
detected_hostname?: null | string;
/**
* Deprecated: Use ConfiguredHostname and DetectedHostname instead. DeprecatedHostname is the host name of the system the service is running on. It does not distinguish between configured and detected hostname and therefore is deprecated and only used if no other hostname information is available.
*/
hostname?: null | string;
/**
* Kubernetes system information if the monitored service runs on Kubernetes.
*/
kubernetes?: null | {
/**
* Namespace of the Kubernetes resource the monitored service is run on.
*/
namespace?: null | string;
/**
* Node related information
*/
node?: null | {
/**
* Name of the Kubernetes Node
*/
name?: null | string;
[k: string]: unknown;
};
/**
* Pod related information
*/
pod?: null | {
/**
* Name of the Kubernetes Pod
*/
name?: null | string;
/**
* UID is the system-generated string uniquely identifying the Pod.
*/
uid?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Platform name of the system platform the monitored service is running on.
*/
platform?: null | string;
[k: string]: unknown;
};
/**
* User metadata, which can be overwritten on a per event basis.
*/
user?: null | {
/**
* Domain of the logged in user
*/
domain?: null | string;
/**
* Email of the user.
*/
email?: null | string;
/**
* ID identifies the logged in user, e.g. can be the primary key of the user
*/
id?: null | string | number;
/**
* Name of the user.
*/
username?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
}

View file

@ -0,0 +1,447 @@
/*
* 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.
*/
export interface Span {
kind: 'span';
/**
* Action holds the specific kind of event within the sub-type represented by the span (e.g. query, connect)
*/
action?: null | string;
/**
* ChildIDs holds a list of successor transactions and/or spans.
*/
child_ids?: null | string[];
/**
* Composite holds details on a group of spans represented by a single one.
*/
composite?: null | {
/**
* A string value indicating which compression strategy was used. The valid values are `exact_match` and `same_kind`.
*/
compression_strategy: string;
/**
* Count is the number of compressed spans the composite span represents. The minimum count is 2, as a composite span represents at least two spans.
*/
count: number;
/**
* Sum is the durations of all compressed spans this composite span represents in milliseconds.
*/
sum: number;
[k: string]: unknown;
};
/**
* Context holds arbitrary contextual information for the event.
*/
context?: null | {
/**
* Database contains contextual data for database spans
*/
db?: null | {
/**
* Instance name of the database.
*/
instance?: null | string;
/**
* Link to the database server.
*/
link?: null | string;
/**
* RowsAffected shows the number of rows affected by the statement.
*/
rows_affected?: null | number;
/**
* Statement of the recorded database event, e.g. query.
*/
statement?: null | string;
/**
* Type of the recorded database event., e.g. sql, cassandra, hbase, redis.
*/
type?: null | string;
/**
* User is the username with which the database is accessed.
*/
user?: null | string;
[k: string]: unknown;
};
/**
* Destination contains contextual data about the destination of spans
*/
destination?: null | {
/**
* Address is the destination network address: hostname (e.g. 'localhost'), FQDN (e.g. 'elastic.co'), IPv4 (e.g. '127.0.0.1') IPv6 (e.g. '::1')
*/
address?: null | string;
/**
* Port is the destination network port (e.g. 443)
*/
port?: null | number;
/**
* Service describes the destination service
*/
service?: null | {
/**
* Name is the identifier for the destination service, e.g. 'http://elastic.co', 'elasticsearch', 'rabbitmq' ( DEPRECATED: this field will be removed in a future release
*/
name?: null | string;
/**
* Resource identifies the destination service resource being operated on e.g. 'http://elastic.co:80', 'elasticsearch', 'rabbitmq/queue_name' DEPRECATED: this field will be removed in a future release
*/
resource: string;
/**
* Type of the destination service, e.g. db, elasticsearch. Should typically be the same as span.type. DEPRECATED: this field will be removed in a future release
*/
type?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* HTTP contains contextual information when the span concerns an HTTP request.
*/
http?: null | {
/**
* Method holds information about the method of the HTTP request.
*/
method?: null | string;
/**
* Response describes the HTTP response information in case the event was created as a result of an HTTP request.
*/
response?: null | {
/**
* DecodedBodySize holds the size of the decoded payload.
*/
decoded_body_size?: null | number;
/**
* EncodedBodySize holds the size of the encoded payload.
*/
encoded_body_size?: null | number;
/**
* Headers holds the http headers sent in the http response.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* StatusCode sent in the http response.
*/
status_code?: null | number;
/**
* TransferSize holds the total size of the payload.
*/
transfer_size?: null | number;
[k: string]: unknown;
};
/**
* Deprecated: Use Response.StatusCode instead. StatusCode sent in the http response.
*/
status_code?: null | number;
/**
* URL is the raw url of the correlating HTTP request.
*/
url?: null | string;
[k: string]: unknown;
};
/**
* Message holds details related to message receiving and publishing if the captured event integrates with a messaging system
*/
message?: null | {
/**
* Age of the message. If the monitored messaging framework provides a timestamp for the message, agents may use it. Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the receiving agent. If a timestamp is not available, agents should omit this field.
*/
age?: null | {
/**
* Age of the message in milliseconds.
*/
ms?: null | number;
[k: string]: unknown;
};
/**
* Body of the received message, similar to an HTTP request body
*/
body?: null | string;
/**
* Headers received with the message, similar to HTTP request headers.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* Queue holds information about the message queue where the message is received.
*/
queue?: null | {
/**
* Name holds the name of the message queue where the message is received.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* RoutingKey holds the optional routing key of the received message as set on the queuing system, such as in RabbitMQ.
*/
routing_key?: null | string;
[k: string]: unknown;
};
/**
* Service related information can be sent per span. Information provided here will override the more generic information retrieved from metadata, missing service fields will be retrieved from the metadata information.
*/
service?: null | {
/**
* Agent holds information about the APM agent capturing the event.
*/
agent?: null | {
/**
* EphemeralID is a free format ID used for metrics correlation by agents
*/
ephemeral_id?: null | string;
/**
* Name of the APM agent capturing information.
*/
name?: null | string;
/**
* Version of the APM agent capturing information.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Environment in which the monitored service is running, e.g. `production` or `staging`.
*/
environment?: null | string;
/**
* Framework holds information about the framework used in the monitored service.
*/
framework?: null | {
/**
* Name of the used framework
*/
name?: null | string;
/**
* Version of the used framework
*/
version?: null | string;
[k: string]: unknown;
};
/**
* ID holds a unique identifier for the service.
*/
id?: null | string;
/**
* Language holds information about the programming language of the monitored service.
*/
language?: null | {
/**
* Name of the used programming language
*/
name?: null | string;
/**
* Version of the used programming language
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Name of the monitored service.
*/
name?: null | string;
/**
* Node must be a unique meaningful name of the service node.
*/
node?: null | {
/**
* Name of the service node
*/
configured_name?: null | string;
[k: string]: unknown;
};
/**
* Origin contains the self-nested field groups for service.
*/
origin?: null | {
/**
* Immutable id of the service emitting this event.
*/
id?: null | string;
/**
* Immutable name of the service emitting this event.
*/
name?: null | string;
/**
* The version of the service the data was collected from.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Runtime holds information about the language runtime running the monitored service
*/
runtime?: null | {
/**
* Name of the language runtime
*/
name?: null | string;
/**
* Version of the language runtime
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Target holds information about the outgoing service in case of an outgoing event
*/
target?: (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
(
| ((
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
null)
| (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
)
);
/**
* Version of the monitored service.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Tags are a flat mapping of user-defined tags. On the agent side, tags are called labels. Allowed value types are string, boolean and number values. Tags are indexed and searchable.
*/
tags?: null | {
[k: string]: null | string | boolean | number;
};
[k: string]: unknown;
};
/**
* Duration of the span in milliseconds. When the span is a composite one, duration is the gross duration, including "whitespace" in between spans.
*/
duration: number;
/**
* ID holds the hex encoded 64 random bits ID of the event.
*/
id: string;
/**
* Links holds links to other spans, potentially in other traces.
*/
links?: null | Array<{
/**
* SpanID holds the ID of the linked span.
*/
span_id: string;
/**
* TraceID holds the ID of the linked span's trace.
*/
trace_id: string;
[k: string]: unknown;
}>;
/**
* Name is the generic designation of a span in the scope of a transaction.
*/
name: string;
/**
* OTel contains unmapped OpenTelemetry attributes.
*/
otel?: null | {
/**
* Attributes hold the unmapped OpenTelemetry attributes.
*/
attributes?: null | {
[k: string]: unknown;
};
/**
* SpanKind holds the incoming OpenTelemetry span kind.
*/
span_kind?: null | string;
[k: string]: unknown;
};
/**
* Outcome of the span: success, failure, or unknown. Outcome may be one of a limited set of permitted values describing the success or failure of the span. It can be used for calculating error rates for outgoing requests.
*/
outcome?: 'success' | 'failure' | 'unknown' | null;
/**
* ParentID holds the hex encoded 64 random bits ID of the parent transaction or span.
*/
parent_id: string;
/**
* SampleRate applied to the monitored service at the time where this span was recorded.
*/
sample_rate?: null | number;
/**
* Stacktrace connected to this span event.
*/
stacktrace?: null | Array<
| {
classname: string;
[k: string]: unknown;
}
| {
filename: string;
[k: string]: unknown;
}
>;
/**
* Start is the offset relative to the transaction's timestamp identifying the start of the span, in milliseconds.
*/
start?: null | number;
/**
* Subtype is a further sub-division of the type (e.g. postgresql, elasticsearch)
*/
subtype?: null | string;
/**
* Sync indicates whether the span was executed synchronously or asynchronously.
*/
sync?: null | boolean;
/**
* Timestamp holds the recorded time of the event, UTC based and formatted as microseconds since Unix epoch
*/
timestamp?: null | number;
/**
* TraceID holds the hex encoded 128 random bits ID of the correlated trace.
*/
trace_id: string;
/**
* TransactionID holds the hex encoded 64 random bits ID of the correlated transaction.
*/
transaction_id?: null | string;
/**
* Type holds the span's type, and can have specific keywords within the service's domain (eg: 'request', 'backgroundjob', etc)
*/
type: string;
[k: string]: unknown;
}

View file

@ -0,0 +1,661 @@
/*
* 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.
*/
export interface Transaction {
kind: 'transaction';
/**
* Context holds arbitrary contextual information for the event.
*/
context?: null | {
/**
* Cloud holds fields related to the cloud or infrastructure the events are coming from.
*/
cloud?: null | {
/**
* Origin contains the self-nested field groups for cloud.
*/
origin?: null | {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
*/
account?: null | {
/**
* The cloud account or organization id used to identify different entities in a multi-tenant environment.
*/
id?: null | string;
[k: string]: unknown;
};
/**
* Name of the cloud provider.
*/
provider?: null | string;
/**
* Region in which this host, resource, or service is located.
*/
region?: null | string;
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider.
*/
service?: null | {
/**
* The cloud service name is intended to distinguish services running on different platforms within a provider.
*/
name?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Custom can contain additional metadata to be stored with the event. The format is unspecified and can be deeply nested objects. The information will not be indexed or searchable in Elasticsearch.
*/
custom?: null | {
[k: string]: unknown;
};
/**
* Message holds details related to message receiving and publishing if the captured event integrates with a messaging system
*/
message?: null | {
/**
* Age of the message. If the monitored messaging framework provides a timestamp for the message, agents may use it. Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the receiving agent. If a timestamp is not available, agents should omit this field.
*/
age?: null | {
/**
* Age of the message in milliseconds.
*/
ms?: null | number;
[k: string]: unknown;
};
/**
* Body of the received message, similar to an HTTP request body
*/
body?: null | string;
/**
* Headers received with the message, similar to HTTP request headers.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* Queue holds information about the message queue where the message is received.
*/
queue?: null | {
/**
* Name holds the name of the message queue where the message is received.
*/
name?: null | string;
[k: string]: unknown;
};
/**
* RoutingKey holds the optional routing key of the received message as set on the queuing system, such as in RabbitMQ.
*/
routing_key?: null | string;
[k: string]: unknown;
};
/**
* Page holds information related to the current page and page referers. It is only sent from RUM agents.
*/
page?: null | {
/**
* Referer holds the URL of the page that 'linked' to the current page.
*/
referer?: null | string;
/**
* URL of the current page
*/
url?: null | string;
[k: string]: unknown;
};
/**
* Request describes the HTTP request information in case the event was created as a result of an HTTP request.
*/
request?: null | {
/**
* Body only contais the request bod, not the query string information. It can either be a dictionary (for standard HTTP requests) or a raw request body.
*/
body?:
| null
| string
| {
[k: string]: unknown;
};
/**
* Cookies used by the request, parsed as key-value objects.
*/
cookies?: null | {
[k: string]: unknown;
};
/**
* Env holds environment variable information passed to the monitored service.
*/
env?: null | {
[k: string]: unknown;
};
/**
* Headers includes any HTTP headers sent by the requester. Cookies will be taken by headers if supplied.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* HTTPVersion holds information about the used HTTP version.
*/
http_version?: null | string;
/**
* Method holds information about the method of the HTTP request.
*/
method: string;
/**
* Socket holds information related to the recorded request, such as whether or not data were encrypted and the remote address.
*/
socket?: null | {
/**
* Encrypted indicates whether a request was sent as TLS/HTTPS request. DEPRECATED: this field will be removed in a future release.
*/
encrypted?: null | boolean;
/**
* RemoteAddress holds the network address sending the request. It should be obtained through standard APIs and not be parsed from any headers like 'Forwarded'.
*/
remote_address?: null | string;
[k: string]: unknown;
};
/**
* URL holds information sucha as the raw URL, scheme, host and path.
*/
url?: null | {
/**
* Full, possibly agent-assembled URL of the request, e.g. https://example.com:443/search?q=elasticsearch#top.
*/
full?: null | string;
/**
* Hash of the request URL, e.g. 'top'
*/
hash?: null | string;
/**
* Hostname information of the request, e.g. 'example.com'."
*/
hostname?: null | string;
/**
* Path of the request, e.g. '/search'
*/
pathname?: null | string;
/**
* Port of the request, e.g. '443'. Can be sent as string or int.
*/
port?: null | string | number;
/**
* Protocol information for the recorded request, e.g. 'https:'.
*/
protocol?: null | string;
/**
* Raw unparsed URL of the HTTP request line, e.g https://example.com:443/search?q=elasticsearch. This URL may be absolute or relative. For more details, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2.
*/
raw?: null | string;
/**
* Search contains the query string information of the request. It is expected to have values delimited by ampersands.
*/
search?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Response describes the HTTP response information in case the event was created as a result of an HTTP request.
*/
response?: null | {
/**
* DecodedBodySize holds the size of the decoded payload.
*/
decoded_body_size?: null | number;
/**
* EncodedBodySize holds the size of the encoded payload.
*/
encoded_body_size?: null | number;
/**
* Finished indicates whether the response was finished or not.
*/
finished?: null | boolean;
/**
* Headers holds the http headers sent in the http response.
*/
headers?: null | {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "[.*]*$".
*/
[k: string]: null | string[] | string;
};
/**
* HeadersSent indicates whether http headers were sent.
*/
headers_sent?: null | boolean;
/**
* StatusCode sent in the http response.
*/
status_code?: null | number;
/**
* TransferSize holds the total size of the payload.
*/
transfer_size?: null | number;
[k: string]: unknown;
};
/**
* Service related information can be sent per event. Information provided here will override the more generic information retrieved from metadata, missing service fields will be retrieved from the metadata information.
*/
service?: null | {
/**
* Agent holds information about the APM agent capturing the event.
*/
agent?: null | {
/**
* EphemeralID is a free format ID used for metrics correlation by agents
*/
ephemeral_id?: null | string;
/**
* Name of the APM agent capturing information.
*/
name?: null | string;
/**
* Version of the APM agent capturing information.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Environment in which the monitored service is running, e.g. `production` or `staging`.
*/
environment?: null | string;
/**
* Framework holds information about the framework used in the monitored service.
*/
framework?: null | {
/**
* Name of the used framework
*/
name?: null | string;
/**
* Version of the used framework
*/
version?: null | string;
[k: string]: unknown;
};
/**
* ID holds a unique identifier for the service.
*/
id?: null | string;
/**
* Language holds information about the programming language of the monitored service.
*/
language?: null | {
/**
* Name of the used programming language
*/
name?: null | string;
/**
* Version of the used programming language
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Name of the monitored service.
*/
name?: null | string;
/**
* Node must be a unique meaningful name of the service node.
*/
node?: null | {
/**
* Name of the service node
*/
configured_name?: null | string;
[k: string]: unknown;
};
/**
* Origin contains the self-nested field groups for service.
*/
origin?: null | {
/**
* Immutable id of the service emitting this event.
*/
id?: null | string;
/**
* Immutable name of the service emitting this event.
*/
name?: null | string;
/**
* The version of the service the data was collected from.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Runtime holds information about the language runtime running the monitored service
*/
runtime?: null | {
/**
* Name of the language runtime
*/
name?: null | string;
/**
* Version of the language runtime
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Target holds information about the outgoing service in case of an outgoing event
*/
target?: (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
(
| ((
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
) &
null)
| (
| {
type: string;
[k: string]: unknown;
}
| {
name: string;
[k: string]: unknown;
}
)
);
/**
* Version of the monitored service.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* Tags are a flat mapping of user-defined tags. On the agent side, tags are called labels. Allowed value types are string, boolean and number values. Tags are indexed and searchable.
*/
tags?: null | {
[k: string]: null | string | boolean | number;
};
/**
* User holds information about the correlated user for this event. If user data are provided here, all user related information from metadata is ignored, otherwise the metadata's user information will be stored with the event.
*/
user?: null | {
/**
* Domain of the logged in user
*/
domain?: null | string;
/**
* Email of the user.
*/
email?: null | string;
/**
* ID identifies the logged in user, e.g. can be the primary key of the user
*/
id?: null | string | number;
/**
* Name of the user.
*/
username?: null | string;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* DroppedSpanStats holds information about spans that were dropped (for example due to transaction_max_spans or exit_span_min_duration).
*/
dropped_spans_stats?: null | Array<{
/**
* DestinationServiceResource identifies the destination service resource being operated on. e.g. 'http://elastic.co:80', 'elasticsearch', 'rabbitmq/queue_name'.
*/
destination_service_resource?: null | string;
/**
* Duration holds duration aggregations about the dropped span.
*/
duration?: null | {
/**
* Count holds the number of times the dropped span happened.
*/
count?: null | number;
/**
* Sum holds dimensions about the dropped span's duration.
*/
sum?: null | {
/**
* Us represents the summation of the span duration.
*/
us?: null | number;
[k: string]: unknown;
};
[k: string]: unknown;
};
/**
* Outcome of the span: success, failure, or unknown. Outcome may be one of a limited set of permitted values describing the success or failure of the span. It can be used for calculating error rates for outgoing requests.
*/
outcome?: 'success' | 'failure' | 'unknown' | null;
/**
* ServiceTargetName identifies the instance name of the target service being operated on
*/
service_target_name?: null | string;
/**
* ServiceTargetType identifies the type of the target service being operated on e.g. 'oracle', 'rabbitmq'
*/
service_target_type?: null | string;
[k: string]: unknown;
}>;
/**
* Duration how long the transaction took to complete, in milliseconds with 3 decimal points.
*/
duration: number;
/**
* UserExperience holds metrics for measuring real user experience. This information is only sent by RUM agents.
*/
experience?: null | {
/**
* CumulativeLayoutShift holds the Cumulative Layout Shift (CLS) metric value, or a negative value if CLS is unknown. See https://web.dev/cls/
*/
cls?: null | number;
/**
* FirstInputDelay holds the First Input Delay (FID) metric value, or a negative value if FID is unknown. See https://web.dev/fid/
*/
fid?: null | number;
/**
* Longtask holds longtask duration/count metrics.
*/
longtask?: null | {
/**
* Count is the total number of of longtasks.
*/
count: number;
/**
* Max longtask duration
*/
max: number;
/**
* Sum of longtask durations
*/
sum: number;
[k: string]: unknown;
};
/**
* TotalBlockingTime holds the Total Blocking Time (TBT) metric value, or a negative value if TBT is unknown. See https://web.dev/tbt/
*/
tbt?: null | number;
[k: string]: unknown;
};
/**
* FAAS holds fields related to Function as a Service events.
*/
faas?: null | {
/**
* Indicates whether a function invocation was a cold start or not.
*/
coldstart?: null | boolean;
/**
* The request id of the function invocation.
*/
execution?: null | string;
/**
* A unique identifier of the invoked serverless function.
*/
id?: null | string;
/**
* The lambda function name.
*/
name?: null | string;
/**
* Trigger attributes.
*/
trigger?: null | {
/**
* The id of the origin trigger request.
*/
request_id?: null | string;
/**
* The trigger type.
*/
type?: null | string;
[k: string]: unknown;
};
/**
* The lambda function version.
*/
version?: null | string;
[k: string]: unknown;
};
/**
* ID holds the hex encoded 64 random bits ID of the event.
*/
id: string;
/**
* Links holds links to other spans, potentially in other traces.
*/
links?: null | Array<{
/**
* SpanID holds the ID of the linked span.
*/
span_id: string;
/**
* TraceID holds the ID of the linked span's trace.
*/
trace_id: string;
[k: string]: unknown;
}>;
/**
* Marks capture the timing of a significant event during the lifetime of a transaction. Marks are organized into groups and can be set by the user or the agent. Marks are only reported by RUM agents.
*/
marks?: null | {
[k: string]: null | {
[k: string]: null | number;
};
};
/**
* Name is the generic designation of a transaction in the scope of a single service, eg: 'GET /users/:id'.
*/
name?: null | string;
/**
* OTel contains unmapped OpenTelemetry attributes.
*/
otel?: null | {
/**
* Attributes hold the unmapped OpenTelemetry attributes.
*/
attributes?: null | {
[k: string]: unknown;
};
/**
* SpanKind holds the incoming OpenTelemetry span kind.
*/
span_kind?: null | string;
[k: string]: unknown;
};
/**
* Outcome of the transaction with a limited set of permitted values, describing the success or failure of the transaction from the service's perspective. It is used for calculating error rates for incoming requests. Permitted values: success, failure, unknown.
*/
outcome?: 'success' | 'failure' | 'unknown' | null;
/**
* ParentID holds the hex encoded 64 random bits ID of the parent transaction or span.
*/
parent_id?: null | string;
/**
* Result of the transaction. For HTTP-related transactions, this should be the status code formatted like 'HTTP 2xx'.
*/
result?: null | string;
/**
* SampleRate applied to the monitored service at the time where this transaction was recorded. Allowed values are [0..1]. A SampleRate <1 indicates that not all spans are recorded.
*/
sample_rate?: null | number;
/**
* Sampled indicates whether or not the full information for a transaction is captured. If a transaction is unsampled no spans and less context information will be reported.
*/
sampled?: null | boolean;
/**
* Session holds optional transaction session information for RUM.
*/
session?: null | {
/**
* ID holds a session ID for grouping a set of related transactions.
*/
id: string;
/**
* Sequence holds an optional sequence number for a transaction within a session. It is not meaningful to compare sequences across two different sessions.
*/
sequence?: null | number;
[k: string]: unknown;
};
/**
* SpanCount counts correlated spans.
*/
span_count: {
/**
* Dropped is the number of correlated spans that have been dropped by the APM agent recording the transaction.
*/
dropped?: null | number;
/**
* Started is the number of correlated spans that are recorded.
*/
started: number;
[k: string]: unknown;
};
/**
* Timestamp holds the recorded time of the event, UTC based and formatted as microseconds since Unix epoch
*/
timestamp?: null | number;
/**
* TraceID holds the hex encoded 128 random bits ID of the correlated trace.
*/
trace_id: string;
/**
* Type expresses the transaction's type as keyword that has specific relevance within the service's domain, eg: 'request', 'backgroundjob'.
*/
type: string;
[k: string]: unknown;
}

View file

@ -58,8 +58,8 @@ export class StreamProcessor<TFields extends Fields = ApmFields> {
}
private readonly intervalAmount: number;
private readonly intervalUnit: any;
private readonly name: string;
private readonly version: string;
public readonly name: string;
public readonly version: string;
private readonly versionMajor: number;
// TODO move away from chunking and feed this data one by one to processors

View file

@ -0,0 +1,107 @@
/*
* 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 { random } from 'lodash';
import { apm, timerange } from '../..';
import { ApmFields } from '../lib/apm/apm_fields';
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';
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
const logger = getLogger(runOptions);
const languages = ['go', 'dotnet', 'java', 'python'];
const services = ['web', 'order-processing', 'api-backend'];
return {
generate: ({ from, to }) => {
const range = timerange(from, to);
const successfulTimestamps = range.interval('1s').randomize(100, 180);
const instances = services.map((service, index) =>
apm
.service(
`${service}-${languages[index % languages.length]}`,
'production',
languages[index % languages.length]
)
.instance(`instance-${index}`)
);
const entities = [
'order',
'book',
'product',
'baskets',
'user',
'exporter',
'set',
'profile',
];
const routes = (e: string) => {
return [
`HEAD /${e}/{id}`,
`GET /${e}/{id}`,
`PUT /${e}s`,
`POST /${e}s`,
`DELETE /${e}/{id}`,
`GET /${e}s`,
];
};
const urls = entities.flatMap(routes);
const instanceSpans = (instance: Instance, url: string, index: number) => {
const successfulTraceEvents = successfulTimestamps.generator((timestamp) => {
const mod = (index % 4) + 1;
const randomHigh = random(100, mod * 1000, false);
const randomLow = random(10, randomHigh / 10 + mod * 3, false);
const duration = random(randomLow, randomHigh, false);
const childDuration = random(1, duration);
const remainderDuration = duration - childDuration;
const generateError = index % random(mod, 9) === 0;
const generateChildError = index % random(mod, 9) === 0;
const span = instance
.transaction(url)
.timestamp(timestamp)
.duration(duration)
.children(
instance
.span('GET apm-*/_search', 'db', 'elasticsearch')
.duration(childDuration)
.destination('elasticsearch')
.timestamp(timestamp)
.outcome(generateError && generateChildError ? 'failure' : 'success'),
instance
.span('custom_operation', 'custom')
.duration(remainderDuration)
.success()
.timestamp(timestamp + childDuration)
);
return !generateError
? span.success()
: span
.failure()
.errors(instance.error(`No handler for ${url}`).timestamp(timestamp + 50));
});
return successfulTraceEvents;
};
return instances
.flatMap((instance) => urls.map((url) => ({ instance, url })))
.map(({ instance, url }, index) =>
logger.perf('generating_apm_events', () => instanceSpans(instance, url, index))
)
.reduce((p, c) => p.merge(c));
},
};
};
export default scenario;

View file

@ -20,9 +20,8 @@ const ENVIRONMENT = getSynthtraceEnvironment(__filename);
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
const logger = getLogger(runOptions);
const numServices = 3;
const languages = ['go', 'dotnet', 'java', 'python'];
const services = ['web', 'order-processing', 'api-backend', 'proxy'];
const services = ['web', 'order-processing', 'api-backend'];
return {
generate: ({ from, to }) => {
@ -31,25 +30,25 @@ const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
const successfulTimestamps = range.ratePerMinute(60);
// `.randomize(3, 180);
const instances = [...Array(numServices).keys()].map((index) =>
const instances = services.map((service, index) =>
apm
.service(
`${services[index % services.length]}-${languages[index % languages.length]}-${index}`,
ENVIRONMENT,
languages[index % languages.length]
)
.instance('instance')
.instance(`instance-${index}`)
);
const urls = ['GET /order/{id}', 'POST /basket/{id}', 'DELETE /basket', 'GET /products'];
const instanceSpans = (instance: Instance, url: string, index: number) => {
const successfulTraceEvents = successfulTimestamps.generator((timestamp) => {
const mod = index % 4;
const randomHigh = random(100, mod * 1000);
const randomLow = random(10, randomHigh / 10 + mod * 3);
const duration = random(randomLow, randomHigh);
const childDuration = random(randomLow, duration);
const mod = (index % 4) + 1;
const randomHigh = random(100, mod * 1000, false);
const randomLow = random(10, randomHigh / 10 + mod * 3, false);
const duration = random(randomLow, randomHigh, false);
const childDuration = random(randomLow, duration, false);
const remainderDuration = duration - childDuration;
const generateError = index % random(mod, 9) === 0;
const generateChildError = index % random(mod, 9) === 0;

View file

@ -38,7 +38,7 @@ const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
ENVIRONMENT,
languages[index % languages.length]
)
.instance('instance')
.instance(`instance-${index}`)
);
const urls = ['GET /order/{id}', 'POST /basket/{id}', 'DELETE /basket', 'GET /products'];

View file

@ -13832,7 +13832,7 @@ ejs@^3.1.6, ejs@^3.1.8:
dependencies:
jake "^10.8.5"
elastic-apm-http-client@11.0.1:
elastic-apm-http-client@11.0.1, elastic-apm-http-client@^11.0.1:
version "11.0.1"
resolved "https://registry.yarnpkg.com/elastic-apm-http-client/-/elastic-apm-http-client-11.0.1.tgz#15dbe99d56d62b3f732d1bd2b51bef6094b78801"
integrity sha512-5AOWlhs2WlZpI+DfgGqY/8Rk7KF8WeevaO8R961eBylavU6GWhLRNiJncohn5jsvrqhmeT19azBvy/oYRN7bJw==