Skip to content

Commit

Permalink
Let standard limiters to work when standalone not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Dec 17, 2024
1 parent 0926c77 commit 0f87461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/asm_event.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "asm_event.h"

#include "configuration.h"
#include "ddtrace.h"
#include "priority_sampling/priority_sampling.h"
#include "tracer_tag_propagation/tracer_tag_propagation.h"
Expand All @@ -24,7 +26,9 @@ DDTRACE_PUBLIC void ddtrace_emit_asm_event() {
ZVAL_STR(&_1_zval, _1_zstr);
ddtrace_add_propagated_tag(_dd_tag_p_appsec_zstr, &_1_zval);

ddtrace_set_priority_sampling_on_root(PRIORITY_SAMPLING_USER_KEEP, DD_MECHANISM_ASM);
if (get_DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED()) {
ddtrace_set_priority_sampling_on_root(PRIORITY_SAMPLING_USER_KEEP, DD_MECHANISM_ASM);
}
}

PHP_FUNCTION(DDTrace_Testing_emit_asm_event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Distributed tracing header tags propagate asm events with curl_exec()
--ENV--
DD_TRACE_TRACED_INTERNAL_FUNCTIONS=curl_exec
HTTP_X_DATADOG_TRACE_ID=42
DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED=1
--FILE--
<?php

Expand Down

0 comments on commit 0f87461

Please sign in to comment.