opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

Java Info log message with HTTP Server closed in cloudwatch?

Open sharanraj124 opened this issue 9 months ago • 1 comments

Hi I am using java otel instrumentation in my lambda application, I got HTTP Server closed error message in my cloudwatch console

Screenshot 2024-05-14 at 7 38 29 PM

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

sharanraj124 avatar May 14 '24 14:05 sharanraj124