-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
open telemetry can't ingest dynatrace from aws lambda function with AWS Distro for OpenTelemetry #13251
Comments
Can you verify if the spans are making it to the collector by trying to use a console exporter or something along those lines? |
are there good instructions somewhere on diagnosing if a receiver ingest is working. |
I usually just try another simpler exporter (like console) |
Thanks for all your replies. Node JS Client App Our Dynatrace |
To use the logging exporter, which logs to the console, update your Collector configuration to include it in the list of exporters so that it looks something like this: pipelines:
traces:
receivers: [otlp]
exporters: [logging, otlphttp] This will cause the Collector to print logs for each trace received; if no logs appear, the Collector is not receiving them. Looking at your configuration, one thing I see is that the Dynatrace endpoint in your Collector configuration includes the exporters:
otlphttp:
endpoint: "https://{your-environment-id}.live.dynatrace.com/api/v2/otlp"
headers:
Authorization: "Api-Token <API_TOKEN>" |
Hi Evan, |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
We use AWS Distro for OpenTelemetry in lambda function:
arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-5-0:1
We did a basic aws lambda function in nodejs:
exports.handler = async (event) => {
let response
console.log('[START] - OpenTelemetry / Dynatrace');
try {
response = await axios({
method: 'post', url:url
});
console.log('**************', response?.data)
} catch (error) {
console.log('ERR: ', error)
}
console.log('[END] - OpenTelemetry / Dynatrace');
return response?.data;
}
Our collector.yaml config is:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:55680
http:
endpoint: 0.0.0.0:55681
exporters:
otlphttp:
endpoint: "https://ico19512.live.dynatrace.com/api/v2/otlp/v1/traces"
headers: {Authorization: "Api-Token dt0c01......"}
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp]
Our enviroments variables config:
Our lamda run ok, but we don't see ingested nothing.
AWS Lambda function response was ok: "34.237.128.180"
Function Logs
START RequestId: b077aa35-b4bc-4604-8e5a-c67dbfa454ac Version: $LATEST
EXTENSION Name: collector State: Ready Events: [INVOKE,SHUTDOWN]
{"level":"debug","msg":"Received ","event :":"{\n\t"eventType": "INVOKE",\n\t"deadlineMs": 1660236861439,\n\t"requestId": "b077aa35-b4bc-4604-8e5a-c67dbfa454ac",\n\t"invokedFunctionArn": "arn:aws:lambda:us-east-1:658913498668:function:dyna-otel",\n\t"tracing": {\n\t\t"type": "X-Amzn-Trace-Id",\n\t\t"value": "Root=1-62f5342f-1b4ce6bd6c1ebf2c6601dc57;Parent=29fc70b85a8376fd;Sampled=0"\n\t}\n}"}
{"level":"debug","msg":"Waiting for event..."}
2022-08-11T16:54:09.465Z b077aa35-b4bc-4604-8e5a-c67dbfa454ac INFO [START] - OpenTelemetry / Dynatrace
2022-08-11T16:54:09.806Z b077aa35-b4bc-4604-8e5a-c67dbfa454ac INFO ************** 34.237.128.180
2022-08-11T16:54:09.806Z b077aa35-b4bc-4604-8e5a-c67dbfa454ac INFO [END] - OpenTelemetry / Dynatrace
END RequestId: b077aa35-b4bc-4604-8e5a-c67dbfa454ac
REPORT RequestId: b077aa35-b4bc-4604-8e5a-c67dbfa454ac Duration: 708.69 ms Billed Duration: 709 ms Memory Size: 128 MB Max Memory Used: 126 MB Init Duration: 1324.55 ms
The text was updated successfully, but these errors were encountered: