Skip to content

Commit 572b437

Browse files
authored
Update gcp_pubsub_service.py
1 parent bfce338 commit 572b437

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/gcp_pubsub_service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,21 @@ def process_message(self, message):
6767
parent_id = payload.get("parent_id", "")
6868
transaction_id = payload.get("transaction_id", "")
6969
sample_name = payload.get("name", "sample")
70+
source = payload.get("source", "")
7071
category = None
7172
if "category=static" in sandbox_options:
7273
category = "static"
7374

7475
# Format custom fields with truncation to fit 255 chars
7576
custom_parts = []
76-
if sample_name:
77-
custom_parts.append(f"name:{sample_name}")
7877
if parent_id:
7978
custom_parts.append(f"parent_id:{parent_id}")
8079
if transaction_id:
8180
custom_parts.append(f"transaction_id:{transaction_id}")
81+
if source:
82+
custom_parts.append(f"source:{source}")
83+
if sample_name:
84+
custom_parts.append(f"name:{sample_name}")
8285

8386
custom = ",".join(custom_parts)
8487
if len(custom) > 255:

0 commit comments

Comments
 (0)