def _create_trace_context(self, trace_tag, hook): # if no trace_tag then create a unique one if not trace_tag: trace_tag = 'webhook-%s-%s' % (hook, uuid.uuid4().hex) return TraceContext(trace_tag=trace_tag)