Open
Description
What version of OpenTelemetry are you using?
instrumentation-aws-lambda: v0.50.3
What version of Node are you using?
22
What did you do?
Instrumented an AWS Lambda Function with opentelemetry
const provider = new NodeTracerProvider({
resource: new Resource({
[ATTR_SERVICE_NAME]: 'my-service'
}),
sampler: new AlwaysOnSampler(),
spanProcessors: [
new BatchSpanProcessor(myExporter),
],
});
registerInstrumentations({
instrumentations: [
getNodeAutoInstrumentations({
'@opentelemetry/instrumentation-aws-lambda': {
disableAwsContextPropagation: true,
},
}),
],
});
What did you expect to see?
Error logs should be clean.
What did you see instead?
Error logs:
Metrics may not be exported for the lambda function because we are not force flushing before callback.
Additional context
Despite not wanting metrics to be configured, the lambda instrumentation is requiring it through this error. We now either have to filter out these errors from our alerting or we have to configure a MeterProvider.