Skip to content

Conversation

@ankitk-me
Copy link
Contributor

Fixes #1556

Comment on lines 73 to 81
URI endpoint;
if (matcher.reset(overrides.metrics.toString()).matches())
{
endpoint = overrides.metrics;
}
else
{
endpoint = location.resolve(overrides.metrics);
}
Copy link
Contributor

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()
Copy link
Contributor

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?

Comment on lines 86 to 99
public URI resolveLogs()
{
URI endpoint;
if (matcher.reset(overrides.logs.toString()).matches())
{
endpoint = overrides.logs;
}
else
{
endpoint = location.resolve(overrides.logs);
}

return endpoint;
}
Copy link
Contributor

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();
Copy link
Contributor

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,
Copy link
Contributor

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.

jfallows
jfallows previously approved these changes Sep 30, 2025
@jfallows jfallows merged commit 1208e7d into aklivity:develop Sep 30, 2025
41 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support specifying credentials for OTLP exporter

2 participants