Skip to content

Commit acabcc5

Browse files
authored
Merge branch 'master' into master
2 parents 941566f + 9cc58d5 commit acabcc5

32 files changed

Lines changed: 419 additions & 74 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ addons:
77

88
jdk:
99
- openjdk8
10+
- openjdk11
1011
- oraclejdk8
1112

1213
install:
1314
- mvn install -DskipTests -Dgpg.skip -Dmaven.javadoc.skip -B -V
1415

1516
sudo: false
16-
dist: trusty
17+
dist: trusty

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
## 2.3.0 - 2019-07-18
4+
- Add SNS service to AWS SDK operation whitelist JSON
5+
[PR 85](https://github.com/aws/aws-xray-sdk-java/pull/85)
6+
- Allow specification of Daemon configuration in UDPEmitter
7+
[PR 80](https://github.com/aws/aws-xray-sdk-java/pull/80)
8+
- Add support for JDK 11
9+
[PR 78](https://github.com/aws/aws-xray-sdk-java/pull/78)
10+
- Make TraceInterceptor.entityKey public
11+
[PR 73](https://github.com/aws/aws-xray-sdk-java/pull/73)
12+
313
## 2.2.1 - 2019-02-07
414
- Fixed BOM package to include new artifacts introduced in 2.2.0.
515

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,55 @@
66

77
## Installing
88

9-
The AWS X-Ray SDK for Java is compatible with Java 8 and above.
9+
The AWS X-Ray SDK for Java is compatible with Java 8 and 11.
1010

1111
Add the AWS X-Ray SDK dependencies to your pom.xml:
1212

1313
```
1414
<dependency>
1515
<groupId>com.amazonaws</groupId>
1616
<artifactId>aws-xray-recorder-sdk-core</artifactId>
17-
<version>2.2.1</version>
17+
<version>2.3.0</version>
1818
</dependency>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-xray-recorder-sdk-apache-http</artifactId>
22-
<version>2.2.1</version>
22+
<version>2.3.0</version>
2323
</dependency>
2424
<dependency>
2525
<groupId>com.amazonaws</groupId>
2626
<artifactId>aws-xray-recorder-sdk-aws-sdk</artifactId>
27-
<version>2.2.1</version>
27+
<version>2.3.0</version>
2828
</dependency>
2929
<dependency>
3030
<groupId>com.amazonaws</groupId>
3131
<artifactId>aws-xray-recorder-sdk-aws-sdk-v2</artifactId>
32-
<version>2.2.1</version>
32+
<version>2.3.0</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>com.amazonaws</groupId>
3636
<artifactId>aws-xray-recorder-sdk-aws-sdk-instrumentor</artifactId>
37-
<version>2.2.1</version>
37+
<version>2.3.0</version>
3838
</dependency>
3939
<dependency>
4040
<groupId>com.amazonaws</groupId>
4141
<artifactId>aws-xray-recorder-sdk-aws-sdk-v2-instrumentor</artifactId>
42-
<version>2.2.1</version>
42+
<version>2.3.0</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>com.amazonaws</groupId>
4646
<artifactId>aws-xray-recorder-sdk-sql-mysql</artifactId>
47-
<version>2.2.1</version>
47+
<version>2.3.0</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>com.amazonaws</groupId>
5151
<artifactId>aws-xray-recorder-sdk-sql-postgresql</artifactId>
52-
<version>2.2.1</version>
52+
<version>2.3.0</version>
5353
</dependency>
5454
<dependency>
5555
<groupId>com.amazonaws</groupId>
5656
<artifactId>aws-xray-recorder-sdk-spring</artifactId>
57-
<version>2.2.1</version>
57+
<version>2.3.0</version>
5858
</dependency>
5959
```
6060

aws-xray-recorder-sdk-apache-http/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<parent>
55
<groupId>com.amazonaws</groupId>
66
<artifactId>aws-xray-recorder-sdk-pom</artifactId>
7-
<version>2.2.1</version>
7+
<version>2.3.0</version>
88
</parent>
99
<groupId>com.amazonaws</groupId>
1010
<artifactId>aws-xray-recorder-sdk-apache-http</artifactId>
11-
<version>2.2.1</version>
11+
<version>2.3.0</version>
1212
<name>AWS X-Ray Recorder SDK for Java - Apache HTTP Client Proxy</name>
1313
<build>
1414
<plugins>

aws-xray-recorder-sdk-apache-http/src/main/java/com/amazonaws/xray/proxies/apache/http/HttpClientBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public class HttpClientBuilder extends org.apache.http.impl.client.HttpClientBui
1616

1717
private AWSXRayRecorder recorder;
1818

19+
protected HttpClientBuilder() {
20+
super();
21+
}
22+
1923
public static HttpClientBuilder create() {
2024
HttpClientBuilder newBuilder = new HttpClientBuilder();
2125
newBuilder.setRecorder(AWSXRay.getGlobalRecorder());
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.amazonaws.xray.proxies.apache.http;
2+
3+
import java.lang.reflect.Constructor;
4+
import java.lang.reflect.Modifier;
5+
6+
import org.junit.Before;
7+
import org.junit.FixMethodOrder;
8+
import org.junit.Test;
9+
import org.junit.runners.MethodSorters;
10+
import org.mockito.Mockito;
11+
12+
import com.amazonaws.xray.AWSXRay;
13+
import com.amazonaws.xray.AWSXRayRecorderBuilder;
14+
import com.amazonaws.xray.emitters.Emitter;
15+
import com.amazonaws.xray.proxies.apache.http.HttpClientBuilder;
16+
17+
import static org.junit.Assert.assertEquals;
18+
19+
@FixMethodOrder(MethodSorters.JVM)
20+
public class HttpClientBuilderTest {
21+
22+
@Before
23+
public void setupAWSXRay() {
24+
// Prevent accidental publish to Daemon
25+
Emitter blankEmitter = Mockito.mock(Emitter.class);
26+
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
27+
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
28+
AWSXRay.setGlobalRecorder(AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).build());
29+
AWSXRay.clearTraceEntity();
30+
}
31+
32+
@Test
33+
public void testConstructorProtected() throws NoSuchMethodException {
34+
// Since the constructor is protected and this is in the same package, we have to test this using reflection.
35+
Constructor clientBuilderConstructor = HttpClientBuilder.class.getDeclaredConstructor();
36+
assertEquals(Modifier.PROTECTED, clientBuilderConstructor.getModifiers()); // PROTECTED = 4;
37+
}
38+
}

aws-xray-recorder-sdk-aws-sdk-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<artifactId>aws-xray-recorder-sdk-pom</artifactId>
77
<groupId>com.amazonaws</groupId>
8-
<version>2.2.1</version>
8+
<version>2.3.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>aws-xray-recorder-sdk-aws-sdk-core</artifactId>
13-
<version>2.2.1</version>
13+
<version>2.3.0</version>
1414
<name>AWS X-Ray Recorder SDK for Java - AWS SDK Core</name>
1515
<build>
1616
<plugins>

aws-xray-recorder-sdk-aws-sdk-instrumentor/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<parent>
55
<groupId>com.amazonaws</groupId>
66
<artifactId>aws-xray-recorder-sdk-pom</artifactId>
7-
<version>2.2.1</version>
7+
<version>2.3.0</version>
88
</parent>
99
<groupId>com.amazonaws</groupId>
1010
<artifactId>aws-xray-recorder-sdk-aws-sdk-instrumentor</artifactId>
11-
<version>2.2.1</version>
11+
<version>2.3.0</version>
1212
<name>AWS X-Ray Recorder SDK for Java - AWS SDK Instrumentor</name>
1313
<build>
1414
<plugins>

aws-xray-recorder-sdk-aws-sdk-v2-instrumentor/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<artifactId>aws-xray-recorder-sdk-pom</artifactId>
77
<groupId>com.amazonaws</groupId>
8-
<version>2.2.1</version>
8+
<version>2.3.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>aws-xray-recorder-sdk-aws-sdk-v2-instrumentor</artifactId>
13-
<version>2.2.1</version>
13+
<version>2.3.0</version>
1414
<name>AWS X-Ray Recorder SDK for Java - AWS SDK V2 Instrumentor</name>
1515
<build>
1616
<plugins>

aws-xray-recorder-sdk-aws-sdk-v2/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<artifactId>aws-xray-recorder-sdk-pom</artifactId>
77
<groupId>com.amazonaws</groupId>
8-
<version>2.2.1</version>
8+
<version>2.3.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>aws-xray-recorder-sdk-aws-sdk-v2</artifactId>
13-
<version>2.2.1</version>
13+
<version>2.3.0</version>
1414
<name>AWS X-Ray Recorder SDK for Java - AWS SDK V2</name>
1515
<build>
1616
<plugins>

0 commit comments

Comments
 (0)