public class TraceServiceElasticsearch extends Object implements TraceService
| Modifier and Type | Class and Description |
|---|---|
static class |
TraceServiceElasticsearch.TraceDeserializer |
static class |
TraceServiceElasticsearch.TraceSerializer |
| Modifier and Type | Field and Description |
|---|---|
static String |
TRACE_TYPE |
| Constructor and Description |
|---|
TraceServiceElasticsearch() |
TraceServiceElasticsearch(SpanService spanService) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(String tenantId) |
ElasticsearchClient |
getElasticsearchClient()
This method gets the elasticsearch client.
|
Trace |
getFragment(String tenantId,
String id) |
protected List<Trace> |
getFragmentsForTraceId(String tenantId,
String traceId) |
Trace |
getTrace(String tenantId,
String id) |
protected static List<Trace> |
internalQuery(ElasticsearchClient client,
String tenantId,
Criteria criteria)
This method performs the query.
|
protected void |
processConnectedNode(List<Trace> fragments,
Trace trace,
Node node,
StringBuilder nodePath)
This method recursively processes the supplied node to identify
other trace fragments that are related, building up the end to
end trace as it goes.
|
List<Trace> |
searchFragments(String tenantId,
Criteria criteria) |
void |
setElasticsearchClient(ElasticsearchClient client)
This method sets the elasticsearch client.
|
void |
storeFragments(String tenantId,
List<Trace> traces) |
public static final String TRACE_TYPE
public TraceServiceElasticsearch()
@Inject public TraceServiceElasticsearch(SpanService spanService)
public ElasticsearchClient getElasticsearchClient()
public void setElasticsearchClient(ElasticsearchClient client)
client - The elasticsearch clientpublic Trace getFragment(String tenantId, String id)
getFragment in interface TraceServiceprotected List<Trace> getFragmentsForTraceId(String tenantId, String traceId)
public Trace getTrace(String tenantId, String id)
getTrace in interface TraceServiceprotected void processConnectedNode(List<Trace> fragments, Trace trace, Node node, StringBuilder nodePath)
fragments - The list of fragments for the traceIdtrace - The trace being constructedroot - The nodenodePath - The node's pathpublic List<Trace> searchFragments(String tenantId, Criteria criteria)
searchFragments in interface TraceServiceprotected static List<Trace> internalQuery(ElasticsearchClient client, String tenantId, Criteria criteria)
client - The elasticsearch clienttenantId - The tenant idcriteria - The criteriapublic void storeFragments(String tenantId, List<Trace> traces) throws StoreException
storeFragments in interface TraceServiceStoreExceptionpublic void clear(String tenantId)
clear in interface TraceServiceCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.