Commit 0677e7c
fix(profiling): skip TLS init for non-HTTPS endpoints
Since 9a61cae (perf(profiling): cache TLS in ProfileExporter::new,
2026-02-27), TLS configuration is initialized unconditionally in
ProfileExporter::new(), even when the endpoint uses plain HTTP (e.g.
agent mode at http://<host>:8126), unix sockets, or named pipes.
On Linux this eagerly loads the system CA certificate store via
rustls-platform-verifier. In minimal container images (e.g. a bare
ubuntu:20.04 without the ca-certificates package), there are no certs
to load, so the call fails with:
failed to initialize TLS configuration: unexpected error:
No CA certificates were loaded from the system
This surfaced in ddprof after the libdatadog v29 upgrade: the profiler
targets the Datadog agent over HTTP and has no reason to touch the cert
store at all.
Fix: only call cached_tls_config() and apply tls_backend_preconfigured()
when the endpoint scheme is "https". All other schemes (http, unix,
windows, file) bypass TLS initialization entirely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent db9b9f4 commit 0677e7c
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
0 commit comments