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
1 Answer
Reset to default 0Finally 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条)