Skip to content

Commit

Permalink
Otel client type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jennypavlova committed Oct 16, 2024
1 parent 4d7350a commit 7fb6ec4
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,26 @@ export class OtelSynthtraceEsClient extends SynthtraceEsClient<OtelDocument> {
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;
}
}
);
Expand Down

0 comments on commit 7fb6ec4

Please sign in to comment.