amazon web services - lambda not sending traces to APM server - Stack Overflow

I have a lambda function that has ADOT layer arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-py

I have a lambda function that has ADOT layer arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-python-amd64-ver-1-29-0:1. This is my collector config

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "localhost:4317"
      http:
        endpoint: "localhost:4318"

exporters:
  otlp/grpc:
    endpoint: "observability.dev.my-service.io:8001"
    headers:
      authorization: "Bearer xxxxxxxxxxx"
    tls:
      insecure: true

  debug:
    verbosity: detailed
    use_internal_logger: true
    sampling_initial: 1
    sampling_thereafter: 1

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug, otlp/grpc]

This is not working, The AWS Xray traces are working but sending to my APM server which is in the same VPC doesn't work.

I have tried this post the difference is, in the blog post the traces are being send to otlp/elastic which is different in my case where I need to send it to grpc endpoint.

The lambda function itself is not doing much

import json
import os

print('Loading function')


def lambda_handler(event, context):
    print(os.getenv('OPENTELEMETRY_COLLECTOR_CONFIG_URI'))
    print("value1 = " + event['key1'])
    print("value2 = " + event['key2'])
    print("value3 = " + event['key3'])
    return event['key1']  # Echo back the first key value

I have a lambda function that has ADOT layer arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-python-amd64-ver-1-29-0:1. This is my collector config

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "localhost:4317"
      http:
        endpoint: "localhost:4318"

exporters:
  otlp/grpc:
    endpoint: "observability.dev.my-service.io:8001"
    headers:
      authorization: "Bearer xxxxxxxxxxx"
    tls:
      insecure: true

  debug:
    verbosity: detailed
    use_internal_logger: true
    sampling_initial: 1
    sampling_thereafter: 1

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug, otlp/grpc]

This is not working, The AWS Xray traces are working but sending to my APM server which is in the same VPC doesn't work.

I have tried this post the difference is, in the blog post the traces are being send to otlp/elastic which is different in my case where I need to send it to grpc endpoint.

The lambda function itself is not doing much

import json
import os

print('Loading function')


def lambda_handler(event, context):
    print(os.getenv('OPENTELEMETRY_COLLECTOR_CONFIG_URI'))
    print("value1 = " + event['key1'])
    print("value2 = " + event['key2'])
    print("value3 = " + event['key3'])
    return event['key1']  # Echo back the first key value

Share Improve this question edited Mar 4 at 14:14 Saad asked Mar 4 at 13:45 SaadSaad 1,9021 gold badge24 silver badges30 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Finally I found out the issue, I needed to set AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-instrument and also need to enable AWS Xray and then metrics will be sent

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745040367a4607773.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信