|
6 | 6 |
|
7 | 7 | import opentracing.ext.tags as ext |
8 | 8 | from basictracer import Sampler, SpanRecorder |
9 | | -from .json_span import CustomData, Data, HttpData, JsonSpan, SDKData |
| 9 | +from .json_span import CustomData, Data, HttpData, SoapData, JsonSpan, SDKData |
10 | 10 | from .agent_const import AGENT_TRACES_URL |
11 | 11 |
|
12 | 12 | import sys |
|
18 | 18 |
|
19 | 19 | class InstanaRecorder(SpanRecorder): |
20 | 20 | sensor = None |
21 | | - registered_spans = ("django", "memcache", "rpc-client", "rpc-server", "urllib3", "wsgi") |
| 21 | + registered_spans = ("django", "memcache", "rpc-client", "rpc-server", |
| 22 | + "soap", "urllib3", "wsgi") |
22 | 23 | entry_kind = ["entry", "server", "consumer"] |
23 | | - exit_kind = ["exit", "client", "producer"] |
| 24 | + exit_kind = ["exit", "client", "producer", "soap"] |
24 | 25 | queue = queue.Queue() |
25 | 26 |
|
26 | 27 | def __init__(self, sensor): |
@@ -84,9 +85,11 @@ def build_registered_span(self, span): |
84 | 85 | url=self.get_string_tag(span, ext.HTTP_URL), |
85 | 86 | method=self.get_string_tag(span, ext.HTTP_METHOD), |
86 | 87 | status=self.get_tag(span, ext.HTTP_STATUS_CODE)), |
| 88 | + soap=SoapData(action=self.get_tag(span, 'soap.action')), |
87 | 89 | baggage=span.context.baggage, |
88 | 90 | custom=CustomData(tags=span.tags, |
89 | 91 | logs=self.collect_logs(span))) |
| 92 | + |
90 | 93 | entityFrom = {'e': self.sensor.agent.from_.pid, |
91 | 94 | 'h': self.sensor.agent.from_.agentUuid} |
92 | 95 |
|
@@ -124,6 +127,8 @@ def build_sdk_span(self, span): |
124 | 127 | d=int(round(span.duration * 1000)), |
125 | 128 | n="sdk", |
126 | 129 | f=entityFrom, |
| 130 | + # ec=self.get_tag(span, "ec"), |
| 131 | + # error=self.get_tag(span, "error"), |
127 | 132 | data=data) |
128 | 133 |
|
129 | 134 | def get_tag(self, span, tag): |
|
0 commit comments