Skip to content

Commit 19df0b4

Browse files
committed
updating comment
1 parent 9c3ed81 commit 19df0b4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,24 @@
3434

3535
/**
3636
* You can control when these customizations are applied using both the properties -
37-
* otel.jmx.enabled and otel.jmx.exporter.metrics.endpoint or the environment variable
38-
* OTEL_JMX_ENABLED_CONFIG and OTEL_JMX_ENDPOINT_CONFIG. These flags are disabled by default.
37+
* 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.
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

45-
private static final String AWS_OTEL_JMX_ENABLED_CONFIG = "otel.aws.jmx.enabled";
46-
private static final String AWS_OTEL_JMX_ENDPOINT_CONFIG =
47-
"otel.aws.jmx.exporter.metrics.endpoint";
45+
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";
4847

4948
public void customize(AutoConfigurationCustomizer autoConfiguration) {
5049
autoConfiguration.addMeterProviderCustomizer(this::customizeMeterProvider);
5150
}
5251

5352
private boolean isOtelJMXEnabled(ConfigProperties configProps) {
54-
return configProps.getBoolean(AWS_OTEL_JMX_ENABLED_CONFIG, false)
55-
&& configProps.getString(AWS_OTEL_JMX_ENDPOINT_CONFIG, "") != "";
53+
return configProps.getBoolean(AWS_JMX_ENABLED_CONFIG, false)
54+
&& configProps.getString(AWS_JMX_ENDPOINT_CONFIG, "") != "";
5655
}
5756

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

9190
String otelJMXEndpoint;
9291
if (protocol.equals(OtlpConfigUtil.PROTOCOL_HTTP_PROTOBUF)) {
93-
otelJMXEndpoint =
94-
configProps.getString(AWS_OTEL_JMX_ENDPOINT_CONFIG, "http://localhost:4314");
92+
otelJMXEndpoint = configProps.getString(AWS_JMX_ENDPOINT_CONFIG, "http://localhost:4314");
9593
logger.log(
9694
Level.FINE, String.format("AWS Otel JMX metrics export endpoint: %s", otelJMXEndpoint));
9795
return OtlpHttpMetricExporter.builder()

0 commit comments

Comments
 (0)