Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debug segmentation fault due to trace id
  • Loading branch information
anmol-ap committed Mar 13, 2025
commit b9aa5c66e74c4413ca98a62977eed2d29b5ee8ae
4 changes: 3 additions & 1 deletion axiom/nr_txn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3259,15 +3259,17 @@ char* nr_txn_get_current_trace_id(nrtxn_t* txn) {
const char* trace_id;

if (NULL == txn) {
nrl_debug(NRL_AGENT, "%s", "nr_txn_get_current_trace_id : txn is NULL");
return NULL;
}

trace_id = nr_distributed_trace_get_trace_id(txn->distributed_trace);
nrl_debug(NRL_AGENT, "nr_distributed_trace_get_trace_id : %s", trace_id);

if ((NULL == trace_id) || (!txn->options.distributed_tracing_enabled)) {
return NULL;
}

nrl_debug(NRL_AGENT, "returning trace_id : %s", trace_id);
return nr_strdup(trace_id);
}

Expand Down