opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

Log SSL Connection Information

Open samin36 opened this issue 2 years ago • 6 comments

Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.

Request I have successfully set up the HTTP metric/trace exporter to use SSL/TLS, but I am not seeing any connection specific information logged anywhere. With debug log level, I see the [OTLP HTTP Client] Session state: connected message, but that does not contain sufficient information.

Describe the solution you'd like Upon establishing an HTTPS connection, the negotiated TLS version and the Cipher suite should be logged. Logging the entire handshake would also be nice to have for debugging purposes.

samin36 avatar Jul 28 '23 13:07 samin36

libcurl verbose mode is switched off by default: https://github.com/open-telemetry/opentelemetry-cpp/blob/8f97cab6860bae6afb9e2ba073ca35c7dd606b52/ext/src/http/client/curl/http_operation_curl.cc#L591

We can make it configurable. Though need to validate if this will also dump SSL handshake data. Contributions are welcome in general to add this support.

lalitb avatar Jul 31 '23 19:07 lalitb

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:

github-actions[bot] avatar Jul 31 '23 20:07 github-actions[bot]

libcurl verbose mode is switched off by default:

https://github.com/open-telemetry/opentelemetry-cpp/blob/8f97cab6860bae6afb9e2ba073ca35c7dd606b52/ext/src/http/client/curl/http_operation_curl.cc#L591

We can make it configurable. Though need to validate if this will also dump SSL handshake data. Contributions are welcome in general to add this support.

Agree with making it configurable. We should be able to use the CURLOPT_DEBUGFUNCTION option to specify a callback that logs all the necessary information.

samin36 avatar Jul 31 '23 21:07 samin36

I can take a shot at implementing this. Sign me up!

samin36 avatar Jul 31 '23 21:07 samin36

Thanks @samin36, it's your's now.

lalitb avatar Jul 31 '23 23:07 lalitb

This issue was marked as stale due to lack of activity.

github-actions[bot] avatar Sep 30 '23 01:09 github-actions[bot]