[ 
https://issues.apache.org/jira/browse/CXF-7129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15881680#comment-15881680
 ] 

Andriy Redko commented on CXF-7129:
-----------------------------------

Sample configuration:
{code:java}
final HashMap<String, String> properties = new HashMap<String, String>();
properties.put(Tracer.SPAN_RECEIVER_CLASSES_KEY, 
LoggingSpanReceiver.class.getName());
properties.put(LoggingSpanReceiver.LOG_LEVEL_KEY, 
LoggingSpanReceiver.LOG_LEVEL_INFO);
...
{code}

Sample output:
{noformat}
15758 [qtp1684106402-20] INFO 
org.apache.cxf.tracing.htrace.ext.LoggingSpanReceiver - 
{"a":"1b42288891bf5f71c004e89f640719d9","b":1487898379117,"e":1487898381121,"d":"Get
 
People","r":"tracer-server/192.168.0.100","p":["1b42288891bf5f71a787f4bb0ec871ae"],"t":[{"t":1487898381121,"m":"Getting
 all the happy people"}]}
17768 [pool-2-thread-1] INFO 
org.apache.cxf.tracing.htrace.ext.LoggingSpanReceiver - 
{"a":"1b42288891bf5f710b443428dc4dfd07","b":1487898381188,"e":1487898383188,"d":"Find
 
Manager","r":"tracer-server/192.168.0.100","p":["1b42288891bf5f71a787f4bb0ec871ae"],"n":{"manager-id":"10"}}
18767 [qtp1684106402-20] INFO 
org.apache.cxf.tracing.htrace.ext.LoggingSpanReceiver - 
{"a":"1b42288891bf5f71985a173d474a5674","b":1487898381188,"e":1487898384188,"d":"Sort
 
People","r":"tracer-server/192.168.0.100","p":["1b42288891bf5f71a787f4bb0ec871ae"]}
18821 [qtp1684106402-20] INFO 
org.apache.cxf.tracing.htrace.ext.LoggingSpanReceiver - 
{"a":"1b42288891bf5f71a787f4bb0ec871ae","b":1487898379100,"e":1487898384242,"d":"GET
 
people","r":"tracer-server/192.168.0.100","p":["1b42288891bf5f718c597245d87bf377"]}
9267 [main] INFO org.apache.cxf.tracing.htrace.ext.LoggingSpanReceiver - 
{"a":"1b42288891bf5f718c597245d87bf377","b":1487898377012,"e":1487898385478,"d":"GET
 
http://localhost:8282/rest/api/people","r":"tracer-client/192.168.0.100","p":[]}
{noformat}

> Provide an optional HTrace Logging receiver 
> --------------------------------------------
>
>                 Key: CXF-7129
>                 URL: https://issues.apache.org/jira/browse/CXF-7129
>             Project: CXF
>          Issue Type: Improvement
>          Components: Management
>            Reporter: Sergey Beryozkin
>            Assignee: Andriy Redko
>            Priority: Minor
>
> It can be useful to add the current log statements (at the specific level) to 
> the in-scope Span information. For example, at the moment CXF interceptors 
> will mark the start and the stop of the given span - log statements will 
> optionally go in between, with these log statements carrying span 'tags'



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to