Skip to content

Commit 5804526

Browse files
committed
updating log lines
1 parent 2abf989 commit 5804526

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/AwsJMXMetricsCustomizerProvider.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,24 @@
3535
/**
3636
* You can control when these customizations are applied using both the properties -
3737
* otel.aws.jmx.enabled and otel.aws.jmx.exporter.metrics.endpoint or the environment variable
38-
* AWS_JMX_ENABLED_CONFIG and AWS_JMX_ENDPOINT_CONFIG. These flags are disabled by default.
38+
* AWS_JMX_ENABLED_CONFIG and AWS_JMX_EXPORTER_ENDPOINT_CONFIG. These flags are disabled by default.
3939
*/
4040
public class AwsJMXMetricsCustomizerProvider implements AutoConfigurationCustomizerProvider {
4141
private static final Duration DEFAULT_METRIC_EXPORT_INTERVAL = Duration.ofMinutes(1);
4242
private static final Logger logger =
4343
Logger.getLogger(AwsJMXMetricsCustomizerProvider.class.getName());
4444

4545
private static final String AWS_JMX_ENABLED_CONFIG = "otel.aws.jmx.enabled";
46-
private static final String AWS_JMX_ENDPOINT_CONFIG = "otel.aws.jmx.exporter.metrics.endpoint";
46+
private static final String AWS_JMX_EXPORTER_ENDPOINT_CONFIG =
47+
"otel.aws.jmx.exporter.metrics.endpoint";
4748

4849
public void customize(AutoConfigurationCustomizer autoConfiguration) {
4950
autoConfiguration.addMeterProviderCustomizer(this::customizeMeterProvider);
5051
}
5152

5253
private boolean isOtelJMXEnabled(ConfigProperties configProps) {
5354
return configProps.getBoolean(AWS_JMX_ENABLED_CONFIG, false)
54-
&& configProps.getString(AWS_JMX_ENDPOINT_CONFIG, "") != "";
55+
&& configProps.getString(AWS_JMX_EXPORTER_ENDPOINT_CONFIG, "") != "";
5556
}
5657

5758
private SdkMeterProviderBuilder customizeMeterProvider(
@@ -89,7 +90,8 @@ public MetricExporter createExporter(ConfigProperties configProps) {
8990

9091
String otelJMXEndpoint;
9192
if (protocol.equals(OtlpConfigUtil.PROTOCOL_HTTP_PROTOBUF)) {
92-
otelJMXEndpoint = configProps.getString(AWS_JMX_ENDPOINT_CONFIG, "http://localhost:4314");
93+
otelJMXEndpoint =
94+
configProps.getString(AWS_JMX_EXPORTER_ENDPOINT_CONFIG, "http://localhost:4314");
9395
logger.log(
9496
Level.FINE, String.format("AWS JMX metrics export endpoint: %s", otelJMXEndpoint));
9597
return OtlpHttpMetricExporter.builder()

0 commit comments

Comments
 (0)