How to enable Lambda logs to OTEL on docker-lgtm stack

I have docker-otel-lgtm stack running on EC2 instance. What I need is to send Lambda logs to the OTEL collector so I can query the logs using Loki. Any guidance on how to configure the docker and additional steps on Lambda. I have already added the Lambda layer having otel-python and below is the compose.

version: "3.8"  # Specify the version of the compose file
services:
  lgtm:
    image: docker.io/grafana/otel-lgtm:0.8.2
    ports:
      - "4317:4317"
      - "4318:4318"
      - "3000:3000"
    environment:
      - GF_SERVER_ROOT_URL=https://logs.xxx.com
      - GF_AUTH_ANONYMOUS_ENABLED=false
      - ENABLE_LOGS_OTELCOL=true
    volumes:
      - lgtm_data:/data  # Mount the Docker volume to the /data directory in the container
      - otel-lgtm:/otel-lgtm/

volumes:
  lgtm_data:
  otel-lgtm:

Send concept:

Instrument your lambda code properly and send logs to your otel from the Lambda code directly. Another option will be to instrument lambda code with AWS ADOT lambda layer, where you configure that ADOT collector to send logs to your OTEL colletor.

Scrape existing Lambda logs from CloudWatch logs

There is also an option to stream CloudWatch logs - you will need more complex infra setup for that.

There is no single correct solution. Explore and choose options, which will fit your needs and skillset.