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; } } );