diff --git a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/SecurityIntrospector.java b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/SecurityIntrospector.java index 6079f9231..2fd1d20ad 100644 --- a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/SecurityIntrospector.java +++ b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/SecurityIntrospector.java @@ -41,5 +41,7 @@ public interface SecurityIntrospector { void setK2TracingData(String value); + void setK2ParentId(String value); + void clear(); } \ No newline at end of file diff --git a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/SecurityIntrospectorImpl.java b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/SecurityIntrospectorImpl.java index 2cfe71d78..0ae2b5154 100644 --- a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/SecurityIntrospectorImpl.java +++ b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/SecurityIntrospectorImpl.java @@ -3,6 +3,7 @@ import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.Agent; import com.newrelic.api.agent.security.NewRelicSecurity; +import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.JdbcHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.HttpRequest; @@ -108,6 +109,11 @@ public void setK2TracingData(String value) { NewRelicSecurity.getAgent().getSecurityMetaData().setTracingHeaderValue(value); } + @Override + public void setK2ParentId(String value) { + NewRelicSecurity.getAgent().getSecurityMetaData().addCustomAttribute(GenericHelper.CSEC_PARENT_ID, value); + } + @Override public void setRequestInputStreamHash(int hashCode) { NewRelicSecurity.getAgent().getSecurityMetaData().addCustomAttribute(REQUEST_INPUTSTREAM_HASH, Collections.singleton(hashCode));