Skip to content

Commit a307d98

Browse files
authored
Merge pull request #985 from microsoft/buildme/normalize-white-space
Normalize white space
2 parents 5e57c52 + 438d078 commit a307d98

File tree

218 files changed

+9331
-9331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+9331
-9331
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ Livemetrics UX.
243243

244244
## Version 1.0.1
245245
- The [Java agent](app-insights-java-agent.md) collects dependency information about the following:
246-
- HTTP calls made via HttpClient, OkHttp and RestTemplate (Spring).
247-
- Calls to Redis made via the Jedis client. When a configurable threshold is passed, the SDK will also fetch the call arguments.
248-
- JDBC calls made with Oracle DB and Apache Derby DB clients.
249-
- Support the 'executeBatch' query type for prepared statements – The SDK will show the statement with the number of batches.
250-
- Provide the query plan for JDBC clients that has support for that (MySql, PostgreSql) – The query plan is fetched only when a configurable threshold is crossed
246+
- HTTP calls made via HttpClient, OkHttp and RestTemplate (Spring).
247+
- Calls to Redis made via the Jedis client. When a configurable threshold is passed, the SDK will also fetch the call arguments.
248+
- JDBC calls made with Oracle DB and Apache Derby DB clients.
249+
- Support the 'executeBatch' query type for prepared statements – The SDK will show the statement with the number of batches.
250+
- Provide the query plan for JDBC clients that has support for that (MySql, PostgreSql) – The query plan is fetched only when a configurable threshold is crossed
251251

252252
## Version 1.0.0
253253
- Adding support for the Application Insights writer plugin for CollectD.

NOTICE

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ Notices, if any, for the third party programs are included for your information
2121

2222
Microsoft Application Insights Java Software Development Kit consists of material from the project(s) listed below (collectively, "Distributed Code"). Microsoft Corporation ("Microsoft") is not the original author of some of the Distributed Code. The original copyright notices and licenses, under which Microsoft received such Distributed Code, are set out below. This Distributed Code are licensed to you under their original license terms set forth below. Microsoft reserves all other rights not expressly granted under these terms, whether by implication, estoppel or otherwise.
2323

24-
1. Apache Commons-codec version 1.9 (http://commons.apache.org/proper/commons-codec/download_codec.cgi)
25-
2. Apache Commons Lang3 version 3.3.7 (http://commons.apache.org/proper/commons-lang/)
26-
3. Apache Commons Logging version 1.2 (http://commons.apache.org/proper/commons-logging/)
27-
4. Apache Commons-io version 2.6 (http://commons.apache.org/proper/commons-io/)
28-
5. Apache HttpComponents Client version 4.5.3 (http://hc.apache.org/downloads.cgi)
29-
6. Apache HttpComponents Core version 4.4.6 (http://hc.apache.org/downloads.cgi)
30-
7. ASM version 7.0 (http://asm.ow2.org/)
31-
8. ASM Commons version 7.0 (http://asm.ow2.org/)
32-
9. Guava version 27.1-android (https://github.com/google/guava)
33-
10. INFOMAS PCM Application Suite version 3.0.4 (https://github.com/rmuller/infomas-asl)
34-
11. JSR-305 version 2.0.1 (http://code.google.com/p/jsr-305/)
24+
1. Apache Commons-codec version 1.9 (http://commons.apache.org/proper/commons-codec/download_codec.cgi)
25+
2. Apache Commons Lang3 version 3.3.7 (http://commons.apache.org/proper/commons-lang/)
26+
3. Apache Commons Logging version 1.2 (http://commons.apache.org/proper/commons-logging/)
27+
4. Apache Commons-io version 2.6 (http://commons.apache.org/proper/commons-io/)
28+
5. Apache HttpComponents Client version 4.5.3 (http://hc.apache.org/downloads.cgi)
29+
6. Apache HttpComponents Core version 4.4.6 (http://hc.apache.org/downloads.cgi)
30+
7. ASM version 7.0 (http://asm.ow2.org/)
31+
8. ASM Commons version 7.0 (http://asm.ow2.org/)
32+
9. Guava version 27.1-android (https://github.com/google/guava)
33+
10. INFOMAS PCM Application Suite version 3.0.4 (https://github.com/rmuller/infomas-asl)
34+
11. JSR-305 version 2.0.1 (http://code.google.com/p/jsr-305/)
3535
12. Protobuf-java version 3.6.1 (https://github.com/protocolbuffers/protobuf)
3636
13. gRPC Stubs version 1.16.1 (https://github.com/grpc/grpc-java)
3737
14. gRPC Protobuf version 1.16.1 (https://github.com/grpc/grpc-java)

azure-application-insights-spring-boot-starter/src/test/java/com/microsoft/applicationinsights/autoconfigure/ApplicationInsightsStarterCoreParityTests.java

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,61 +15,61 @@
1515
import org.springframework.test.context.junit4.SpringRunner;
1616

1717
@SpringBootTest(
18-
properties = {
19-
"spring.application.name: test-application",
20-
"azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000"
21-
},
22-
classes = {
23-
PropertyPlaceholderAutoConfiguration.class,
24-
ApplicationInsightsTelemetryAutoConfiguration.class,
25-
ApplicationInsightsWebMvcAutoConfiguration.class
26-
}
18+
properties = {
19+
"spring.application.name: test-application",
20+
"azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000"
21+
},
22+
classes = {
23+
PropertyPlaceholderAutoConfiguration.class,
24+
ApplicationInsightsTelemetryAutoConfiguration.class,
25+
ApplicationInsightsWebMvcAutoConfiguration.class
26+
}
2727
)
2828
@RunWith(SpringRunner.class)
2929
public class ApplicationInsightsStarterCoreParityTests {
3030

31-
//Instance from Spring Bean Factory
32-
@Autowired
33-
TelemetryClient telemetryClient;
31+
//Instance from Spring Bean Factory
32+
@Autowired
33+
TelemetryClient telemetryClient;
3434

35-
@Test
36-
public void shouldHaveIdenticalConfiguration() throws Exception{
37-
Field field = telemetryClient.getClass().getDeclaredField("configuration");
38-
field.setAccessible(true);
39-
TelemetryConfiguration config1 = (TelemetryConfiguration)field.get(telemetryClient);
35+
@Test
36+
public void shouldHaveIdenticalConfiguration() throws Exception{
37+
Field field = telemetryClient.getClass().getDeclaredField("configuration");
38+
field.setAccessible(true);
39+
TelemetryConfiguration config1 = (TelemetryConfiguration)field.get(telemetryClient);
4040

41-
//needed for clearing down the active instance and get the new config.
42-
tearDown();
41+
//needed for clearing down the active instance and get the new config.
42+
tearDown();
4343

44-
//Instance created from XML config.
45-
TelemetryClient t2 = new TelemetryClient();
44+
//Instance created from XML config.
45+
TelemetryClient t2 = new TelemetryClient();
4646

47-
Field field2 = t2.getClass().getDeclaredField("configuration");
48-
field2.setAccessible(true);
49-
TelemetryConfiguration config2 = (TelemetryConfiguration)field2.get(t2);
47+
Field field2 = t2.getClass().getDeclaredField("configuration");
48+
field2.setAccessible(true);
49+
TelemetryConfiguration config2 = (TelemetryConfiguration)field2.get(t2);
5050

51-
Assert.assertNotEquals(config1, config2);
52-
//There is one additional TelemetryInitializer in case of SpringBoot(For Cloud_RoleName)
53-
Assert.assertEquals(config1.getTelemetryInitializers().size(), config2.getTelemetryInitializers().size() + 1);
54-
Assert.assertEquals(config1.getTelemetryModules().size(), config2.getTelemetryModules().size());
55-
Assert.assertEquals(config1.getContextInitializers().size(), config2.getContextInitializers().size());
56-
Assert.assertEquals(config1.getTelemetryProcessors().size(), config2.getTelemetryProcessors().size());
57-
Assert.assertEquals(config1.getInstrumentationKey(), config2.getInstrumentationKey());
58-
Assert.assertEquals(config1.isTrackingDisabled(), config2.isTrackingDisabled());
59-
}
51+
Assert.assertNotEquals(config1, config2);
52+
//There is one additional TelemetryInitializer in case of SpringBoot(For Cloud_RoleName)
53+
Assert.assertEquals(config1.getTelemetryInitializers().size(), config2.getTelemetryInitializers().size() + 1);
54+
Assert.assertEquals(config1.getTelemetryModules().size(), config2.getTelemetryModules().size());
55+
Assert.assertEquals(config1.getContextInitializers().size(), config2.getContextInitializers().size());
56+
Assert.assertEquals(config1.getTelemetryProcessors().size(), config2.getTelemetryProcessors().size());
57+
Assert.assertEquals(config1.getInstrumentationKey(), config2.getInstrumentationKey());
58+
Assert.assertEquals(config1.isTrackingDisabled(), config2.isTrackingDisabled());
59+
}
6060

61-
@AfterClass
62-
public static void tearDown() throws Exception {
63-
Method method = TelemetryConfiguration.class.getDeclaredMethod("setActiveAsNull");
64-
method.setAccessible(true);
65-
method.invoke(null);
61+
@AfterClass
62+
public static void tearDown() throws Exception {
63+
Method method = TelemetryConfiguration.class.getDeclaredMethod("setActiveAsNull");
64+
method.setAccessible(true);
65+
method.invoke(null);
6666

67-
//InternalLogger needs to be shutdown
68-
Field field = InternalLogger.class.getDeclaredField("initialized");
69-
field.setAccessible(true);
70-
field.set(InternalLogger.INSTANCE, false);
71-
System.out.println("Exiting core parity tests");
72-
}
67+
//InternalLogger needs to be shutdown
68+
Field field = InternalLogger.class.getDeclaredField("initialized");
69+
field.setAccessible(true);
70+
field.set(InternalLogger.INSTANCE, false);
71+
System.out.println("Exiting core parity tests");
72+
}
7373

7474

7575
}

collectd/src/main/java/com/microsoft/applicationinsights/collectd/ApplicationInsightsWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public int write(ValueList valueList) {
196196
this.telemetryClient.trackMetric(metricTelemetry);
197197
}
198198
} catch (ThreadDeath td) {
199-
throw td;
199+
throw td;
200200
} catch (Throwable t) {
201201
try {
202202
String errorMessage =

core/src/main/java/com/microsoft/applicationinsights/TelemetryClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public void track(Telemetry telemetry) {
415415
try {
416416
telemetry.getContext().initialize(ctx);
417417
} catch (ThreadDeath td) {
418-
throw td;
418+
throw td;
419419
} catch (Throwable t) {
420420
try {
421421
InternalLogger.INSTANCE.error("Exception while telemetry context's initialization: '%s'", t.toString()); } catch (ThreadDeath td) {
@@ -438,14 +438,14 @@ public void track(Telemetry telemetry) {
438438
try {
439439
QuickPulseDataCollector.INSTANCE.add(telemetry);
440440
} catch (ThreadDeath td) {
441-
throw td;
441+
throw td;
442442
} catch (Throwable t) {
443443
}
444444

445445
try {
446446
getChannel().send(telemetry);
447447
} catch (ThreadDeath td) {
448-
throw td;
448+
throw td;
449449
} catch (Throwable t) {
450450
try {
451451
InternalLogger.INSTANCE.error("Exception while sending telemetry: '%s'",t.toString()); } catch (ThreadDeath td) {
@@ -480,7 +480,7 @@ private boolean activateProcessors(Telemetry telemetry) {
480480
return false;
481481
}
482482
} catch (ThreadDeath td) {
483-
throw td;
483+
throw td;
484484
} catch (Throwable t) {
485485
try {
486486
InternalLogger.INSTANCE.error("Exception while processing telemetry: '%s'",t.toString()); } catch (ThreadDeath td) {
@@ -523,7 +523,7 @@ private TelemetryContext createInitializedContext() {
523523
try {
524524
init.initialize(ctx);
525525
} catch (ThreadDeath td) {
526-
throw td;
526+
throw td;
527527
} catch (Throwable t) {
528528
try {
529529
if (InternalLogger.INSTANCE.isErrorEnabled()) {

0 commit comments

Comments
 (0)