Skip to content

Commit

Permalink
Add new meta tag _dd.p.appsec
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Oct 24, 2024
1 parent 1510ef9 commit 5feaef4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions appsec/src/extension/tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#endif

#define DD_TAG_DATA "_dd.appsec.json"
#define DD_TAG_P_APPSEC "_dd.p.appsec"
#define DD_TAG_EVENT "appsec.event"
#define DD_TAG_BLOCKED "appsec.blocked"
#define DD_TAG_RUNTIME_FAMILY "_dd.runtime_family"
Expand Down Expand Up @@ -63,6 +64,7 @@
static zend_string *_dd_tag_data_zstr;
static zend_string *_dd_tag_event_zstr;
static zend_string *_dd_tag_blocked_zstr;
static zend_string *_dd_tag_p_appsec_zstr;
static zend_string *_dd_tag_http_method_zstr;
static zend_string *_dd_tag_http_user_agent_zstr;
static zend_string *_dd_tag_http_status_code_zstr;
Expand Down Expand Up @@ -130,6 +132,8 @@ void dd_tags_startup()
_true_zstr = zend_string_init_interned(LSTRARG("true"), 1 /* permanent */);
_false_zstr =
zend_string_init_interned(LSTRARG("false"), 1 /* permanent */);
_dd_tag_p_appsec_zstr =
zend_string_init_interned(LSTRARG(DD_TAG_P_APPSEC), 1 /* permanent */);

_dd_tag_http_method_zstr =
zend_string_init_interned(LSTRARG(DD_TAG_HTTP_METHOD), 1);
Expand Down Expand Up @@ -490,6 +494,9 @@ static void _add_all_tags_to_meta(
_dd_response_headers(meta_ht);
_dd_event_user_id(meta_ht);
_dd_appsec_blocked(meta_ht);

_add_new_zstr_to_meta(
meta_ht, _dd_tag_p_appsec_zstr, _true_zstr, true, false);
}

static void _add_new_zstr_to_meta(zend_array *meta_ht, zend_string *key,
Expand Down

0 comments on commit 5feaef4

Please sign in to comment.