DataDog / datadog-lambda-go

The Datadog AWS Lambda package for Go
Apache License 2.0
59 stars 40 forks source link

How can I add connections to an SFTP server to the Service Map? #34

Closed gcobr closed 4 years ago

gcobr commented 4 years ago

My GoLang AWS Lambda connects to an SFTP server and uploads a file to it. It uses golang.org/x/crypto/ssh and github.com/pkg/sftp to do so.

How should I instrument the Go code to have these connections on the APM Service Map?

DylanLovesCoffee commented 4 years ago

Hey @gcobr, thanks for reaching out! You'll need to create a custom subsegment using the Xray SDK: https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-go-subsegments.html. You will likely need to wrap the function that calls the SFTP server, in your case. Feel free to keep us posted on your progress or reach out to our support team.

tianchu commented 4 years ago

@gcobr I'm going to close this ticket for now, as there is nothing we can do immediately here. If the suggested approach does not work, feel free to open a ticket with our support or find us directly in our community slack channel https://datadoghq.slack.com/channels/serverless/.