network icon indicating copy to clipboard operation
network copied to clipboard

Improve error observability of RPC calls

Open aeneasr opened this issue 3 years ago • 0 comments

Preflight checklist

Describe your problem

Currently, it is not possible to understand why things fail in certain cases. A good example are custom SMTP servers. Figuring out what exactly the parameters are is no easy feat, as there are different security mechanisms (TLS, SMTPS, SMTP without any encryption, ...).

When you have access to the log, that is easy as you'll see error messages like:

{"audience":"application","error":{"message":"tls: first record does not look like a TLS handshake","stack_trace":"stack trace could not be recovered from error type tls.RecordHeaderError"},"file":"/go/pkg/mod/github.com/ory/[email protected]/courier/smtp.go:201","func":"github.com/ory/kratos/courier.(*courier).dispatchEmail","level":"error","message_from":"[email protected]","msg":"Unable to send email using SMTP connection.","service_name":"Ory Kratos","service_version":"master","smtp_server":"smtp.postmarkapp.com:587","smtp_ssl_enabled":true,"time":"2022-07-07T09:47:15Z"}

Describe your ideal solution

It should be possible to see logs related to your project in the console / API.

Workarounds or alternatives

None

Additional Context

This user had significant problems figuring out what is going on and why emails are not being sent: https://ory-community.slack.com/archives/C02MR4DEEGH/p1657187128273789

I had to go into k8s and look up the logs for the courier to help him...

aeneasr avatar Jul 07 '22 10:07 aeneasr