Skip to content

Commit

Permalink
Rename AppSignals configs with backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
srprash committed Feb 8, 2024
1 parent cf3c27a commit 74ecaf9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public void customize(AutoConfigurationCustomizer autoConfiguration) {
}

private boolean isSmpEnabled(ConfigProperties configProps) {
return configProps.getBoolean("otel.smp.enabled", false);
return configProps.getBoolean(
"otel.aws.app.signals.enabled", configProps.getBoolean("otel.smp.enabled", false));
}

private Sampler customizeSampler(Sampler sampler, ConfigProperties configProps) {
Expand All @@ -79,7 +80,8 @@ private SdkTracerProviderBuilder customizeTracerProviderBuilder(
logger.info("Span Metrics Processor enabled");
String smpEndpoint =
configProps.getString(
"otel.aws.smp.exporter.endpoint", "http://cloudwatch-agent.amazon-cloudwatch:4317");
"otel.aws.app.signals.exporter.endpoint",
configProps.getString("otel.aws.smp.exporter.endpoint", "http://localhost:4315"));
Duration exportInterval =
configProps.getDuration("otel.metric.export.interval", DEFAULT_METRIC_EXPORT_INTERVAL);
logger.log(Level.FINE, String.format("Span Metrics endpoint: %s", smpEndpoint));
Expand Down

0 comments on commit 74ecaf9

Please sign in to comment.