Skip to content

Commit

Permalink
renamed _X_AMZN_TRACE_ID to com.amazonaws.xray.traceHeader (#7)
Browse files Browse the repository at this point in the history
aws-xray renamed _X_AMZN_TRACE_ID environment property to  System Property com.amazonaws.xray.traceHeader
aws/aws-xray-sdk-java#251
  • Loading branch information
mfriesen authored Jan 22, 2021
1 parent bd9cb54 commit e0f44dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

group 'com.formkiq'
version '2.2.0'
version '2.2.1'

spotless {
java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private static void invokeClass(

String xamazTraceId = event.getHeaderValue("Lambda-Runtime-Trace-Id");
if (xamazTraceId != null) {
System.setProperty("_X_AMZN_TRACE_ID", xamazTraceId);
System.setProperty("com.amazonaws.xray.traceHeader", xamazTraceId);
}

context = new LambdaContext(requestId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,6 @@ public void testInvoke11() throws Exception {
// then
String expected = "{\"body\":\"this is some data\"}";
assertEquals(expected, invocationResponseHandler.getResponse());
assertNotNull(System.getProperty("_X_AMZN_TRACE_ID"));
assertNotNull(System.getProperty("com.amazonaws.xray.traceHeader"));
}
}

0 comments on commit e0f44dc

Please sign in to comment.