-
Notifications
You must be signed in to change notification settings - Fork 69
support secure otlp exporter
#1579
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
Conversation
...otlp/src/main/java/io/aklivity/zilla/runtime/exporter/otlp/internal/OltpExporterHandler.java
Outdated
Show resolved
Hide resolved
...n/java/io/aklivity/zilla/runtime/exporter/otlp/internal/config/OtlpOptionsConfigAdapter.java
Outdated
Show resolved
Hide resolved
...est/java/io/aklivity/zilla/runtime/exporter/otlp/internal/config/OtlpExporterConfigTest.java
Show resolved
Hide resolved
...me/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java
Outdated
Show resolved
Hide resolved
...me/exporter-otlp/src/test/java/io/aklivity/zilla/runtime/exporter/otlp/internal/EventIT.java
Outdated
Show resolved
Hide resolved
| URI endpoint; | ||
| if (matcher.reset(overrides.metrics.toString()).matches()) | ||
| { | ||
| endpoint = overrides.metrics; | ||
| } | ||
| else | ||
| { | ||
| endpoint = location.resolve(overrides.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.
Can we simplify this by using location.resolve(overrides.metrics) in both cases (relative path or absolute URI)?
| this.overrides = endpoint.overrides; | ||
| } | ||
|
|
||
| public URI resolveMetrics() |
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.
This is only used internally so no need to public, right?
| public URI resolveLogs() | ||
| { | ||
| URI endpoint; | ||
| if (matcher.reset(overrides.logs.toString()).matches()) | ||
| { | ||
| endpoint = overrides.logs; | ||
| } | ||
| else | ||
| { | ||
| endpoint = location.resolve(overrides.logs); | ||
| } | ||
|
|
||
| return endpoint; | ||
| } |
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.
Equivalent feedback as metrics above.
| OtlpOverridesConfig overrides = endpoint.overrides; | ||
| this.metricsEndpoint = location.resolve(overrides.metrics); | ||
| this.logsEndpoint = location.resolve(overrides.logs); | ||
| this.metricsEndpoint = exporter.resolveMetrics(); |
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 don't need metricsEndpoint or logsEndpoint as a field since the endpoint is already in the corresponding client, right?
| { | ||
| return new OltpExporterHandler(config, context, exporter, collector, resolveKind, attributes); | ||
| OtlpExporterConfig otlpExporter = new OtlpExporterConfig(config, context, exporter); | ||
| return new OltpExporterHandler(config, context, otlpExporter, (OtlpOptionsConfig) exporter.options, |
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.
No need to pass options separately from otlpExporter as otlpExporter.options is already correct type and reachable from handler.
Fixes #1556