You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am using the java wrapper for an AWS Lambda to export metrics to Amazon Managed Prometheus. The Lambda is setup with Spring Cloud Functions in a declarative way with the handler: org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
which is implementing the AWS Lambda RequestStreamHandler.
When I invoke the Lambda through an S3 Event, it starts and processes it without any problems and the handler seems to be correct as I have the wrapper set to otel-stream-handler: [ main] o.s.c.f.a.aws.CustomRuntimeInitializer : AWS Handler: io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestStreamWrapper
Unfortunately no metrics are exported to AMP. I have this Bean where I add a counter for the sake of testing:
@Bean
Meter meter() {
var meter = GlobalOpenTelemetry.getMeterProvider().meterBuilder("aws-otel").setInstrumentationVersion("1.0").build();
var test = meter.counterBuilder("test1").setDescription("test").build();
test.add(1234);
return meter;
}
When I set the AWS_LAMBDA_EXEC_WRAPPER to /opt/otel-handler this counter is exported but the function cannot be processed as the otel-handler implementation does not support an InputStream which is expected. Still the metric defined in the Bean is exported to AMP and accessible via PromQL query.
Steps to reproduce
Spring Cloud Function with S3 Event Input deployed as AWS Lambda.
Lambda timeout is 120 seconds and used RAM is 1024MB.
What did you expect to see?
I would expect to at least see the metrics defined in the Meter bean as the dependency is required in further processing components (which runs through successfully) and therefore should be available in the ApplicationContext. Prometheus workspace queries show no results.
What did you see instead?
No logs indicating a failure. At some point minutes later the logs show: {"level":"info","ts":1702461394.1761792,"logger":"lifecycle.manager","msg":"Received SHUTDOWN event"}
What version of collector/language SDK version did you use?
Before that PR, traces and metrics were flushed in case of error and output stream close, but with that PR, traces and metrics are flushed in any case before the invocation completed.
Can you try with the latest version of the wrapper layer and let us know whether it works or not?
Describe the bug
I am using the java wrapper for an AWS Lambda to export metrics to Amazon Managed Prometheus. The Lambda is setup with Spring Cloud Functions in a declarative way with the handler:
org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
which is implementing the AWS Lambda RequestStreamHandler.
When I invoke the Lambda through an S3 Event, it starts and processes it without any problems and the handler seems to be correct as I have the wrapper set to otel-stream-handler:
[ main] o.s.c.f.a.aws.CustomRuntimeInitializer : AWS Handler: io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestStreamWrapper
Unfortunately no metrics are exported to AMP. I have this Bean where I add a counter for the sake of testing:
When I set the AWS_LAMBDA_EXEC_WRAPPER to /opt/otel-handler this counter is exported but the function cannot be processed as the otel-handler implementation does not support an
InputStream
which is expected. Still the metric defined in the Bean is exported to AMP and accessible via PromQL query.Steps to reproduce
Spring Cloud Function with S3 Event Input deployed as AWS Lambda.
Specify layer as:
arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-31-0:1
Lambda Handler
org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
What did you expect to see?
I would expect to at least see the metrics defined in the Meter bean as the dependency is required in further processing components (which runs through successfully) and therefore should be available in the ApplicationContext. Prometheus workspace queries show no results.
What did you see instead?
No logs indicating a failure. At some point minutes later the logs show:
{"level":"info","ts":1702461394.1761792,"logger":"lifecycle.manager","msg":"Received SHUTDOWN event"}
What version of collector/language SDK version did you use?
What language layer did you use?
The text was updated successfully, but these errors were encountered: