Skip to content
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

Use default Vert.x client settings in OTel exporters #35870

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,12 @@ private void configureTLS(HttpClientOptions options) {
}

private KeyCertOptions toPemKeyCertOptions() {
PemKeyCertOptions pemKeyCertOptions = new PemKeyCertOptions();
OtlpExporterTracesConfig.KeyCert keyCert = tracesConfig.keyCert();
if (keyCert.certs().isEmpty() && keyCert.keys().isEmpty()) {
brunobat marked this conversation as resolved.
Show resolved Hide resolved
return null;
}

PemKeyCertOptions pemKeyCertOptions = new PemKeyCertOptions();
if (keyCert.certs().isPresent()) {
for (String cert : keyCert.certs().get()) {
pemKeyCertOptions.addCertPath(cert);
Expand All @@ -235,14 +239,18 @@ private KeyCertOptions toPemKeyCertOptions() {
}

private PemTrustOptions toPemTrustOptions() {
PemTrustOptions pemTrustOptions = new PemTrustOptions();
OtlpExporterTracesConfig.TrustCert trustCert = tracesConfig.trustCert();
if (trustCert.certs().isPresent()) {
for (String cert : trustCert.certs().get()) {
pemTrustOptions.addCertPath(cert);
List<String> certs = trustCert.certs().get();
if (!certs.isEmpty()) {
PemTrustOptions pemTrustOptions = new PemTrustOptions();
for (String cert : trustCert.certs().get()) {
pemTrustOptions.addCertPath(cert);
}
return pemTrustOptions;
}
}
return pemTrustOptions;
return null;
}
}
}
Loading