Skip to content

Commit 4fdcaa0

Browse files
committed
formatting
1 parent 47ffa64 commit 4fdcaa0

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/ConfigurationBuilder.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class ConfigurationBuilder {
104104
private static final String APPLICATIONINSIGHTS_PREVIEW_PROFILER_ENABLEDIAGNOSTICS =
105105
"APPLICATIONINSIGHTS_PREVIEW_PROFILER_ENABLEDIAGNOSTICS";
106106

107-
// supported for backwards compatibility
107+
// this env var is deprecated but supported for backwards compatibility
108108
private static final String APPLICATIONINSIGHTS_PREVIEW_METRIC_INTERVAL_SECONDS =
109109
"APPLICATIONINSIGHTS_PREVIEW_METRIC_INTERVAL_SECONDS";
110110

@@ -141,8 +141,7 @@ public static Configuration create(
141141
return config;
142142
}
143143

144-
@SuppressWarnings(
145-
"deprecation") // logging warnings for usages of deprecated configuration options
144+
@SuppressWarnings("deprecation") // log usages of deprecated configuration options
146145
private static void logConfigurationWarnings(Configuration config) {
147146
if (config.instrumentation.micrometer.reportingIntervalSeconds != 60) {
148147
configurationLogger.warn(
@@ -356,8 +355,7 @@ private static void supportTelemetryProcessorsOldSemConv(Configuration config) {
356355
}
357356
}
358357

359-
@SuppressWarnings(
360-
"deprecation") // support deprecated semconv attributes for backwards compatibility
358+
@SuppressWarnings("deprecation") // support deprecated semconv for backwards compatibility
361359
private static String mapAttributeKey(String oldAttributeKey) {
362360
String result = null;
363361
// Common attributes across HTTP client and server spans
@@ -483,8 +481,7 @@ private static boolean isOpenJ9Jvm() {
483481
return jvmName != null && jvmName.contains("OpenJ9");
484482
}
485483

486-
@SuppressWarnings(
487-
"deprecation") // support deprecated configuration options for backwards compatibility
484+
@SuppressWarnings("deprecation") // support deprecated configuration for backwards compatibility
488485
private static void overlayAadEnvVars(
489486
Configuration config, Function<String, String> envVarsFunction) {
490487
String aadAuthString = getEnvVar(APPLICATIONINSIGHTS_AUTHENTICATION_STRING, envVarsFunction);

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/httpclient/LazyHttpClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ public Mono<HttpResponse> send(HttpRequest request, Context context) {
150150
return getDelegate().send(request, context);
151151
}
152152

153-
@SuppressWarnings(
154-
"deprecation") // support deprecated configuration options for backwards compatibility
153+
@SuppressWarnings("deprecation") // support deprecated configuration for backwards compatibility
155154
private static HttpPipelinePolicy getAuthenticationPolicy(
156155
Configuration.AadAuthentication configuration, String aadAudienceWithScope) {
157156
switch (configuration.type) {

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AiContextCustomizer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public AiContextCustomizer(
3434
}
3535

3636
@Override
37-
@SuppressWarnings(
38-
"deprecation") // support deprecated semconv attributes for backwards compatibility
37+
@SuppressWarnings("deprecation") // support deprecated semconv for backwards compatibility
3938
public Context onStart(Context context, R request, Attributes startAttributes) {
4039

4140
// TODO (trask) ideally would also check parentSpanContext !isValid || isRemote

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/SamplingOverrides.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ private StrictMatcher(String key, String value) {
122122
}
123123

124124
@Override
125-
@SuppressWarnings(
126-
"deprecation") // support deprecated semconv attributes for backwards compatibility
125+
@SuppressWarnings("deprecation") // support deprecated semconv for backwards compatibility
127126
public boolean test(
128127
Attributes attributes, LazyHttpUrl lazyHttpUrl, LazyHttpTarget lazyHttpTarget) {
129128
String val = MatcherGroup.getValueIncludingThreadName(attributes, key);
@@ -215,8 +214,7 @@ private KeyOnlyMatcher(String key) {
215214
}
216215

217216
@Override
218-
@SuppressWarnings(
219-
"deprecation") // support deprecated semconv attributes for backwards compatibility
217+
@SuppressWarnings("deprecation") // support deprecated semconv for backwards compatibility
220218
public boolean test(
221219
Attributes attributes,
222220
@Nullable LazyHttpUrl lazyHttpUrl,
@@ -251,8 +249,7 @@ private String get() {
251249
}
252250
}
253251

254-
@SuppressWarnings(
255-
"deprecation") // support deprecated semconv attributes for backwards compatibility
252+
@SuppressWarnings("deprecation") // support deprecated semconv for backwards compatibility
256253
private static boolean getHttpUrlKeyOldOrStableSemconv(AttributeKey<String> key) {
257254
String keyString = key.getKey();
258255
return keyString.equals(HttpIncubatingAttributes.HTTP_URL.getKey())

0 commit comments

Comments
 (0)