Skip to content

Commit

Permalink
fix(axiom): Correct the attribute bucket.
Browse files Browse the repository at this point in the history
  • Loading branch information
zsistla committed Dec 24, 2024
1 parent 6b7eaf0 commit d7c4d79
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions axiom/nr_span_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ void nr_span_event_set_message(nr_span_event_t* event,
nro_set_hash_string(event->agent_attributes, "cloud.region", new_value);
break;
case NR_SPAN_MESSAGE_CLOUD_ACCOUNT_ID:
nro_set_hash_string(event->intrinsics, "cloud.account.id", new_value);
nro_set_hash_string(event->agent_attributes, "cloud.account.id",
new_value);
break;
case NR_SPAN_MESSAGE_MESSAGING_SYSTEM:
nro_set_hash_string(event->agent_attributes, "messaging.system",
Expand All @@ -384,7 +385,7 @@ void nr_span_event_set_message(nr_span_event_t* event,
new_value);
break;
case NR_SPAN_MESSAGE_SERVER_ADDRESS:
nro_set_hash_string(event->intrinsics, "server.address", new_value);
nro_set_hash_string(event->agent_attributes, "server.address", new_value);
break;
}
}
Expand Down Expand Up @@ -541,15 +542,17 @@ const char* nr_span_event_get_message(const nr_span_event_t* event,
case NR_SPAN_MESSAGE_CLOUD_REGION:
return nro_get_hash_string(event->agent_attributes, "cloud.region", NULL);
case NR_SPAN_MESSAGE_CLOUD_ACCOUNT_ID:
return nro_get_hash_string(event->intrinsics, "cloud.account.id", NULL);
return nro_get_hash_string(event->agent_attributes, "cloud.account.id",
NULL);
case NR_SPAN_MESSAGE_MESSAGING_SYSTEM:
return nro_get_hash_string(event->agent_attributes, "messaging.system",
NULL);
case NR_SPAN_MESSAGE_CLOUD_RESOURCE_ID:
return nro_get_hash_string(event->agent_attributes, "cloud.resource_id",
NULL);
case NR_SPAN_MESSAGE_SERVER_ADDRESS:
return nro_get_hash_string(event->intrinsics, "server.address", NULL);
return nro_get_hash_string(event->agent_attributes, "server.address",
NULL);
}
return NULL;
}
Expand Down

0 comments on commit d7c4d79

Please sign in to comment.