improve open telemetry tracing

This commit is contained in:
Peter Maquiran
2024-07-16 11:47:51 +01:00
parent 23cf0fc4cb
commit 1e2224ddfc
4 changed files with 11 additions and 8 deletions
@@ -59,6 +59,10 @@ const createTracingInstance = ({bugPrint, name, module, autoFinish}): TracingTyp
setAttribute: (key: string, value: string) => {
data.tags[key] = value;
span.setAttribute(key, value);
if(key =='outcome' && value == 'failed') {
span.setAttribute('error', 'true')
}
},
getAttribute: (key: string) => {
return data.tags[key]