-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: configure TLS with environment variables. #2465
base: main
Are you sure you want to change the base?
Conversation
50894e9
to
5031002
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2465 +/- ##
=======================================
- Coverage 77.9% 77.4% -0.5%
=======================================
Files 123 123
Lines 22944 23168 +224
=======================================
+ Hits 17880 17948 +68
- Misses 5064 5220 +156 ☔ View full report in Codecov by Sentry. |
9458a03
to
093a1ce
Compare
@TommyCpp , how can we move this forward? 😄 |
Updates the opentelemetry-otlp crate to allow users to configure TLS using environment variables. Removing the need to crating the TLS config object and defining it with the `with_tls_config` method. In the same way other OTLP libraries does (e.g. go lang). Signed-off-by: José Guilherme Vanz <[email protected]>
👀 Will take a look today |
fn with_insecure(self) -> Self; | ||
/// Set the certificate file to validate the OTLP server connection | ||
/// This is only available when the `tls` feature is enabled. | ||
fn with_certificate<T: Into<String>>(self, certificate: T) -> Self; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can gate this function under #[cfg(feature = "tls")]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Fix typo in the changelog. Signed-off-by: José Guilherme Vanz <[email protected]>
Add missing TLS configuration directives. Signed-off-by: José Guilherme Vanz <[email protected]>
@@ -36,6 +36,20 @@ pub const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: &str = "OTEL_EXPORTER_OTLP_MET | |||
/// Example: `k1=v1,k2=v2` | |||
/// Note: this is only supported for HTTP. | |||
pub const OTEL_EXPORTER_OTLP_METRICS_HEADERS: &str = "OTEL_EXPORTER_OTLP_METRICS_HEADERS"; | |||
/// | |||
/// Certificate file to validate the OTLP server connection when sending metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add period at the end of the comment.
Updates the opentelemetry-otlp crate to allow users to configure TLS using environment variables. Removing the need to crating the TLS config object and defining it with the
with_tls_config
method. In the same way other OTLP libraries does (e.g. go lang).Partially fixes #774
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes