Skip to content

Commit 923101a

Browse files
committed
auto review
1 parent f96b09d commit 923101a

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

ext/live_debugger.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,16 +391,14 @@ static void dd_log_probe_ensure_payload(dd_log_probe_dyn *dyn, dd_log_probe_def
391391
if (dyn->payload) {
392392
ddog_update_payload_message(dyn->payload, *msg);
393393
} else {
394-
zend_string *process_tags = ddtrace_process_tags_get_serialized();
395-
396394
dyn->service = ddtrace_active_service_name();
397395
dyn->payload = ddog_create_log_probe_snapshot(
398396
&def->parent.probe,
399397
msg,
400398
dd_zend_string_to_CharSlice(dyn->service),
401399
DDOG_CHARSLICE_C("php"),
402400
ddtrace_nanoseconds_realtime() / 1000000,
403-
process_tags ? dd_zend_string_to_CharSlice(process_tags) : DDOG_CHARSLICE_C(""));
401+
ddtrace_process_tags_get_serialized());
404402
}
405403
}
406404

ext/process_tags.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void serialize_process_tags(void) {
193193
}
194194

195195
zend_string *ddtrace_process_tags_get_serialized(void) {
196-
return (ddtrace_process_tags_enabled() && process_tags.serialized) ? process_tags.serialized : NULL;
196+
return (ddtrace_process_tags_enabled() && process_tags.serialized) ? process_tags.serialized : ZSTR_EMPTY_ALLOC();
197197
}
198198

199199
bool ddtrace_process_tags_enabled(void){

ext/span.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,14 +1114,7 @@ void ddtrace_serialize_closed_spans(ddog_TracesBytes *traces, bool fast_shutdown
11141114
do {
11151115
ddtrace_span_data *tmp = span;
11161116
span = tmp->next;
1117-
bool is_first_span = (ddog_get_trace_size(trace) == 0);
1118-
ddog_SpanBytes *rust_span = ddtrace_serialize_span_to_rust_span(tmp, trace);
1119-
if (is_first_span) {
1120-
zend_string *process_tags = ddtrace_process_tags_get_serialized();
1121-
if (process_tags) {
1122-
ddog_add_str_span_meta_zstr(rust_span, "_dd.process_tags", process_tags);
1123-
}
1124-
}
1117+
ddtrace_serialize_span_to_rust_span(tmp, trace);
11251118
#if PHP_VERSION_ID < 70400
11261119
// remove the artificially increased RC while closing again
11271120
GC_SET_REFCOUNT(&tmp->std, GC_REFCOUNT(&tmp->std) - DD_RC_CLOSED_MARKER);

0 commit comments

Comments
 (0)