Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get logs shipped from lambda to Loki #1600

Open
gkaskonas opened this issue Nov 18, 2024 · 1 comment
Open

Unable to get logs shipped from lambda to Loki #1600

gkaskonas opened this issue Nov 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gkaskonas
Copy link

gkaskonas commented Nov 18, 2024

Describe the bug
I am unable to get logs to ship using opentelemetry. I tried pino http transport but with no avail.
Is there a way to configure opentelemetry to scrape stdout or lambda telemetry API?

Steps to reproduce
Configure a lambda with the instrumentation and collector layer. Log something in the lambda

What did you expect to see?
Logs in Loki.

What did you see instead?
Nothing. No errors either.

What version of collector/language SDK version did you use?
Instrumentation layer 0.11
Collector 0.12

What language layer did you use?
NodeJS

Additional context
Collector config:

receivers:
  otlp:
    protocols:
      http: 
  telemetryapi:
exporters:
  otlphttp:
    endpoint: 'https://tracing.internal.tools.company.io/otlp'
  otlphttp/logs:
    endpoint: 'https://loki.tools.company.io/otlp'
  prometheusremotewrite:
    endpoint: 'https://mimir.internal.tools.company.io/api/v1/push'
    resource_to_telemetry_conversion:
      enabled: true
    external_labels:
      source: aws-lambda
    remote_write_queue:
      enabled: true
      queue_size: 100000
      num_consumers: 50
  logging:

processors:
  coldstart:
  decouple:
  batch:
    timeout: 1m

service:
  pipelines:
    traces:
      receivers:
        - otlp
        - telemetryapi
      exporters:
        - otlphttp
      processors:
        - batch
        - decouple
        - coldstart
    metrics:
      receivers:
        - otlp
      exporters:
        - prometheusremotewrite
      processors:
        - batch
        - decouple
    logs:
      receivers:
        - otlp
        - telemetryapi
      exporters:
        - otlphttp/logs
      processors:
        - batch
        - decouple

I am getting lambda telemetry metadata in loki. Like faas.name and faas.max_memory hwever, the log line itself is empty. Is my collector config OK?
What am I doing wrong with application logs?

@gkaskonas gkaskonas added the bug Something isn't working label Nov 18, 2024
@serkan-ozal
Copy link
Contributor

@gkaskonas Are you looking for auto capturing console logs statements by Node layer and export them to the target vendor over OTEL collector? If so, unfortunately, OTEL Node SDK doesn't capture console log statements automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants