opentelemetry-lambda
opentelemetry-lambda copied to clipboard
Java Info log message with HTTP Server closed in cloudwatch?
Hi I am using java otel instrumentation in my lambda application, I got HTTP Server closed error message in my cloudwatch console
using java: 11
Added config.yaml file under resources directory
# config.yaml
receivers:
otlp:
protocols:
http:
exporters:
logging:
loglevel: debug
otlphttp:
endpoint: "https://demo.test.com"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging, otlphttp]
metrics:
receivers: [otlp]
exporters: [logging, otlphttp]
pom.xml
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>config.yaml</include>
</includes>
</resource>
</resources>
serverless.yml
environment:
AWS_LAMBDA_EXEC_WRAPPER: /opt/otel-handler
OPENTELEMETRY_COLLECTOR_CONFIG_FILE: /var/task/config.yaml
OTEL_PROPAGATORS: tracecontext
OTEL_TRACES_SAMPLER: always_on
OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED: false
OTEL_INSTRUMENTATION_AWS_LAMBDA_ENABLED: true
OTEL_INSTRUMENTATION_AWS_SDK_ENABLED: true
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
layers:
- arn:aws:lambda:us-east-1:184161586896:layer:opentelemetry-javaagent-0_5_0:1
- arn:aws:lambda:us-east-1:184161586896:layer:opentelemetry-collector-amd64-0_6_0:1
could please help for fixing these errors in lambda auto instrumentation java agent
Hi, beside the error message, are you seeing anything wrong with the telemetry generated by the layers? Is it missing data points?
@rapphil @sharanraj124 This is not error log, but expected info log written by collector just before Lambda container shutdown in response to SHUTDOWN event (https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#runtimes-lifecycle-extensions-shutdown) as OTEL Lambda collector works as an external Lambda extension.
@tylerbenson @rapphil I believe that this is the expected behavior, not a bug.
Thanks for investigating @serkan-ozal. @sharanraj124 I suggest you address this with the Java SIG if you'd like to remove that log. Closing the issue.