Skip to content

Commit 91be37e

Browse files
committed
Convert nr.ids to comma separated values
1 parent 7ffc923 commit 91be37e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

newrelic/core/data_collector.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ def send_ml_events(self, sampling_info, custom_event_data):
117117

118118
def send_span_events(self, sampling_info, span_event_data):
119119
"""Called to submit sample set for span events."""
120-
120+
# TODO: remove this later after list types are suported.
121+
for span_event in span_event_data:
122+
ids = span_event[1].get("nr.ids")
123+
if ids:
124+
span_event[1]["nr.ids"] = ",".join(ids)
121125
payload = (self.agent_run_id, sampling_info, span_event_data)
122126
return self._protocol.send("span_event_data", payload)
123127

newrelic/core/node_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dic
7676
u_attrs = self.processed_user_attributes
7777
if settings.distributed_tracing.unique_spans.enabled:
7878
# ids is the list of span guids that share this unqiue exit span.
79-
u_attrs["ids"] = self.ids
79+
u_attrs["nr.ids"] = self.ids
8080

8181
u_attrs = attribute.resolve_user_attributes(
8282
u_attrs, settings.attribute_filter, DST_SPAN_EVENTS, attr_class=attr_class

0 commit comments

Comments
 (0)