6. The State of the Art
Run a query with debug=timing:
"timing":{
"time":178.0,
"prepare":{"time":7.0,
"query":{"time":4.0}}
"process":{"time":160.0,
"query":{"time":118.0},
"facet":{"time":33.0}}
7. What is Apache HTrace
●
Distributed Tracing Library
●
Primitive Type is the “Span”
●
Unique ID
●
Source + Description
●
Start/Stop Time
●
Additional Metadata
●
See Also: Dapper, Zipkin, Wingtips
10. How Do I Trace?
●
Can Trace Any “Unit Of Work”
●
Method Calls
●
Threads
●
RPCs doQuery();
try (TraceScope scope = tracer.newScope(“work”)) {
doQuery();
}
11. What Does It Look Like?
● Trace of q=*:* and resulting sub-queries
● Data modeled on debug=timing
12. Aside: Benefits over debug=timing
●
Separate time-lines for each server
●
Ability to mark annotations
●
Data stored for later analysis
●
Trace non-query requests
●
Trace calls to other systems
16. Configuration
●
New section in solr.xml
<trace>
<str name="span.receiver.classes">org.apache.htrace.impl.HTracedSpanReceiver</str>
<str name="htraced.receiver.address">trace-server:9075</str>
<str name="sampler.classes">org.apache.htrace.core.ProbabilitySampler</str>
</trace>
●
Sampler Options
●
Advanced: Force Trace
… traceid=<64-bit> …
●
Advanced: Buffer Options
17. Performance
●
Each trace add ~25ns of overhead
●
Search handler can generate ~20 traces
●
Traces are buffered in memory
●
May consider multiple recievers