From 4d874f27f4f7b1ebf85ef838fbc4b23993aadfe2 Mon Sep 17 00:00:00 2001 From: noam-stein Date: Thu, 23 Jan 2020 16:57:57 +0200 Subject: [PATCH] add check if the app prefix exists --- beeline/trace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beeline/trace.py b/beeline/trace.py index 14a2fea..8548c68 100644 --- a/beeline/trace.py +++ b/beeline/trace.py @@ -205,7 +205,9 @@ def add_rollup_field(self, name, value): def add_trace_field(self, name, value): # prefix with app to avoid key conflicts - key = "app.%s" % name + # add the app prefix if it's missing + if not name.startswith("app."): + key = "app.%s" % name # also add to current span self.add_context_field(key, value)