Skip to content

Commit 924889d

Browse files
committed
AWS versions bump
1 parent 3fec8d0 commit 924889d

16 files changed

+1379
-1275
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,8 @@ Before we can accept a pull request, you must sign our [Contributor Licensing Ag
3737
Minimally, the [test suite](#testing-guidelines) must pass for us to accept a PR. Ideally, we would love it if you also added appropriate tests if you're implementing a feature!
3838

3939
## Coding Style Guidelines
40-
Our code base is formatted according to the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
41-
42-
The project is configured to use the [google-java-format-gradle-plugin](https://github.com/sherter/google-java-format-gradle-plugin) which can be utilized as follows:
43-
44-
* Execute the task `googleJavaFormat` to format all `*.java` files in the project:
45-
46-
`./gradlew goJF`
47-
48-
* Execute the task `verifyGoogleJavaFormat` to verify that all `*.java` files are formatted properly:
49-
50-
`./gradlew verGJF`
40+
- Use the style provided in `dev-tools/code-style/java-agent-code-style.xml` in the project.
41+
- We encourage you to reduce tech debt you might find in the area. Leave the code better than you found it.
5142

5243
## Testing Guidelines
5344
The AWS Lambda OpenTracing Java SDK comes with tests in `src/test` that can be run with `./gradlew test`.

build.gradle

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ buildscript {
77
}
88

99
}
10-
dependencies {
11-
classpath "gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.9"
12-
}
1310
}
1411

1512
plugins {
@@ -25,8 +22,6 @@ java {
2522
withJavadocJar()
2623
}
2724

28-
apply plugin: 'com.github.sherter.google-java-format'
29-
3025
repositories {
3126
mavenCentral()
3227
maven {
@@ -35,12 +30,22 @@ repositories {
3530
}
3631

3732
dependencies {
38-
implementation 'com.amazonaws:aws-lambda-java-core:1.1.0'
33+
//implementation 'software.amazon.awssdk:bom:2.31.43'
34+
35+
implementation 'software.amazon.awssdk:s3:2.31.43'
36+
implementation 'software.amazon.awssdk:s3-event-notifications:2.31.43'
37+
//implementation 'software.amazon.awssdk:kinesis:2.31.43'
38+
//implementation 'software.amazon.awssdk:dynamodb:2.31.43'
39+
40+
implementation 'com.amazonaws:aws-lambda-java-core:1.2.3'
3941
// 2.2.7 is earliest version that has all needed event sources
40-
implementation 'com.amazonaws:aws-lambda-java-events:2.2.7'
41-
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.771'
42-
implementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.163'
43-
implementation 'com.amazonaws:aws-java-sdk-dynamodb:1.11.163'
42+
implementation 'com.amazonaws:aws-lambda-java-events:3.15.0'
43+
44+
45+
//implementation 'com.amazonaws:aws-java-sdk-s3:1.12.771'
46+
//implementation 'com.amazonaws:aws-java-sdk-kinesis:1.11.163'
47+
//implementation 'com.amazonaws:aws-java-sdk-dynamodb:1.11.163'
48+
4449
implementation('io.opentracing:opentracing-api:0.33.0')
4550
implementation('io.opentracing:opentracing-util:0.33.0')
4651
implementation('io.opentracing:opentracing-noop:0.33.0')

src/main/java/com/newrelic/opentracing/aws/EnhancedSpanBuilder.java

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,66 +10,72 @@
1010
import io.opentracing.Tracer;
1111

1212
public class EnhancedSpanBuilder {
13-
private final Tracer.SpanBuilder spanBuilder;
13+
private final Tracer.SpanBuilder spanBuilder;
1414

15-
public static EnhancedSpanBuilder basedOn(Tracer tracer, String operationName) {
16-
return new EnhancedSpanBuilder(tracer.buildSpan(operationName));
17-
}
15+
public static EnhancedSpanBuilder basedOn(Tracer tracer, String operationName) {
16+
return new EnhancedSpanBuilder(tracer.buildSpan(operationName));
17+
}
1818

19-
private EnhancedSpanBuilder(Tracer.SpanBuilder innerSpanBuilder) {
20-
spanBuilder = innerSpanBuilder;
21-
}
19+
private EnhancedSpanBuilder(Tracer.SpanBuilder innerSpanBuilder) {
20+
spanBuilder = innerSpanBuilder;
21+
}
2222

23-
public EnhancedSpanBuilder asChildOf(SpanContext spanContext) {
24-
this.spanBuilder.asChildOf(spanContext);
25-
return this;
26-
}
23+
public EnhancedSpanBuilder asChildOf(SpanContext spanContext) {
24+
this.spanBuilder.asChildOf(spanContext);
25+
return this;
26+
}
2727

28-
/** Same as {@link Span#setTag(String, String)}, but for the span to be built. */
29-
EnhancedSpanBuilder withTag(String key, String value) {
30-
this.spanBuilder.withTag(key, value);
31-
return this;
32-
}
28+
/**
29+
* Same as {@link Span#setTag(String, String)}, but for the span to be built.
30+
*/
31+
EnhancedSpanBuilder withTag(String key, String value) {
32+
this.spanBuilder.withTag(key, value);
33+
return this;
34+
}
3335

34-
/** Same as {@link Span#setTag(String, boolean)}, but for the span to be built. */
35-
EnhancedSpanBuilder withTag(String key, boolean value) {
36-
this.spanBuilder.withTag(key, value);
37-
return this;
38-
}
36+
/**
37+
* Same as {@link Span#setTag(String, boolean)}, but for the span to be built.
38+
*/
39+
EnhancedSpanBuilder withTag(String key, boolean value) {
40+
this.spanBuilder.withTag(key, value);
41+
return this;
42+
}
3943

40-
/** Same as {@link Span#setTag(String, Number)}, but for the span to be built. */
41-
EnhancedSpanBuilder withTag(String key, Number value) {
42-
this.spanBuilder.withTag(key, value);
43-
return this;
44-
}
44+
/**
45+
* Same as {@link Span#setTag(String, Number)}, but for the span to be built.
46+
*/
47+
EnhancedSpanBuilder withTag(String key, Number value) {
48+
this.spanBuilder.withTag(key, value);
49+
return this;
50+
}
4551

46-
/**
47-
* A shorthand for withTag("key", "value").
48-
*
49-
* <p>If parent==null, this is a noop.
50-
*/
51-
EnhancedSpanBuilder optionallyWithTag(String key, String value) {
52-
if (value != null) {
53-
this.spanBuilder.withTag(key, value);
52+
/**
53+
* A shorthand for withTag("key", "value").
54+
*
55+
* <p>If parent==null, this is a noop.
56+
*/
57+
EnhancedSpanBuilder optionallyWithTag(String key, String value) {
58+
if (value != null) {
59+
this.spanBuilder.withTag(key, value);
60+
}
61+
return this;
5462
}
55-
return this;
56-
}
5763

58-
EnhancedSpanBuilder optionallyWithTag(String key, boolean value) {
59-
if (value) {
60-
this.spanBuilder.withTag(key, true);
64+
EnhancedSpanBuilder optionallyWithTag(String key, boolean value) {
65+
if (value) {
66+
this.spanBuilder.withTag(key, true);
67+
}
68+
return this;
6169
}
62-
return this;
63-
}
6470

65-
EnhancedSpanBuilder optionallyWithTag(String key, Number value) {
66-
if (value != null) {
67-
this.spanBuilder.withTag(key, value);
71+
EnhancedSpanBuilder optionallyWithTag(String key, Number value) {
72+
if (value != null) {
73+
this.spanBuilder.withTag(key, value);
74+
}
75+
return this;
6876
}
69-
return this;
70-
}
7177

72-
public Span start() {
73-
return this.spanBuilder.start();
74-
}
78+
public Span start() {
79+
return this.spanBuilder.start();
80+
}
7581
}

0 commit comments

Comments
 (0)