-
Notifications
You must be signed in to change notification settings - Fork 8
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
DDTrace Connection Refused #40
Comments
@s33dunda this might be mistake in our doc, you also need to add the following code Datadog::Lambda.configure_apm do |c|
# Enable the instrumentation
end See https://docs.datadoghq.com/serverless/installation/ruby/#monitor-custom-business-logic for the complete code sample. Sorry for the confusion, we are going to fix the doc now. Let me know if that fixes your issue. |
@tianchu thanks for this. Now does it matter if you have no custom business logic you want to add? |
You need You should be able to get traces for your functions by default. https://docs.datadoghq.com/serverless/installation/ruby/#monitor-custom-business-logic shows how to submit custom metrics or spans in addition to the auto instrumentation. BTW, also make sure you do set up the forwarder lambda and the log subscription, in order for the forwarder to rely traces from logs to datadog https://docs.datadoghq.com/serverless/installation/ruby/#subscribe-the-datadog-forwarder-to-the-log-groups |
Do you mind letting me know whether the connection issue goes away after adding the code I mentioned? |
Yes this worked like a charm. FWIW I had to use a custom log formatter to have them correlate. The default format (and format suggested in the docs) do not suffice.
This validates with the default lambda grok parser for node:
The newline at the end was key. |
Thanks @s33dunda I will take a look at the correlation issue, do you mind letting me know where you found the "format suggested in the docs" so I can fix it? |
@tianchu thank you again! 👍 https://docs.datadoghq.com/tracing/connect_logs_and_traces/ruby#for-logging-in-ruby-applications
|
Thanks, I'll log a ticket in our backlog to fix that! |
Closing, as the original issue has been resolved, while the trace and log correlation issue being tracked internally as a feature request. |
Expected Behavior
The lambda runs without datadog tracer errors
Actual Behavior
The lambda has a connection error error, see stack trace.
Steps to Reproduce the Problem
1.Create a lambda
Specifications
Datadog Lambda Layer version: 11 (arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Ruby2-5:11)
Ruby version: 2.5
Stacktrace
The text was updated successfully, but these errors were encountered: