From 7fb6ec4c73bfdb1ca85bc2a748b43f4c097c2acc Mon Sep 17 00:00:00 2001 From: Jenny Date: Wed, 16 Oct 2024 17:32:59 +0200 Subject: [PATCH] Otel client type fix --- .../src/lib/otel/otel_synthtrace_es_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/kbn-apm-synthtrace/src/lib/otel/otel_synthtrace_es_client.ts b/packages/kbn-apm-synthtrace/src/lib/otel/otel_synthtrace_es_client.ts index 33f9fc3cc6d77..ee4c99b258c89 100644 --- a/packages/kbn-apm-synthtrace/src/lib/otel/otel_synthtrace_es_client.ts +++ b/packages/kbn-apm-synthtrace/src/lib/otel/otel_synthtrace_es_client.ts @@ -30,27 +30,26 @@ export class OtelSynthtraceEsClient extends SynthtraceEsClient { getDefaultPipeline( { includeSerialization, - versionOverride, }: { includeSerialization?: boolean; - versionOverride?: string; } = { includeSerialization: true } ) { - return otelPipeline(this.logger, includeSerialization); + return otelPipeline(includeSerialization); } } -function otelPipeline(logger: Logger, includeSerialization: boolean = true) { +function otelPipeline(includeSerialization: boolean = true) { const serializationTransform = includeSerialization ? [getSerializeTransform()] : []; return (base: Readable) => { return pipeline( + // @ts-expect-error see apm_pipeline.ts base, ...serializationTransform, getRoutingTransform(), getDedotTransform(), - (err) => { + (err: unknown) => { if (err) { - logger.error(err); + throw err; } } );