structured logging with span->log function

21 views
Skip to first unread message

Grover

unread,
Jan 5, 2020, 11:52:24 AM1/5/20
to OpenTracing

Hi, 


Does the Log function available in span have a way to indicate the log levels like INFO, DEBUG, WARN, etc and later do a query on these levels from jaeger UI.


I do see it has event:error 

span->Log({{"event", "error"},

              {"message", "failed to initialize"}});



I mean can we use the same log function and by storing in Elastic search, can we integrate with Fluentd kind of WUI, where more search/queries can be done 


-> operations done by user "xyz" , 

->error count per user "xyz" , 

-> error count in host "ABC".


Please correct, if i missed anything. 



Regards,

Grover.

Yuri Shkuro

unread,
Jan 5, 2020, 11:58:33 AM1/5/20
to OpenTracing
span.Log() does not support built-in log levels. Levels are usually used to control logging verbosity, but tracing uses sampling as an alternative mechanism. You can add them as an extra field, but most tracers will just capture them, which won't have the usual effect of varied logging verbosity.

I am not sure what your second question is about. You can configure regular loggers in some languages to forward the log statements to the current span, as done in this example: https://github.com/PacktPublishing/Mastering-Distributed-Tracing/tree/master/Chapter11.

Grover

unread,
Jan 6, 2020, 6:21:57 AM1/6/20
to OpenTracing

Thanks Yuri, Yes  I was looking for the integration of opentracing with existing Loggers/Metrics. It was very useful. 
 
Do we have similar integrations with Loggers/Metric using CPP.  are there any thoughts or feasible to make Jaeger opentracing cpp client abstract the structured logging/metrics from applications. 
applications just use tracing and others are integrated and can be seen in single Jaeger UI as applications already are providing most of the information (endpoints, logs ) through opentracing API's


Regards,
Grover

Yuri Shkuro

unread,
Jan 6, 2020, 11:34:08 AM1/6/20
to OpenTracing
I can't speak authoritatively on CPP. The Jaeger CPP client is lacking maintainers. The OpenTracing CPP is behind the curve compared to other languages, e.g. it does not implement Scope Managers yet.


On Sunday, January 5, 2020 at 11:52:24 AM UTC-5, Grover wrote:
Reply all
Reply to author
Forward
0 new messages