I am trying to add xray tracing into all of my external calls and need some help. Http calls were pretty simple and well-documented, but I cannot find anything on smtp.
This is what I used to add xray tracing into an http call using the import "net/http".
// ... Created a client, then...
client = xray.Client(client)
result, err := client.Do(request.WithContext(context.Background()))
This is what I'm working with to add xray tracing into an smtp call using the import "net/smtp".
connection, err := smtp.Dial("smtp.server.com")
// ... Set sender and receiver, then...
writer, err := connection.Data()
_, _ = writer.Write("Message")
_ = writer.Close()
_ = connection.Quit()
I have tried digging into the smtp client and client writer structs but am unable to find to add the xray tracing.