Skip to content

Commit ea6886e

Browse files
committed
wip
1 parent 4af764e commit ea6886e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dd-java-agent/appsec/src/main/java/com/datadog/appsec/AppSecSystem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ private static void doStart(SubscriptionService gw, SharedCommunicationObjects s
7171

7272
ApiSecuritySampler requestSampler;
7373
if (Config.get().isApiSecurityEnabled()) {
74-
// TODO: Address support for 1-click enablement
7574
requestSampler = new ApiSecuritySamplerImpl();
75+
// When DD_API_SECURITY_ENABLED=true, ths post-processor is set even when AppSec is inactive. This should be
76+
// low overhead since the post-processor exits early when there is no AppSec request context.
7677
SpanPostProcessor.Holder.INSTANCE =
7778
new AppSecSpanPostProcessor(requestSampler, REPLACEABLE_EVENT_PRODUCER);
7879
} else {

0 commit comments

Comments
 (0)