-
Notifications
You must be signed in to change notification settings - Fork 619
Closed
Labels
bugSomething isn't workingSomething isn't workingpkg:instrumentation-aws-lambdapriority:p4Bugs and spec inconsistencies which do not fall into a higher prioritizationBugs and spec inconsistencies which do not fall into a higher prioritization
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:
Lines 392 to 394 in b520d04
| diag.error( | |
| 'Metrics may not be exported for the lambda function because we are not force flushing before callback.' | |
| ); |
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.
tmanti and klhuff
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpkg:instrumentation-aws-lambdapriority:p4Bugs and spec inconsistencies which do not fall into a higher prioritizationBugs and spec inconsistencies which do not fall into a higher prioritization