id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
37,200
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FilterProcessor.java
FilterProcessor.isIncluded
public boolean isIncluded(String endpoint) { for (int i = 0; i < inclusions.size(); i++) { if (inclusions.get(i).test(endpoint)) { return true; } } return false; }
java
public boolean isIncluded(String endpoint) { for (int i = 0; i < inclusions.size(); i++) { if (inclusions.get(i).test(endpoint)) { return true; } } return false; }
[ "public", "boolean", "isIncluded", "(", "String", "endpoint", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inclusions", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "inclusions", ".", "get", "(", "i", ")", ".", "te...
This method determines whether the supplied endpoint should be included. @param endpoint The endpoint to check @return Whether the supplied endpoint should be included
[ "This", "method", "determines", "whether", "the", "supplied", "endpoint", "should", "be", "included", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FilterProcessor.java#L115-L122
37,201
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FilterProcessor.java
FilterProcessor.isExcluded
public boolean isExcluded(String endpoint) { for (int i = 0; i < exclusions.size(); i++) { if (exclusions.get(i).test(endpoint)) { return true; } } return false; }
java
public boolean isExcluded(String endpoint) { for (int i = 0; i < exclusions.size(); i++) { if (exclusions.get(i).test(endpoint)) { return true; } } return false; }
[ "public", "boolean", "isExcluded", "(", "String", "endpoint", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "exclusions", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "exclusions", ".", "get", "(", "i", ")", ".", "te...
This method determines whether the supplied endpoint should be excluded. @param endpoint The endpoint to check @return Whether the supplied endpoint should be excluded
[ "This", "method", "determines", "whether", "the", "supplied", "endpoint", "should", "be", "excluded", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FilterProcessor.java#L131-L138
37,202
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Message.java
Message.addContent
public Message addContent(String name, String type, String value) { content.put(name, new Content(type, value)); return this; }
java
public Message addContent(String name, String type, String value) { content.put(name, new Content(type, value)); return this; }
[ "public", "Message", "addContent", "(", "String", "name", ",", "String", "type", ",", "String", "value", ")", "{", "content", ".", "put", "(", "name", ",", "new", "Content", "(", "type", ",", "value", ")", ")", ";", "return", "this", ";", "}" ]
This method adds new content. @param name The optional name @param type The optional type @param value The value @return This message
[ "This", "method", "adds", "new", "content", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Message.java#L79-L82
37,203
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java
FragmentManager.getFragmentBuilder
public FragmentBuilder getFragmentBuilder() { FragmentBuilder builder = builders.get(); if (builder == null) { if (log.isLoggable(Level.FINEST)) { log.finest("Creating new FragmentBuilder"); } builder = new FragmentBuilder(); builders.set(...
java
public FragmentBuilder getFragmentBuilder() { FragmentBuilder builder = builders.get(); if (builder == null) { if (log.isLoggable(Level.FINEST)) { log.finest("Creating new FragmentBuilder"); } builder = new FragmentBuilder(); builders.set(...
[ "public", "FragmentBuilder", "getFragmentBuilder", "(", ")", "{", "FragmentBuilder", "builder", "=", "builders", ".", "get", "(", ")", ";", "if", "(", "builder", "==", "null", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINEST", ")...
This method returns the appropriate fragment builder for the current thread. @return The fragment builder for this thread of execution
[ "This", "method", "returns", "the", "appropriate", "fragment", "builder", "for", "the", "current", "thread", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java#L62-L85
37,204
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java
FragmentManager.setFragmentBuilder
public void setFragmentBuilder(FragmentBuilder builder) { FragmentBuilder currentBuilder = builders.get(); if (currentBuilder == null && builder != null) { int currentCount = threadCounter.incrementAndGet(); int builderCount = builder.incrementThreadCount(); if (log....
java
public void setFragmentBuilder(FragmentBuilder builder) { FragmentBuilder currentBuilder = builders.get(); if (currentBuilder == null && builder != null) { int currentCount = threadCounter.incrementAndGet(); int builderCount = builder.incrementThreadCount(); if (log....
[ "public", "void", "setFragmentBuilder", "(", "FragmentBuilder", "builder", ")", "{", "FragmentBuilder", "currentBuilder", "=", "builders", ".", "get", "(", ")", ";", "if", "(", "currentBuilder", "==", "null", "&&", "builder", "!=", "null", ")", "{", "int", "...
This method sets the builder for this thread of execution. @param builder The fragment builder
[ "This", "method", "sets", "the", "builder", "for", "this", "thread", "of", "execution", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java#L92-L123
37,205
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java
FragmentManager.clear
public void clear() { int currentCount = threadCounter.decrementAndGet(); if (log.isLoggable(Level.FINEST)) { log.finest("Clear: Disassociate Thread from FragmentBuilder(1): current thread count=" + currentCount); synchronized (threadNames) { threadNames.remove(Th...
java
public void clear() { int currentCount = threadCounter.decrementAndGet(); if (log.isLoggable(Level.FINEST)) { log.finest("Clear: Disassociate Thread from FragmentBuilder(1): current thread count=" + currentCount); synchronized (threadNames) { threadNames.remove(Th...
[ "public", "void", "clear", "(", ")", "{", "int", "currentCount", "=", "threadCounter", ".", "decrementAndGet", "(", ")", ";", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINEST", ")", ")", "{", "log", ".", "finest", "(", "\"Clear: Disassocia...
This method clears the trace fragment builder for the current thread of execution.
[ "This", "method", "clears", "the", "trace", "fragment", "builder", "for", "the", "current", "thread", "of", "execution", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentManager.java#L129-L142
37,206
hawkular/hawkular-apm
server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/TraceServiceElasticsearch.java
TraceServiceElasticsearch.internalQuery
protected static List<Trace> internalQuery(ElasticsearchClient client, String tenantId, Criteria criteria) { List<Trace> ret = new ArrayList<Trace>(); String index = client.getIndex(tenantId); try { RefreshRequestBuilder refreshRequestBuilder = client.getClient().admin(...
java
protected static List<Trace> internalQuery(ElasticsearchClient client, String tenantId, Criteria criteria) { List<Trace> ret = new ArrayList<Trace>(); String index = client.getIndex(tenantId); try { RefreshRequestBuilder refreshRequestBuilder = client.getClient().admin(...
[ "protected", "static", "List", "<", "Trace", ">", "internalQuery", "(", "ElasticsearchClient", "client", ",", "String", "tenantId", ",", "Criteria", "criteria", ")", "{", "List", "<", "Trace", ">", "ret", "=", "new", "ArrayList", "<", "Trace", ">", "(", ")...
This method performs the query. @param client The elasticsearch client @param tenantId The tenant id @param criteria The criteria @return The list of traces
[ "This", "method", "performs", "the", "query", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/TraceServiceElasticsearch.java#L282-L340
37,207
hawkular/hawkular-apm
server/rest/src/main/java/org/hawkular/apm/server/rest/RESTServiceUtil.java
RESTServiceUtil.decodeProperties
public static void decodeProperties(Set<PropertyCriteria> properties, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(); ...
java
public static void decodeProperties(Set<PropertyCriteria> properties, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(); ...
[ "public", "static", "void", "decodeProperties", "(", "Set", "<", "PropertyCriteria", ">", "properties", ",", "String", "encoded", ")", "{", "if", "(", "encoded", "!=", "null", "&&", "!", "encoded", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", ...
This method processes a comma separated list of properties, defined as a name|value pair. @param properties The properties map @param encoded The string containing the encoded properties
[ "This", "method", "processes", "a", "comma", "separated", "list", "of", "properties", "defined", "as", "a", "name|value", "pair", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/rest/src/main/java/org/hawkular/apm/server/rest/RESTServiceUtil.java#L44-L65
37,208
hawkular/hawkular-apm
server/rest/src/main/java/org/hawkular/apm/server/rest/RESTServiceUtil.java
RESTServiceUtil.decodeCorrelationIdentifiers
public static void decodeCorrelationIdentifiers(Set<CorrelationIdentifier> correlations, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(...
java
public static void decodeCorrelationIdentifiers(Set<CorrelationIdentifier> correlations, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(...
[ "public", "static", "void", "decodeCorrelationIdentifiers", "(", "Set", "<", "CorrelationIdentifier", ">", "correlations", ",", "String", "encoded", ")", "{", "if", "(", "encoded", "!=", "null", "&&", "!", "encoded", ".", "trim", "(", ")", ".", "isEmpty", "(...
This method processes a comma separated list of correlation identifiers, defined as a scope|value pair. @param correlations The correlation identifier set @param encoded The string containing the encoded correlation identifiers
[ "This", "method", "processes", "a", "comma", "separated", "list", "of", "correlation", "identifiers", "defined", "as", "a", "scope|value", "pair", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/rest/src/main/java/org/hawkular/apm/server/rest/RESTServiceUtil.java#L73-L93
37,209
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.findPrimaryReference
public static Reference findPrimaryReference(List<Reference> references) { List<Reference> followsFrom = references.stream() .filter(ref -> References.FOLLOWS_FROM.equals(ref.getReferenceType()) && ref.getReferredTo() instanceof APMSpan) .collect(Collector...
java
public static Reference findPrimaryReference(List<Reference> references) { List<Reference> followsFrom = references.stream() .filter(ref -> References.FOLLOWS_FROM.equals(ref.getReferenceType()) && ref.getReferredTo() instanceof APMSpan) .collect(Collector...
[ "public", "static", "Reference", "findPrimaryReference", "(", "List", "<", "Reference", ">", "references", ")", "{", "List", "<", "Reference", ">", "followsFrom", "=", "references", ".", "stream", "(", ")", ".", "filter", "(", "ref", "->", "References", ".",...
This method identifies the primary 'parent' reference that should be used to link the associated span to an existing trace instance. @param references The list of references @return The primary reference, or null if one could not be determined
[ "This", "method", "identifies", "the", "primary", "parent", "reference", "that", "should", "be", "used", "to", "link", "the", "associated", "span", "to", "an", "existing", "trace", "instance", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L125-L156
37,210
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initTopLevelState
protected void initTopLevelState(APMSpan topSpan, TraceRecorder recorder, ContextSampler sampler) { nodeBuilder = new NodeBuilder(); traceContext = new TraceContext(topSpan, nodeBuilder, recorder, sampler); }
java
protected void initTopLevelState(APMSpan topSpan, TraceRecorder recorder, ContextSampler sampler) { nodeBuilder = new NodeBuilder(); traceContext = new TraceContext(topSpan, nodeBuilder, recorder, sampler); }
[ "protected", "void", "initTopLevelState", "(", "APMSpan", "topSpan", ",", "TraceRecorder", "recorder", ",", "ContextSampler", "sampler", ")", "{", "nodeBuilder", "=", "new", "NodeBuilder", "(", ")", ";", "traceContext", "=", "new", "TraceContext", "(", "topSpan", ...
This method initialises the node builder and trace context for a top level trace fragment. @param topSpan The top level span in the trace @param recorder The trace recorder @param sampler The sampler
[ "This", "method", "initialises", "the", "node", "builder", "and", "trace", "context", "for", "a", "top", "level", "trace", "fragment", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L166-L169
37,211
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initFromExtractedTraceState
protected void initFromExtractedTraceState(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpanBuilder parentBuilder = (APMSpanBuilder) ref.getReferredTo(); initTopLevelState(this, recorder, sampler); // Check for passed state if (parentBuild...
java
protected void initFromExtractedTraceState(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpanBuilder parentBuilder = (APMSpanBuilder) ref.getReferredTo(); initTopLevelState(this, recorder, sampler); // Check for passed state if (parentBuild...
[ "protected", "void", "initFromExtractedTraceState", "(", "APMSpanBuilder", "builder", ",", "TraceRecorder", "recorder", ",", "Reference", "ref", ",", "ContextSampler", "sampler", ")", "{", "APMSpanBuilder", "parentBuilder", "=", "(", "APMSpanBuilder", ")", "ref", ".",...
This method initialises the span based on extracted trace state. @param builder The span builder @param recorder The trace recorder @param ref The reference @param sampler The sampler
[ "This", "method", "initialises", "the", "span", "based", "on", "extracted", "trace", "state", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L179-L196
37,212
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initChildOf
protected void initChildOf(APMSpanBuilder builder, Reference ref) { APMSpan parent = (APMSpan) ref.getReferredTo(); if (parent.getNodeBuilder() != null) { nodeBuilder = new NodeBuilder(parent.getNodeBuilder()); traceContext = parent.traceContext; // As it is not pos...
java
protected void initChildOf(APMSpanBuilder builder, Reference ref) { APMSpan parent = (APMSpan) ref.getReferredTo(); if (parent.getNodeBuilder() != null) { nodeBuilder = new NodeBuilder(parent.getNodeBuilder()); traceContext = parent.traceContext; // As it is not pos...
[ "protected", "void", "initChildOf", "(", "APMSpanBuilder", "builder", ",", "Reference", "ref", ")", "{", "APMSpan", "parent", "=", "(", "APMSpan", ")", "ref", ".", "getReferredTo", "(", ")", ";", "if", "(", "parent", ".", "getNodeBuilder", "(", ")", "!=", ...
This method initialises the span based on a 'child-of' relationship. @param builder The span builder @param ref The 'child-of' relationship
[ "This", "method", "initialises", "the", "span", "based", "on", "a", "child", "-", "of", "relationship", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L204-L225
37,213
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initFollowsFrom
protected void initFollowsFrom(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpan referenced = (APMSpan) ref.getReferredTo(); initTopLevelState(referenced.getTraceContext().getTopSpan(), recorder, sampler); // Top level node in spawned fragment sho...
java
protected void initFollowsFrom(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpan referenced = (APMSpan) ref.getReferredTo(); initTopLevelState(referenced.getTraceContext().getTopSpan(), recorder, sampler); // Top level node in spawned fragment sho...
[ "protected", "void", "initFollowsFrom", "(", "APMSpanBuilder", "builder", ",", "TraceRecorder", "recorder", ",", "Reference", "ref", ",", "ContextSampler", "sampler", ")", "{", "APMSpan", "referenced", "=", "(", "APMSpan", ")", "ref", ".", "getReferredTo", "(", ...
This method initialises the span based on a 'follows-from' relationship. @param builder The span builder @param recorder The trace recorder @param ref The 'follows-from' relationship @param sampler The sampler
[ "This", "method", "initialises", "the", "span", "based", "on", "a", "follows", "-", "from", "relationship", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L235-L250
37,214
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.processNoPrimaryReference
protected void processNoPrimaryReference(APMSpanBuilder builder, TraceRecorder recorder, ContextSampler sampler) { // No primary reference found, so means that all references will be treated // as equal, to provide a join construct within a separate fragment. initTopLevelState(this, recorder, sa...
java
protected void processNoPrimaryReference(APMSpanBuilder builder, TraceRecorder recorder, ContextSampler sampler) { // No primary reference found, so means that all references will be treated // as equal, to provide a join construct within a separate fragment. initTopLevelState(this, recorder, sa...
[ "protected", "void", "processNoPrimaryReference", "(", "APMSpanBuilder", "builder", ",", "TraceRecorder", "recorder", ",", "ContextSampler", "sampler", ")", "{", "// No primary reference found, so means that all references will be treated", "// as equal, to provide a join construct wit...
This method initialises the span based on there being no primary reference. @param builder The span builder @param recorder The trace recorder @param sampler The sampler
[ "This", "method", "initialises", "the", "span", "based", "on", "there", "being", "no", "primary", "reference", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L259-L286
37,215
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.processRemainingReferences
protected void processRemainingReferences(APMSpanBuilder builder, Reference primaryRef) { // Check if other references for (Reference ref : builder.references) { if (primaryRef == ref) { continue; } // Setup correlation ids for other references ...
java
protected void processRemainingReferences(APMSpanBuilder builder, Reference primaryRef) { // Check if other references for (Reference ref : builder.references) { if (primaryRef == ref) { continue; } // Setup correlation ids for other references ...
[ "protected", "void", "processRemainingReferences", "(", "APMSpanBuilder", "builder", ",", "Reference", "primaryRef", ")", "{", "// Check if other references", "for", "(", "Reference", "ref", ":", "builder", ".", "references", ")", "{", "if", "(", "primaryRef", "==",...
This method processes the remaining references by creating appropriate correlation ids against the current node. @param builder The span builder @param primaryRef The primary reference, if null if one was not found
[ "This", "method", "processes", "the", "remaining", "references", "by", "creating", "appropriate", "correlation", "ids", "against", "the", "current", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L295-L314
37,216
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/ProcessorManager.java
ProcessorManager.init
public void init(String txn, TransactionConfig btc) { if (log.isLoggable(Level.FINE)) { log.fine("ProcessManager: initialise btxn '" + txn + "' config=" + btc + " processors=" + btc.getProcessors().size()); } if (btc.getProcessors() != null && !btc.getProcessors(...
java
public void init(String txn, TransactionConfig btc) { if (log.isLoggable(Level.FINE)) { log.fine("ProcessManager: initialise btxn '" + txn + "' config=" + btc + " processors=" + btc.getProcessors().size()); } if (btc.getProcessors() != null && !btc.getProcessors(...
[ "public", "void", "init", "(", "String", "txn", ",", "TransactionConfig", "btc", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "log", ".", "fine", "(", "\"ProcessManager: initialise btxn '\"", "+", "txn", "+", "...
This method initialises the processors associated with the supplied transaction configuration. @param txn The transaction name @param btc The configuration
[ "This", "method", "initialises", "the", "processors", "associated", "with", "the", "supplied", "transaction", "configuration", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/ProcessorManager.java#L82-L103
37,217
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/ProcessorManager.java
ProcessorManager.process
public void process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object... values) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager: process trace=" + trace + " node=" + node + " direction=" + direction + " headers=" + headers ...
java
public void process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object... values) { if (log.isLoggable(Level.FINEST)) { log.finest("ProcessManager: process trace=" + trace + " node=" + node + " direction=" + direction + " headers=" + headers ...
[ "public", "void", "process", "(", "Trace", "trace", ",", "Node", "node", ",", "Direction", "direction", ",", "Map", "<", "String", ",", "?", ">", "headers", ",", "Object", "...", "values", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ...
This method processes the supplied information against the configured processor details for the trace. @param trace The trace @param node The node being processed @param direction The direction @param headers The headers @param values The values
[ "This", "method", "processes", "the", "supplied", "information", "against", "the", "configured", "processor", "details", "for", "the", "trace", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/ProcessorManager.java#L195-L221
37,218
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanUniqueIdGenerator.java
SpanUniqueIdGenerator.toUnique
public static String toUnique(Span span) { String id = span.getId(); if (span.clientSpan()) { id = getClientId(span.getId()); } return id; }
java
public static String toUnique(Span span) { String id = span.getId(); if (span.clientSpan()) { id = getClientId(span.getId()); } return id; }
[ "public", "static", "String", "toUnique", "(", "Span", "span", ")", "{", "String", "id", "=", "span", ".", "getId", "(", ")", ";", "if", "(", "span", ".", "clientSpan", "(", ")", ")", "{", "id", "=", "getClientId", "(", "span", ".", "getId", "(", ...
Utility method to get unique id of the span. Note that method does not change the span id. @param span Span. @return Unique id of the span.
[ "Utility", "method", "to", "get", "unique", "id", "of", "the", "span", ".", "Note", "that", "method", "does", "not", "change", "the", "span", "id", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanUniqueIdGenerator.java#L41-L49
37,219
hawkular/hawkular-apm
server/jms/src/main/java/org/hawkular/apm/server/jms/AbstractPublisherJMS.java
AbstractPublisherJMS.doPublish
protected void doPublish(String tenantId, List<T> items, String subscriber, int retryCount, long delay) throws Exception { String data = mapper.writeValueAsString(items); TextMessage tm = session.createTextMessage(data); if (tenantId != null) { tm.setStringProperty("ten...
java
protected void doPublish(String tenantId, List<T> items, String subscriber, int retryCount, long delay) throws Exception { String data = mapper.writeValueAsString(items); TextMessage tm = session.createTextMessage(data); if (tenantId != null) { tm.setStringProperty("ten...
[ "protected", "void", "doPublish", "(", "String", "tenantId", ",", "List", "<", "T", ">", "items", ",", "String", "subscriber", ",", "int", "retryCount", ",", "long", "delay", ")", "throws", "Exception", "{", "String", "data", "=", "mapper", ".", "writeValu...
This method publishes the supplied items. @param tenantId The tenant id @param items The items @param subscriber The optional subscriber name @param retryCount The retry count @param delay The delay @throws Exception Failed to publish
[ "This", "method", "publishes", "the", "supplied", "items", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/jms/src/main/java/org/hawkular/apm/server/jms/AbstractPublisherJMS.java#L117-L142
37,220
hawkular/hawkular-apm
client/kafka/src/main/java/org/hawkular/apm/client/kafka/AbstractPublisherKafka.java
AbstractPublisherKafka.init
protected void init() { Properties props = new Properties(); props.put("bootstrap.servers", PropertyUtil.getProperty(PropertyUtil.HAWKULAR_APM_URI_PUBLISHER, PropertyUtil.getProperty(PropertyUtil.HAWKULAR_APM_URI)) .substring(PropertyUtil.KAFKA_PREFIX.length())); ...
java
protected void init() { Properties props = new Properties(); props.put("bootstrap.servers", PropertyUtil.getProperty(PropertyUtil.HAWKULAR_APM_URI_PUBLISHER, PropertyUtil.getProperty(PropertyUtil.HAWKULAR_APM_URI)) .substring(PropertyUtil.KAFKA_PREFIX.length())); ...
[ "protected", "void", "init", "(", ")", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "props", ".", "put", "(", "\"bootstrap.servers\"", ",", "PropertyUtil", ".", "getProperty", "(", "PropertyUtil", ".", "HAWKULAR_APM_URI_PUBLISHER", ",", ...
This method initialises the publisher.
[ "This", "method", "initialises", "the", "publisher", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/kafka/src/main/java/org/hawkular/apm/client/kafka/AbstractPublisherKafka.java#L72-L86
37,221
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/Criteria.java
Criteria.addProperty
public Criteria addProperty(String name, String value, Operator operator) { properties.add(new PropertyCriteria(name, value, operator)); return this; }
java
public Criteria addProperty(String name, String value, Operator operator) { properties.add(new PropertyCriteria(name, value, operator)); return this; }
[ "public", "Criteria", "addProperty", "(", "String", "name", ",", "String", "value", ",", "Operator", "operator", ")", "{", "properties", ".", "add", "(", "new", "PropertyCriteria", "(", "name", ",", "value", ",", "operator", ")", ")", ";", "return", "this"...
This method adds a new property criteria. @param name The property name @param value The property value @param operator The property operator @return The criteria
[ "This", "method", "adds", "a", "new", "property", "criteria", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/Criteria.java#L196-L199
37,222
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/Criteria.java
Criteria.transactionWide
public boolean transactionWide() { return !(!properties.isEmpty() || !correlationIds.isEmpty() || hostName != null || uri != null || operation != null); }
java
public boolean transactionWide() { return !(!properties.isEmpty() || !correlationIds.isEmpty() || hostName != null || uri != null || operation != null); }
[ "public", "boolean", "transactionWide", "(", ")", "{", "return", "!", "(", "!", "properties", ".", "isEmpty", "(", ")", "||", "!", "correlationIds", ".", "isEmpty", "(", ")", "||", "hostName", "!=", "null", "||", "uri", "!=", "null", "||", "operation", ...
This method determines if the specified criteria are relevant to all fragments within an end to end transaction. @return Whether the criteria would apply to all fragments in a transaction
[ "This", "method", "determines", "if", "the", "specified", "criteria", "are", "relevant", "to", "all", "fragments", "within", "an", "end", "to", "end", "transaction", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/Criteria.java#L403-L406
37,223
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/Criteria.java
Criteria.deriveTransactionWide
public Criteria deriveTransactionWide() { Criteria ret = new Criteria(); ret.setStartTime(startTime); ret.setEndTime(endTime); ret.setProperties(getProperties().stream().filter(p -> p.getName().equals(Constants.PROP_PRINCIPAL)) .collect(Collectors.toSet())); ret.s...
java
public Criteria deriveTransactionWide() { Criteria ret = new Criteria(); ret.setStartTime(startTime); ret.setEndTime(endTime); ret.setProperties(getProperties().stream().filter(p -> p.getName().equals(Constants.PROP_PRINCIPAL)) .collect(Collectors.toSet())); ret.s...
[ "public", "Criteria", "deriveTransactionWide", "(", ")", "{", "Criteria", "ret", "=", "new", "Criteria", "(", ")", ";", "ret", ".", "setStartTime", "(", "startTime", ")", ";", "ret", ".", "setEndTime", "(", "endTime", ")", ";", "ret", ".", "setProperties",...
This method returns the transaction wide version of the current criteria. @return The transaction wide version
[ "This", "method", "returns", "the", "transaction", "wide", "version", "of", "the", "current", "criteria", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/Criteria.java#L413-L421
37,224
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java
ConfigurationLoader.getConfiguration
public static CollectorConfiguration getConfiguration(String type) { return loadConfig(PropertyUtil.getProperty(HAWKULAR_APM_CONFIG, DEFAULT_URI), type); }
java
public static CollectorConfiguration getConfiguration(String type) { return loadConfig(PropertyUtil.getProperty(HAWKULAR_APM_CONFIG, DEFAULT_URI), type); }
[ "public", "static", "CollectorConfiguration", "getConfiguration", "(", "String", "type", ")", "{", "return", "loadConfig", "(", "PropertyUtil", ".", "getProperty", "(", "HAWKULAR_APM_CONFIG", ",", "DEFAULT_URI", ")", ",", "type", ")", ";", "}" ]
This method returns the collector configuration. @param type The type, or null if default (jvm) @return The collection configuration
[ "This", "method", "returns", "the", "collector", "configuration", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java#L66-L68
37,225
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java
ConfigurationLoader.loadConfig
protected static CollectorConfiguration loadConfig(String uri, String type) { final CollectorConfiguration config = new CollectorConfiguration(); if (type == null) { type = DEFAULT_TYPE; } uri += java.io.File.separator + type; File f = new File(uri); if (!...
java
protected static CollectorConfiguration loadConfig(String uri, String type) { final CollectorConfiguration config = new CollectorConfiguration(); if (type == null) { type = DEFAULT_TYPE; } uri += java.io.File.separator + type; File f = new File(uri); if (!...
[ "protected", "static", "CollectorConfiguration", "loadConfig", "(", "String", "uri", ",", "String", "type", ")", "{", "final", "CollectorConfiguration", "config", "=", "new", "CollectorConfiguration", "(", ")", ";", "if", "(", "type", "==", "null", ")", "{", "...
This method loads the configuration from the supplied URI. @param uri The URI @param type The type, or null if default (jvm) @return The configuration
[ "This", "method", "loads", "the", "configuration", "from", "the", "supplied", "URI", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/services/ConfigurationLoader.java#L77-L156
37,226
hawkular/hawkular-apm
server/jms/src/main/java/org/hawkular/apm/server/jms/RetryCapableMDB.java
RetryCapableMDB.process
protected void process(String tenantId, List<S> items, int retryCount) throws Exception { ProcessingUnit<S, T> pu = new ProcessingUnit<S, T>(); pu.setProcessor(getProcessor()); pu.setRetrySubscriber(retrySubscriber); pu.setRetryCount(retryCount); pu.setResultHan...
java
protected void process(String tenantId, List<S> items, int retryCount) throws Exception { ProcessingUnit<S, T> pu = new ProcessingUnit<S, T>(); pu.setProcessor(getProcessor()); pu.setRetrySubscriber(retrySubscriber); pu.setRetryCount(retryCount); pu.setResultHan...
[ "protected", "void", "process", "(", "String", "tenantId", ",", "List", "<", "S", ">", "items", ",", "int", "retryCount", ")", "throws", "Exception", "{", "ProcessingUnit", "<", "S", ",", "T", ">", "pu", "=", "new", "ProcessingUnit", "<", "S", ",", "T"...
This method processes the received list of items. @param tenantId The optional tenant id @param items The items @param retryCount The remaining retry count @throws Failed to process items
[ "This", "method", "processes", "the", "received", "list", "of", "items", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/jms/src/main/java/org/hawkular/apm/server/jms/RetryCapableMDB.java#L173-L192
37,227
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java
SourceInfoUtil.getSourceInfo
public static List<SourceInfo> getSourceInfo(String tenantId, List<Trace> items) throws RetryAttemptException { List<SourceInfo> sourceInfoList = new ArrayList<SourceInfo>(); int curpos=0; // This method initialises the deriver with a list of trace fragments ...
java
public static List<SourceInfo> getSourceInfo(String tenantId, List<Trace> items) throws RetryAttemptException { List<SourceInfo> sourceInfoList = new ArrayList<SourceInfo>(); int curpos=0; // This method initialises the deriver with a list of trace fragments ...
[ "public", "static", "List", "<", "SourceInfo", ">", "getSourceInfo", "(", "String", "tenantId", ",", "List", "<", "Trace", ">", "items", ")", "throws", "RetryAttemptException", "{", "List", "<", "SourceInfo", ">", "sourceInfoList", "=", "new", "ArrayList", "<"...
This method gets the source information associated with the supplied traces. @param tenantId The tenant id @param items The trace instances @return The source info @throws RetryAttemptException Failed to initialise source information
[ "This", "method", "gets", "the", "source", "information", "associated", "with", "the", "supplied", "traces", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java#L63-L99
37,228
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java
SourceInfoUtil.initialiseSourceInfo
protected static void initialiseSourceInfo(List<SourceInfo> sourceInfoList, String tenantId, Trace trace, StringBuffer parentNodeId, int pos, Node node) { SourceInfo si = new SourceInfo(); parentNodeId.append(':'); parentNodeId.append(pos); si.setId(parentNodeId.toString()...
java
protected static void initialiseSourceInfo(List<SourceInfo> sourceInfoList, String tenantId, Trace trace, StringBuffer parentNodeId, int pos, Node node) { SourceInfo si = new SourceInfo(); parentNodeId.append(':'); parentNodeId.append(pos); si.setId(parentNodeId.toString()...
[ "protected", "static", "void", "initialiseSourceInfo", "(", "List", "<", "SourceInfo", ">", "sourceInfoList", ",", "String", "tenantId", ",", "Trace", "trace", ",", "StringBuffer", "parentNodeId", ",", "int", "pos", ",", "Node", "node", ")", "{", "SourceInfo", ...
This method initialises an individual node within a trace. @param sourceInfoList The source info list @param tenantId The tenant id @param trace The trace @param parentNodeId The parent node id @param node The node
[ "This", "method", "initialises", "an", "individual", "node", "within", "a", "trace", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java#L110-L169
37,229
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java
SourceInfoUtil.findRootOrServerSpan
protected static Span findRootOrServerSpan(String tenantId, Span span, SpanCache spanCache) { while (span != null && !span.serverSpan() && !span.topLevelSpan()) { span = spanCache.get(tenantId, span.getParentId()); } return span; }
java
protected static Span findRootOrServerSpan(String tenantId, Span span, SpanCache spanCache) { while (span != null && !span.serverSpan() && !span.topLevelSpan()) { span = spanCache.get(tenantId, span.getParentId()); } return span; }
[ "protected", "static", "Span", "findRootOrServerSpan", "(", "String", "tenantId", ",", "Span", "span", ",", "SpanCache", "spanCache", ")", "{", "while", "(", "span", "!=", "null", "&&", "!", "span", ".", "serverSpan", "(", ")", "&&", "!", "span", ".", "t...
This method identifies the root or enclosing server span that contains the supplied client span. @param tenantId The tenant id @param span The client span @param spanCache The span cache @return The root or enclosing server span, or null if not found
[ "This", "method", "identifies", "the", "root", "or", "enclosing", "server", "span", "that", "contains", "the", "supplied", "client", "span", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java#L180-L186
37,230
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java
SourceInfoUtil.getSourceInfo
public static SourceInfo getSourceInfo(String tenantId, Span serverSpan, SpanCache spanCache) { String clientSpanId = SpanUniqueIdGenerator.getClientId(serverSpan.getId()); if (spanCache != null && clientSpanId != null) { Span clientSpan = spanCache.get(tenantId, clientSpanId); ...
java
public static SourceInfo getSourceInfo(String tenantId, Span serverSpan, SpanCache spanCache) { String clientSpanId = SpanUniqueIdGenerator.getClientId(serverSpan.getId()); if (spanCache != null && clientSpanId != null) { Span clientSpan = spanCache.get(tenantId, clientSpanId); ...
[ "public", "static", "SourceInfo", "getSourceInfo", "(", "String", "tenantId", ",", "Span", "serverSpan", ",", "SpanCache", "spanCache", ")", "{", "String", "clientSpanId", "=", "SpanUniqueIdGenerator", ".", "getClientId", "(", "serverSpan", ".", "getId", "(", ")",...
This method attempts to derive the Source Information for the supplied server span. If the information is not available, then a null will be returned, which can be used to trigger a retry attempt if appropriate. @param tenantId The tenant id @param serverSpan The server span @param spanCache The cache @return The sour...
[ "This", "method", "attempts", "to", "derive", "the", "Source", "Information", "for", "the", "supplied", "server", "span", ".", "If", "the", "information", "is", "not", "available", "then", "a", "null", "will", "be", "returned", "which", "can", "be", "used", ...
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/SourceInfoUtil.java#L198-L238
37,231
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/internal/actions/ProcessorActionHandlerFactory.java
ProcessorActionHandlerFactory.getHandler
public static ProcessorActionHandler getHandler(ProcessorAction action) { ProcessorActionHandler ret = null; Class<? extends ProcessorActionHandler> cls = handlers.get(action.getClass()); if (cls != null) { try { Constructor<? extends ProcessorActionHandler> con = cls...
java
public static ProcessorActionHandler getHandler(ProcessorAction action) { ProcessorActionHandler ret = null; Class<? extends ProcessorActionHandler> cls = handlers.get(action.getClass()); if (cls != null) { try { Constructor<? extends ProcessorActionHandler> con = cls...
[ "public", "static", "ProcessorActionHandler", "getHandler", "(", "ProcessorAction", "action", ")", "{", "ProcessorActionHandler", "ret", "=", "null", ";", "Class", "<", "?", "extends", "ProcessorActionHandler", ">", "cls", "=", "handlers", ".", "get", "(", "action...
This method returns an action handler for the supplied action. @param action The action @return The handler
[ "This", "method", "returns", "an", "action", "handler", "for", "the", "supplied", "action", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/internal/actions/ProcessorActionHandlerFactory.java#L57-L69
37,232
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/ClientManager.java
ClientManager.processConfig
protected static boolean processConfig() { // Read configuration CollectorConfiguration config = configService.getCollector(null, null, null, null); if (config != null) { try { updateInstrumentation(config); } catch (Exception e) { log.sev...
java
protected static boolean processConfig() { // Read configuration CollectorConfiguration config = configService.getCollector(null, null, null, null); if (config != null) { try { updateInstrumentation(config); } catch (Exception e) { log.sev...
[ "protected", "static", "boolean", "processConfig", "(", ")", "{", "// Read configuration", "CollectorConfiguration", "config", "=", "configService", ".", "getCollector", "(", "null", ",", "null", ",", "null", ",", "null", ")", ";", "if", "(", "config", "!=", "...
This method attempts to retrieve and process the instrumentation information contained within the collector configuration. @return Whether the configuration has been retrieved and processed
[ "This", "method", "attempts", "to", "retrieve", "and", "process", "the", "instrumentation", "information", "contained", "within", "the", "collector", "configuration", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/ClientManager.java#L125-L138
37,233
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/ClientManager.java
ClientManager.updateInstrumentation
public static void updateInstrumentation(CollectorConfiguration config) throws Exception { List<String> scripts = new ArrayList<String>(); List<String> scriptNames = new ArrayList<String>(); Map<String, Instrumentation> instrumentTypes=config.getInstrumentation(); for (Map.Entry<String,...
java
public static void updateInstrumentation(CollectorConfiguration config) throws Exception { List<String> scripts = new ArrayList<String>(); List<String> scriptNames = new ArrayList<String>(); Map<String, Instrumentation> instrumentTypes=config.getInstrumentation(); for (Map.Entry<String,...
[ "public", "static", "void", "updateInstrumentation", "(", "CollectorConfiguration", "config", ")", "throws", "Exception", "{", "List", "<", "String", ">", "scripts", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "String", ">", "scr...
This method updates the instrumentation instructions. @param config The collector configuration @throws Exception Failed to update instrumentation rules
[ "This", "method", "updates", "the", "instrumentation", "instructions", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/ClientManager.java#L146-L171
37,234
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/NodeBuilder.java
NodeBuilder.build
public Node build() { ContainerNode ret = null; if (nodeType == NodeType.Component) { ret = new Component(); ((Component) ret).setComponentType(componentType); } else if (nodeType == NodeType.Consumer) { ret = new Consumer(); ((Consumer) ret).setE...
java
public Node build() { ContainerNode ret = null; if (nodeType == NodeType.Component) { ret = new Component(); ((Component) ret).setComponentType(componentType); } else if (nodeType == NodeType.Consumer) { ret = new Consumer(); ((Consumer) ret).setE...
[ "public", "Node", "build", "(", ")", "{", "ContainerNode", "ret", "=", "null", ";", "if", "(", "nodeType", "==", "NodeType", ".", "Component", ")", "{", "ret", "=", "new", "Component", "(", ")", ";", "(", "(", "Component", ")", "ret", ")", ".", "se...
This method builds the node hierarchy. @return The node hierarchy
[ "This", "method", "builds", "the", "node", "hierarchy", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/NodeBuilder.java#L202-L230
37,235
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java
TraceContext.endProcessingNode
public void endProcessingNode() { if (nodeCount.decrementAndGet() == 0 && recorder != null) { Node node = rootNode.build(); trace.setTimestamp(node.getTimestamp()); trace.setTransaction(getTransaction()); trace.getNodes().add(node); if (checkForSampl...
java
public void endProcessingNode() { if (nodeCount.decrementAndGet() == 0 && recorder != null) { Node node = rootNode.build(); trace.setTimestamp(node.getTimestamp()); trace.setTransaction(getTransaction()); trace.getNodes().add(node); if (checkForSampl...
[ "public", "void", "endProcessingNode", "(", ")", "{", "if", "(", "nodeCount", ".", "decrementAndGet", "(", ")", "==", "0", "&&", "recorder", "!=", "null", ")", "{", "Node", "node", "=", "rootNode", ".", "build", "(", ")", ";", "trace", ".", "setTimesta...
This method indicates the end of processing a node within the trace instance. Once all nodes for a trace have completed being processed, the trace will be reported.
[ "This", "method", "indicates", "the", "end", "of", "processing", "a", "node", "within", "the", "trace", "instance", ".", "Once", "all", "nodes", "for", "a", "trace", "have", "completed", "being", "processed", "the", "trace", "will", "be", "reported", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java#L108-L129
37,236
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java
TraceContext.getSourceEndpoint
public EndpointRef getSourceEndpoint() { return new EndpointRef(TagUtil.getUriPath(topSpan.getTags()), topSpan.getOperationName(), false); }
java
public EndpointRef getSourceEndpoint() { return new EndpointRef(TagUtil.getUriPath(topSpan.getTags()), topSpan.getOperationName(), false); }
[ "public", "EndpointRef", "getSourceEndpoint", "(", ")", "{", "return", "new", "EndpointRef", "(", "TagUtil", ".", "getUriPath", "(", "topSpan", ".", "getTags", "(", ")", ")", ",", "topSpan", ".", "getOperationName", "(", ")", ",", "false", ")", ";", "}" ]
This method returns the source endpoint for the root trace fragment generated by the service invocation. @return The source endpoint
[ "This", "method", "returns", "the", "source", "endpoint", "for", "the", "root", "trace", "fragment", "generated", "by", "the", "service", "invocation", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java#L202-L204
37,237
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java
TraceContext.initTraceState
public void initTraceState(Map<String, Object> state) { Object traceId = state.get(Constants.HAWKULAR_APM_TRACEID); Object transaction = state.get(Constants.HAWKULAR_APM_TXN); Object level = state.get(Constants.HAWKULAR_APM_LEVEL); if (traceId != null) { setTraceId(traceId.to...
java
public void initTraceState(Map<String, Object> state) { Object traceId = state.get(Constants.HAWKULAR_APM_TRACEID); Object transaction = state.get(Constants.HAWKULAR_APM_TXN); Object level = state.get(Constants.HAWKULAR_APM_LEVEL); if (traceId != null) { setTraceId(traceId.to...
[ "public", "void", "initTraceState", "(", "Map", "<", "String", ",", "Object", ">", "state", ")", "{", "Object", "traceId", "=", "state", ".", "get", "(", "Constants", ".", "HAWKULAR_APM_TRACEID", ")", ";", "Object", "transaction", "=", "state", ".", "get",...
Initialise the trace state from the supplied state. @param state The propagated state
[ "Initialise", "the", "trace", "state", "from", "the", "supplied", "state", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java#L211-L226
37,238
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java
TraceContext.checkForSamplingProperties
private static boolean checkForSamplingProperties(Node node) { Set<Property> samplingProperties = node instanceof ContainerNode ? ((ContainerNode) node).getPropertiesIncludingDescendants(Tags.SAMPLING_PRIORITY.getKey()) : node.getProperties(Tags.SAMPLING_PRIORITY.getKey()); ...
java
private static boolean checkForSamplingProperties(Node node) { Set<Property> samplingProperties = node instanceof ContainerNode ? ((ContainerNode) node).getPropertiesIncludingDescendants(Tags.SAMPLING_PRIORITY.getKey()) : node.getProperties(Tags.SAMPLING_PRIORITY.getKey()); ...
[ "private", "static", "boolean", "checkForSamplingProperties", "(", "Node", "node", ")", "{", "Set", "<", "Property", ">", "samplingProperties", "=", "node", "instanceof", "ContainerNode", "?", "(", "(", "ContainerNode", ")", "node", ")", ".", "getPropertiesIncludi...
This method is looking for sampling tag in nodes properties to override current sampling. @param node It sh @return boolean whether trace should be sampled or not
[ "This", "method", "is", "looking", "for", "sampling", "tag", "in", "nodes", "properties", "to", "override", "current", "sampling", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java#L234-L253
37,239
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.encodeEndpoint
public static String encodeEndpoint(String uri, String operation) { StringBuilder buf=new StringBuilder(); if (uri != null && !uri.trim().isEmpty()) { buf.append(uri); } if (operation != null && !operation.trim().isEmpty()) { buf.append('['); buf.appen...
java
public static String encodeEndpoint(String uri, String operation) { StringBuilder buf=new StringBuilder(); if (uri != null && !uri.trim().isEmpty()) { buf.append(uri); } if (operation != null && !operation.trim().isEmpty()) { buf.append('['); buf.appen...
[ "public", "static", "String", "encodeEndpoint", "(", "String", "uri", ",", "String", "operation", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "uri", "!=", "null", "&&", "!", "uri", ".", "trim", "(", ")", "."...
This method converts the supplied URI and optional operation into an endpoint descriptor. @param uri The URI @param operation The optional operation @return The endpoint descriptor
[ "This", "method", "converts", "the", "supplied", "URI", "and", "optional", "operation", "into", "an", "endpoint", "descriptor", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L40-L51
37,240
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.decodeEndpointURI
public static String decodeEndpointURI(String endpoint) { int ind=endpoint.indexOf('['); if (ind == 0) { return null; } else if (ind != -1) { return endpoint.substring(0, ind); } return endpoint; }
java
public static String decodeEndpointURI(String endpoint) { int ind=endpoint.indexOf('['); if (ind == 0) { return null; } else if (ind != -1) { return endpoint.substring(0, ind); } return endpoint; }
[ "public", "static", "String", "decodeEndpointURI", "(", "String", "endpoint", ")", "{", "int", "ind", "=", "endpoint", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "ind", "==", "0", ")", "{", "return", "null", ";", "}", "else", "if", "(", "i...
This method returns the URI part of the supplied endpoint. @param endpoint The endpoint @return The URI, or null if endpoint starts with '[' (operation prefix)
[ "This", "method", "returns", "the", "URI", "part", "of", "the", "supplied", "endpoint", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L59-L67
37,241
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.decodeEndpointOperation
public static String decodeEndpointOperation(String endpoint, boolean stripped) { int ind=endpoint.indexOf('['); if (ind != -1) { if (stripped) { return endpoint.substring(ind+1, endpoint.length()-1); } return endpoint.substring(ind); } ...
java
public static String decodeEndpointOperation(String endpoint, boolean stripped) { int ind=endpoint.indexOf('['); if (ind != -1) { if (stripped) { return endpoint.substring(ind+1, endpoint.length()-1); } return endpoint.substring(ind); } ...
[ "public", "static", "String", "decodeEndpointOperation", "(", "String", "endpoint", ",", "boolean", "stripped", ")", "{", "int", "ind", "=", "endpoint", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "ind", "!=", "-", "1", ")", "{", "if", "(", "...
This method returns the operation part of the supplied endpoint. @param endpoint The endpoint @param stripped Whether brackets should be stripped @return The operation
[ "This", "method", "returns", "the", "operation", "part", "of", "the", "supplied", "endpoint", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L76-L85
37,242
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.encodeClientURI
public static String encodeClientURI(String uri) { if (uri == null) { return Constants.URI_CLIENT_PREFIX; } return Constants.URI_CLIENT_PREFIX + uri; }
java
public static String encodeClientURI(String uri) { if (uri == null) { return Constants.URI_CLIENT_PREFIX; } return Constants.URI_CLIENT_PREFIX + uri; }
[ "public", "static", "String", "encodeClientURI", "(", "String", "uri", ")", "{", "if", "(", "uri", "==", "null", ")", "{", "return", "Constants", ".", "URI_CLIENT_PREFIX", ";", "}", "return", "Constants", ".", "URI_CLIENT_PREFIX", "+", "uri", ";", "}" ]
This method provides a client based encoding of an URI. This is required to identify the client node invoking a service using a particular URI. @param uri The original URI @return The client side version of the URI
[ "This", "method", "provides", "a", "client", "based", "encoding", "of", "an", "URI", ".", "This", "is", "required", "to", "identify", "the", "client", "node", "invoking", "a", "service", "using", "a", "particular", "URI", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L94-L99
37,243
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.decodeClientURI
public static String decodeClientURI(String clientUri) { return clientUri.startsWith(Constants.URI_CLIENT_PREFIX) ? clientUri.substring(Constants.URI_CLIENT_PREFIX.length()): clientUri; }
java
public static String decodeClientURI(String clientUri) { return clientUri.startsWith(Constants.URI_CLIENT_PREFIX) ? clientUri.substring(Constants.URI_CLIENT_PREFIX.length()): clientUri; }
[ "public", "static", "String", "decodeClientURI", "(", "String", "clientUri", ")", "{", "return", "clientUri", ".", "startsWith", "(", "Constants", ".", "URI_CLIENT_PREFIX", ")", "?", "clientUri", ".", "substring", "(", "Constants", ".", "URI_CLIENT_PREFIX", ".", ...
This method provides a decoding of a client based URI. @param clientUri The client URI @return The original URI
[ "This", "method", "provides", "a", "decoding", "of", "a", "client", "based", "URI", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L107-L110
37,244
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java
EndpointUtil.getSourceEndpoint
public static EndpointRef getSourceEndpoint(Trace fragment) { Node rootNode = fragment.getNodes().isEmpty() ? null : fragment.getNodes().get(0); if (rootNode == null) { return null; } // Create endpoint reference. If initial fragment and root node is a Producer, // th...
java
public static EndpointRef getSourceEndpoint(Trace fragment) { Node rootNode = fragment.getNodes().isEmpty() ? null : fragment.getNodes().get(0); if (rootNode == null) { return null; } // Create endpoint reference. If initial fragment and root node is a Producer, // th...
[ "public", "static", "EndpointRef", "getSourceEndpoint", "(", "Trace", "fragment", ")", "{", "Node", "rootNode", "=", "fragment", ".", "getNodes", "(", ")", ".", "isEmpty", "(", ")", "?", "null", ":", "fragment", ".", "getNodes", "(", ")", ".", "get", "("...
This method determines the source URI that should be attributed to the supplied fragment. If the top level fragment just contains a Producer, then prefix with 'client' to distinguish it from the same endpoint for the service. @param fragment The trace fragment @return The source endpoint
[ "This", "method", "determines", "the", "source", "URI", "that", "should", "be", "attributed", "to", "the", "supplied", "fragment", ".", "If", "the", "top", "level", "fragment", "just", "contains", "a", "Producer", "then", "prefix", "with", "client", "to", "d...
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/EndpointUtil.java#L120-L130
37,245
hawkular/hawkular-apm
client/api/src/main/java/org/hawkular/apm/client/api/recorder/BatchTraceRecorder.java
BatchTraceRecorder.submitTraces
protected void submitTraces() { if (!traces.isEmpty()) { // Locally store list and create new list for subsequent traces List<Trace> toSend = traces; traces = new ArrayList<>(batchSize + 1); executor.execute(new Runnable() { @Override ...
java
protected void submitTraces() { if (!traces.isEmpty()) { // Locally store list and create new list for subsequent traces List<Trace> toSend = traces; traces = new ArrayList<>(batchSize + 1); executor.execute(new Runnable() { @Override ...
[ "protected", "void", "submitTraces", "(", ")", "{", "if", "(", "!", "traces", ".", "isEmpty", "(", ")", ")", "{", "// Locally store list and create new list for subsequent traces", "List", "<", "Trace", ">", "toSend", "=", "traces", ";", "traces", "=", "new", ...
This method submits the current list of traces
[ "This", "method", "submits", "the", "current", "list", "of", "traces" ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/api/src/main/java/org/hawkular/apm/client/api/recorder/BatchTraceRecorder.java#L147-L165
37,246
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java
SpanHttpDeriverUtil.getHttpStatusCodes
public static List<HttpCode> getHttpStatusCodes(List<BinaryAnnotation> binaryAnnotations) { if (binaryAnnotations == null) { return Collections.emptyList(); } List<HttpCode> httpCodes = new ArrayList<>(); for (BinaryAnnotation binaryAnnotation: binaryAnnotations) { ...
java
public static List<HttpCode> getHttpStatusCodes(List<BinaryAnnotation> binaryAnnotations) { if (binaryAnnotations == null) { return Collections.emptyList(); } List<HttpCode> httpCodes = new ArrayList<>(); for (BinaryAnnotation binaryAnnotation: binaryAnnotations) { ...
[ "public", "static", "List", "<", "HttpCode", ">", "getHttpStatusCodes", "(", "List", "<", "BinaryAnnotation", ">", "binaryAnnotations", ")", "{", "if", "(", "binaryAnnotations", "==", "null", ")", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", ...
Method returns list of http status codes. @param binaryAnnotations zipkin binary annotations @return http status codes
[ "Method", "returns", "list", "of", "http", "status", "codes", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java#L53-L75
37,247
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java
SpanHttpDeriverUtil.getClientOrServerErrors
public static List<HttpCode> getClientOrServerErrors(List<HttpCode> httpCodes) { return httpCodes.stream() .filter(x -> x.isClientOrServerError()) .collect(Collectors.toList()); }
java
public static List<HttpCode> getClientOrServerErrors(List<HttpCode> httpCodes) { return httpCodes.stream() .filter(x -> x.isClientOrServerError()) .collect(Collectors.toList()); }
[ "public", "static", "List", "<", "HttpCode", ">", "getClientOrServerErrors", "(", "List", "<", "HttpCode", ">", "httpCodes", ")", "{", "return", "httpCodes", ".", "stream", "(", ")", ".", "filter", "(", "x", "->", "x", ".", "isClientOrServerError", "(", ")...
Method returns only client or sever http errors. @param httpCodes list of http codes @return Http client and server errors
[ "Method", "returns", "only", "client", "or", "sever", "http", "errors", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java#L83-L87
37,248
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java
SpanHttpDeriverUtil.getHttpMethod
public static String getHttpMethod(Span span) { if (isHttp(span)) { BinaryAnnotation ba = span.getBinaryAnnotation("http.method"); String httpMethod = null; if (ba != null) { httpMethod = ba.getValue().toUpperCase(); } else if (span.getName() != nu...
java
public static String getHttpMethod(Span span) { if (isHttp(span)) { BinaryAnnotation ba = span.getBinaryAnnotation("http.method"); String httpMethod = null; if (ba != null) { httpMethod = ba.getValue().toUpperCase(); } else if (span.getName() != nu...
[ "public", "static", "String", "getHttpMethod", "(", "Span", "span", ")", "{", "if", "(", "isHttp", "(", "span", ")", ")", "{", "BinaryAnnotation", "ba", "=", "span", ".", "getBinaryAnnotation", "(", "\"http.method\"", ")", ";", "String", "httpMethod", "=", ...
Derives HTTP operation from Span's binary annotations. @param span the span @return HTTP method
[ "Derives", "HTTP", "operation", "from", "Span", "s", "binary", "annotations", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java#L95-L111
37,249
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java
SpanHttpDeriverUtil.toInt
private static Integer toInt(String str) { Integer num = null; try { num = Integer.parseInt(str); } catch (NumberFormatException ex) { log.severe(String.format("failed to convert str: %s to integer", str)); } return num; }
java
private static Integer toInt(String str) { Integer num = null; try { num = Integer.parseInt(str); } catch (NumberFormatException ex) { log.severe(String.format("failed to convert str: %s to integer", str)); } return num; }
[ "private", "static", "Integer", "toInt", "(", "String", "str", ")", "{", "Integer", "num", "=", "null", ";", "try", "{", "num", "=", "Integer", ".", "parseInt", "(", "str", ")", ";", "}", "catch", "(", "NumberFormatException", "ex", ")", "{", "log", ...
Converts string to a number. @param str The string @return number or null if conversion failed
[ "Converts", "string", "to", "a", "number", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java#L130-L140
37,250
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/internal/actions/helpers/Text.java
Text.serialize
public static String serialize(Object value) { if (value instanceof String) { return (String) value; } else if (value instanceof byte[]) { return new String((byte[]) value); }
java
public static String serialize(Object value) { if (value instanceof String) { return (String) value; } else if (value instanceof byte[]) { return new String((byte[]) value); }
[ "public", "static", "String", "serialize", "(", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "String", ")", "{", "return", "(", "String", ")", "value", ";", "}", "else", "if", "(", "value", "instanceof", "byte", "[", "]", ")", "{", ...
This method converts the supplied object to a string. @param value The value @return The string, or null if an error occurred
[ "This", "method", "converts", "the", "supplied", "object", "to", "a", "string", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/internal/actions/helpers/Text.java#L36-L41
37,251
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java
Trace.allProperties
public Set<Property> allProperties() { Set<Property> properties = new HashSet<Property>(); for (Node n : nodes) { n.includeProperties(properties); } return Collections.unmodifiableSet(properties); }
java
public Set<Property> allProperties() { Set<Property> properties = new HashSet<Property>(); for (Node n : nodes) { n.includeProperties(properties); } return Collections.unmodifiableSet(properties); }
[ "public", "Set", "<", "Property", ">", "allProperties", "(", ")", "{", "Set", "<", "Property", ">", "properties", "=", "new", "HashSet", "<", "Property", ">", "(", ")", ";", "for", "(", "Node", "n", ":", "nodes", ")", "{", "n", ".", "includePropertie...
This method returns all properties contained in the node hierarchy that can be used to search for the trace. @return Aggregated list of all the properties in the node hierarchy
[ "This", "method", "returns", "all", "properties", "contained", "in", "the", "node", "hierarchy", "that", "can", "be", "used", "to", "search", "for", "the", "trace", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java#L200-L206
37,252
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java
Trace.calculateDuration
public long calculateDuration() { if (!nodes.isEmpty()) { long endTime = 0; for (int i = 0; i < getNodes().size(); i++) { Node node = getNodes().get(i); long nodeEndTime = node.overallEndTime(); if (nodeEndTime > endTime) { ...
java
public long calculateDuration() { if (!nodes.isEmpty()) { long endTime = 0; for (int i = 0; i < getNodes().size(); i++) { Node node = getNodes().get(i); long nodeEndTime = node.overallEndTime(); if (nodeEndTime > endTime) { ...
[ "public", "long", "calculateDuration", "(", ")", "{", "if", "(", "!", "nodes", ".", "isEmpty", "(", ")", ")", "{", "long", "endTime", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getNodes", "(", ")", ".", "size", "(", ")", ...
This method returns the duration of the trace fragment. @return The duration (in microseconds), or 0 if no nodes defined
[ "This", "method", "returns", "the", "duration", "of", "the", "trace", "fragment", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java#L265-L282
37,253
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java
Trace.getCorrelatedNodes
public Set<Node> getCorrelatedNodes(CorrelationIdentifier cid) { Set<Node> ret = new HashSet<Node>(); for (Node n : getNodes()) { n.findCorrelatedNodes(cid, ret); } return ret; }
java
public Set<Node> getCorrelatedNodes(CorrelationIdentifier cid) { Set<Node> ret = new HashSet<Node>(); for (Node n : getNodes()) { n.findCorrelatedNodes(cid, ret); } return ret; }
[ "public", "Set", "<", "Node", ">", "getCorrelatedNodes", "(", "CorrelationIdentifier", "cid", ")", "{", "Set", "<", "Node", ">", "ret", "=", "new", "HashSet", "<", "Node", ">", "(", ")", ";", "for", "(", "Node", "n", ":", "getNodes", "(", ")", ")", ...
This method locates any node within the trace that is associated with the supplied correlation id. @param cid The correlation identifier @return The nodes that were correlated with the supplied correlation identifier
[ "This", "method", "locates", "any", "node", "within", "the", "trace", "that", "is", "associated", "with", "the", "supplied", "correlation", "id", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Trace.java#L291-L299
37,254
hawkular/hawkular-apm
server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchEmbeddedNode.java
ElasticsearchEmbeddedNode.initNode
protected void initNode() { /** * quick fix for integration tests. if hosts property set to "embedded" then a local node is start. * maven dependencies need to be defined correctly for this to work */ ClassLoader cl = Thread.currentThread().getContextClassLoader(); tr...
java
protected void initNode() { /** * quick fix for integration tests. if hosts property set to "embedded" then a local node is start. * maven dependencies need to be defined correctly for this to work */ ClassLoader cl = Thread.currentThread().getContextClassLoader(); tr...
[ "protected", "void", "initNode", "(", ")", "{", "/**\n * quick fix for integration tests. if hosts property set to \"embedded\" then a local node is start.\n * maven dependencies need to be defined correctly for this to work\n */", "ClassLoader", "cl", "=", "Thread", "....
This method initializes the node.
[ "This", "method", "initializes", "the", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchEmbeddedNode.java#L58-L101
37,255
hawkular/hawkular-apm
server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchEmbeddedNode.java
ElasticsearchEmbeddedNode.close
public void close() { if (log.isLoggable(Level.FINEST)) { log.finest("Close Elasticsearch node=" + node + " client=" + client); } if (client != null) { client.close(); client = null; } if (node != null) { node.stop(); ...
java
public void close() { if (log.isLoggable(Level.FINEST)) { log.finest("Close Elasticsearch node=" + node + " client=" + client); } if (client != null) { client.close(); client = null; } if (node != null) { node.stop(); ...
[ "public", "void", "close", "(", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINEST", ")", ")", "{", "log", ".", "finest", "(", "\"Close Elasticsearch node=\"", "+", "node", "+", "\" client=\"", "+", "client", ")", ";", "}", "if",...
This method closes the elasticsearch node.
[ "This", "method", "closes", "the", "elasticsearch", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchEmbeddedNode.java#L106-L120
37,256
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.cast
public <T> T cast(Object obj, Class<T> clz) { if (!clz.isAssignableFrom(obj.getClass())) { return null; } return clz.cast(obj); }
java
public <T> T cast(Object obj, Class<T> clz) { if (!clz.isAssignableFrom(obj.getClass())) { return null; } return clz.cast(obj); }
[ "public", "<", "T", ">", "T", "cast", "(", "Object", "obj", ",", "Class", "<", "T", ">", "clz", ")", "{", "if", "(", "!", "clz", ".", "isAssignableFrom", "(", "obj", ".", "getClass", "(", ")", ")", ")", "{", "return", "null", ";", "}", "return"...
This method casts the supplied object to the nominated class. If the object cannot be cast to the provided type, then a null will be returned. @param obj The object @param clz The class to cast to @return The cast object, or null if the object cannot be cast
[ "This", "method", "casts", "the", "supplied", "object", "to", "the", "nominated", "class", ".", "If", "the", "object", "cannot", "be", "cast", "to", "the", "provided", "type", "then", "a", "null", "will", "be", "returned", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L142-L147
37,257
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.formatSQL
public String formatSQL(Object obj, Object expr) { String sql = null; // Check whether an SQL statement has been provided if (expr instanceof String) { sql = (String)expr; if (log.isLoggable(Level.FINEST)) { log.finest("SQL retrieved from state = "+sql);...
java
public String formatSQL(Object obj, Object expr) { String sql = null; // Check whether an SQL statement has been provided if (expr instanceof String) { sql = (String)expr; if (log.isLoggable(Level.FINEST)) { log.finest("SQL retrieved from state = "+sql);...
[ "public", "String", "formatSQL", "(", "Object", "obj", ",", "Object", "expr", ")", "{", "String", "sql", "=", "null", ";", "// Check whether an SQL statement has been provided", "if", "(", "expr", "instanceof", "String", ")", "{", "sql", "=", "(", "String", ")...
This method attempts to return a SQL statement. If an expression is supplied, and is string, it will be used. Otherwise the method will attempt to derive an expression from the supplied object. @param obj The object @param expr The optional expression to use @return The SQL statement
[ "This", "method", "attempts", "to", "return", "a", "SQL", "statement", ".", "If", "an", "expression", "is", "supplied", "and", "is", "string", "it", "will", "be", "used", ".", "Otherwise", "the", "method", "will", "attempt", "to", "derive", "an", "expressi...
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L191-L217
37,258
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.getFaultDescriptor
protected FaultDescriptor getFaultDescriptor(Object fault) { for (int i = 0; i < faultDescriptors.size(); i++) { if (faultDescriptors.get(i).isValid(fault)) { return faultDescriptors.get(i); } } return null; }
java
protected FaultDescriptor getFaultDescriptor(Object fault) { for (int i = 0; i < faultDescriptors.size(); i++) { if (faultDescriptors.get(i).isValid(fault)) { return faultDescriptors.get(i); } } return null; }
[ "protected", "FaultDescriptor", "getFaultDescriptor", "(", "Object", "fault", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "faultDescriptors", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "faultDescriptors", ".", "get", "("...
This method attempts to locate a descriptor for the fault. @param fault The fault @return The descriptor, or null if not found
[ "This", "method", "attempts", "to", "locate", "a", "descriptor", "for", "the", "fault", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L225-L232
37,259
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.faultName
public String faultName(Object fault) { FaultDescriptor fd = getFaultDescriptor(fault); if (fd != null) { return fd.getName(fault); } return fault.getClass().getSimpleName(); }
java
public String faultName(Object fault) { FaultDescriptor fd = getFaultDescriptor(fault); if (fd != null) { return fd.getName(fault); } return fault.getClass().getSimpleName(); }
[ "public", "String", "faultName", "(", "Object", "fault", ")", "{", "FaultDescriptor", "fd", "=", "getFaultDescriptor", "(", "fault", ")", ";", "if", "(", "fd", "!=", "null", ")", "{", "return", "fd", ".", "getName", "(", "fault", ")", ";", "}", "return...
This method gets the name of the supplied fault. @param fault The fault @return The name
[ "This", "method", "gets", "the", "name", "of", "the", "supplied", "fault", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L240-L246
37,260
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.faultDescription
public String faultDescription(Object fault) { FaultDescriptor fd = getFaultDescriptor(fault); if (fd != null) { return fd.getDescription(fault); } return fault.toString(); }
java
public String faultDescription(Object fault) { FaultDescriptor fd = getFaultDescriptor(fault); if (fd != null) { return fd.getDescription(fault); } return fault.toString(); }
[ "public", "String", "faultDescription", "(", "Object", "fault", ")", "{", "FaultDescriptor", "fd", "=", "getFaultDescriptor", "(", "fault", ")", ";", "if", "(", "fd", "!=", "null", ")", "{", "return", "fd", ".", "getDescription", "(", "fault", ")", ";", ...
This method gets the description of the supplied fault. @param fault The fault @return The description
[ "This", "method", "gets", "the", "description", "of", "the", "supplied", "fault", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L254-L260
37,261
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.removeAfter
public String removeAfter(String original, String marker) { int index = original.indexOf(marker); if (index != -1) { return original.substring(0, index); } return original; }
java
public String removeAfter(String original, String marker) { int index = original.indexOf(marker); if (index != -1) { return original.substring(0, index); } return original; }
[ "public", "String", "removeAfter", "(", "String", "original", ",", "String", "marker", ")", "{", "int", "index", "=", "original", ".", "indexOf", "(", "marker", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "return", "original", ".", "substri...
This method removes the end part of a string beginning at a specified marker. @param original The original string @param marker The marker identifying the point to remove from @return The modified string
[ "This", "method", "removes", "the", "end", "part", "of", "a", "string", "beginning", "at", "a", "specified", "marker", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L285-L291
37,262
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.getHeaders
public Map<String, String> getHeaders(String type, Object target) { HeadersAccessor accessor = getHeadersAccessor(type); if (accessor != null) { Map<String, String> ret = accessor.getHeaders(target); return ret; } return null; }
java
public Map<String, String> getHeaders(String type, Object target) { HeadersAccessor accessor = getHeadersAccessor(type); if (accessor != null) { Map<String, String> ret = accessor.getHeaders(target); return ret; } return null; }
[ "public", "Map", "<", "String", ",", "String", ">", "getHeaders", "(", "String", "type", ",", "Object", "target", ")", "{", "HeadersAccessor", "accessor", "=", "getHeadersAccessor", "(", "type", ")", ";", "if", "(", "accessor", "!=", "null", ")", "{", "M...
This method attempts to provide headers for the supplied target object. @param type The target type @param target The target instance @return The header map
[ "This", "method", "attempts", "to", "provide", "headers", "for", "the", "supplied", "target", "object", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L310-L317
37,263
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/BinaryAnnotationMappingDeriver.java
BinaryAnnotationMappingDeriver.getInstance
public static BinaryAnnotationMappingDeriver getInstance(String path) { if (instance == null) { synchronized (LOCK) { if (instance == null) { instance = path == null ? new BinaryAnnotationMappingDeriver() : new BinaryAnnotationMappingDe...
java
public static BinaryAnnotationMappingDeriver getInstance(String path) { if (instance == null) { synchronized (LOCK) { if (instance == null) { instance = path == null ? new BinaryAnnotationMappingDeriver() : new BinaryAnnotationMappingDe...
[ "public", "static", "BinaryAnnotationMappingDeriver", "getInstance", "(", "String", "path", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "synchronized", "(", "LOCK", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "instance", "=", "pat...
Returns instance of mapping deriver. @param path path to the mapping file @return binary annotation mapping deriver
[ "Returns", "instance", "of", "mapping", "deriver", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/BinaryAnnotationMappingDeriver.java#L63-L74
37,264
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/BinaryAnnotationMappingDeriver.java
BinaryAnnotationMappingDeriver.mappingResult
public MappingResult mappingResult(List<BinaryAnnotation> binaryAnnotations) { if (binaryAnnotations == null) { return new MappingResult(); } List<String> componentTypes = new ArrayList<>(); List<String> endpointTypes = new ArrayList<>(); MappingResult.Builder mappi...
java
public MappingResult mappingResult(List<BinaryAnnotation> binaryAnnotations) { if (binaryAnnotations == null) { return new MappingResult(); } List<String> componentTypes = new ArrayList<>(); List<String> endpointTypes = new ArrayList<>(); MappingResult.Builder mappi...
[ "public", "MappingResult", "mappingResult", "(", "List", "<", "BinaryAnnotation", ">", "binaryAnnotations", ")", "{", "if", "(", "binaryAnnotations", "==", "null", ")", "{", "return", "new", "MappingResult", "(", ")", ";", "}", "List", "<", "String", ">", "c...
Creates a mapping result from supplied binary annotations. @param binaryAnnotations binary annotations of span @return mapping result
[ "Creates", "a", "mapping", "result", "from", "supplied", "binary", "annotations", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/BinaryAnnotationMappingDeriver.java#L82-L134
37,265
hawkular/hawkular-apm
server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java
NodeDetailsDeriver.deriveNodeDetails
protected void deriveNodeDetails(Trace trace, List<Node> nodes, List<NodeDetails> rts, boolean initial, Set<Property> commonProperties) { for (int i = 0; i < nodes.size(); i++) { Node n = nodes.get(i); // If consumer or producer, check that endpoint type has been set, ...
java
protected void deriveNodeDetails(Trace trace, List<Node> nodes, List<NodeDetails> rts, boolean initial, Set<Property> commonProperties) { for (int i = 0; i < nodes.size(); i++) { Node n = nodes.get(i); // If consumer or producer, check that endpoint type has been set, ...
[ "protected", "void", "deriveNodeDetails", "(", "Trace", "trace", ",", "List", "<", "Node", ">", "nodes", ",", "List", "<", "NodeDetails", ">", "rts", ",", "boolean", "initial", ",", "Set", "<", "Property", ">", "commonProperties", ")", "{", "for", "(", "...
This method recursively derives the node details metrics for the supplied nodes. @param trace The trace @param nodes The nodes @param rts The list of node details @param initial Whether the first node in the list is the initial node @param commonProperties A set of properties to be applied to all derived NodeDetail ob...
[ "This", "method", "recursively", "derives", "the", "node", "details", "metrics", "for", "the", "supplied", "nodes", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java#L81-L147
37,266
hawkular/hawkular-apm
server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java
NodeDetailsDeriver.obtainCommonProperties
protected Set<Property> obtainCommonProperties(Trace trace) { Set<Property> commonProperties = trace.getProperties(Constants.PROP_SERVICE_NAME); commonProperties.addAll(trace.getProperties(Constants.PROP_BUILD_STAMP)); commonProperties.addAll(trace.getProperties(Constants.PROP_PRINCIPAL)); ...
java
protected Set<Property> obtainCommonProperties(Trace trace) { Set<Property> commonProperties = trace.getProperties(Constants.PROP_SERVICE_NAME); commonProperties.addAll(trace.getProperties(Constants.PROP_BUILD_STAMP)); commonProperties.addAll(trace.getProperties(Constants.PROP_PRINCIPAL)); ...
[ "protected", "Set", "<", "Property", ">", "obtainCommonProperties", "(", "Trace", "trace", ")", "{", "Set", "<", "Property", ">", "commonProperties", "=", "trace", ".", "getProperties", "(", "Constants", ".", "PROP_SERVICE_NAME", ")", ";", "commonProperties", "....
Obtain any properties from the trace that should be applied to all derived NodeDetails. @param trace The trace @return The set of properties to be applied to all derived NodeDetails
[ "Obtain", "any", "properties", "from", "the", "trace", "that", "should", "be", "applied", "to", "all", "derived", "NodeDetails", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java#L155-L160
37,267
hawkular/hawkular-apm
server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java
NodeDetailsDeriver.calculateActualTime
protected long calculateActualTime(Node n) { long childElapsed = 0; if (n.containerNode()) { long startTime=n.getTimestamp() + n.getDuration(); long endTime = n.getTimestamp(); for (int i = 0; i < ((ContainerNode) n).getNodes().size(); i++) { Node chil...
java
protected long calculateActualTime(Node n) { long childElapsed = 0; if (n.containerNode()) { long startTime=n.getTimestamp() + n.getDuration(); long endTime = n.getTimestamp(); for (int i = 0; i < ((ContainerNode) n).getNodes().size(); i++) { Node chil...
[ "protected", "long", "calculateActualTime", "(", "Node", "n", ")", "{", "long", "childElapsed", "=", "0", ";", "if", "(", "n", ".", "containerNode", "(", ")", ")", "{", "long", "startTime", "=", "n", ".", "getTimestamp", "(", ")", "+", "n", ".", "get...
This method calculates the actual time associated with the supplied node. @param n The node @return The actual time spent in the node
[ "This", "method", "calculates", "the", "actual", "time", "associated", "with", "the", "supplied", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/processors/src/main/java/org/hawkular/apm/server/processor/nodedetails/NodeDetailsDeriver.java#L169-L201
37,268
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/internal/actions/ProcessorActionHandler.java
ProcessorActionHandler.process
public boolean process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (predicate != null) { return predicate.test(trace, node, direction, headers, values); } return true; }
java
public boolean process(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (predicate != null) { return predicate.test(trace, node, direction, headers, values); } return true; }
[ "public", "boolean", "process", "(", "Trace", "trace", ",", "Node", "node", ",", "Direction", "direction", ",", "Map", "<", "String", ",", "?", ">", "headers", ",", "Object", "[", "]", "values", ")", "{", "if", "(", "predicate", "!=", "null", ")", "{...
This method processes the supplied information to extract the relevant details. @param trace The trace @param node The node @param direction The direction @param headers The optional headers @param values The values @return Whether the data was processed
[ "This", "method", "processes", "the", "supplied", "information", "to", "extract", "the", "relevant", "details", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/internal/actions/ProcessorActionHandler.java#L138-L146
37,269
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/config/instrumentation/jvm/JVM.java
JVM.isVersionValid
public boolean isVersionValid(String version) { if (fromVersion != null && version != null) { if (version.compareTo(fromVersion) < 0) { return false; } } if (toVersion != null) { if (version == null || version.compareTo(toVersion) >= 0) { ...
java
public boolean isVersionValid(String version) { if (fromVersion != null && version != null) { if (version.compareTo(fromVersion) < 0) { return false; } } if (toVersion != null) { if (version == null || version.compareTo(toVersion) >= 0) { ...
[ "public", "boolean", "isVersionValid", "(", "String", "version", ")", "{", "if", "(", "fromVersion", "!=", "null", "&&", "version", "!=", "null", ")", "{", "if", "(", "version", ".", "compareTo", "(", "fromVersion", ")", "<", "0", ")", "{", "return", "...
This method determines if the rule is valid for the supplied version. If the supplied version is null, then it is assumed to represent 'latest version' and therefore any rule with a 'toVersion' set will not be valid. @param version The version @return Whether the rule is valid for the supplied version
[ "This", "method", "determines", "if", "the", "rule", "is", "valid", "for", "the", "supplied", "version", ".", "If", "the", "supplied", "version", "is", "null", "then", "it", "is", "assumed", "to", "represent", "latest", "version", "and", "therefore", "any", ...
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/config/instrumentation/jvm/JVM.java#L233-L245
37,270
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.finest
public void finest(String mesg, Throwable t) { log(Level.FINEST, mesg, t); }
java
public void finest(String mesg, Throwable t) { log(Level.FINEST, mesg, t); }
[ "public", "void", "finest", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "FINEST", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the FINEST level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "FINEST", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L123-L125
37,271
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.finer
public void finer(String mesg, Throwable t) { log(Level.FINER, mesg, t); }
java
public void finer(String mesg, Throwable t) { log(Level.FINER, mesg, t); }
[ "public", "void", "finer", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "FINER", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the FINER level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "FINER", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L142-L144
37,272
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.fine
public void fine(String mesg, Throwable t) { log(Level.FINE, mesg, t); }
java
public void fine(String mesg, Throwable t) { log(Level.FINE, mesg, t); }
[ "public", "void", "fine", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "FINE", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the FINE level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "FINE", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L161-L163
37,273
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.info
public void info(String mesg, Throwable t) { log(Level.INFO, mesg, t); }
java
public void info(String mesg, Throwable t) { log(Level.INFO, mesg, t); }
[ "public", "void", "info", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "INFO", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the INFO level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "INFO", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L180-L182
37,274
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.warning
public void warning(String mesg, Throwable t) { log(Level.WARNING, mesg, t); }
java
public void warning(String mesg, Throwable t) { log(Level.WARNING, mesg, t); }
[ "public", "void", "warning", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "WARNING", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the WARNING level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "WARNING", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L199-L201
37,275
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.severe
public void severe(String mesg, Throwable t) { log(Level.SEVERE, mesg, t); }
java
public void severe(String mesg, Throwable t) { log(Level.SEVERE, mesg, t); }
[ "public", "void", "severe", "(", "String", "mesg", ",", "Throwable", "t", ")", "{", "log", "(", "Level", ".", "SEVERE", ",", "mesg", ",", "t", ")", ";", "}" ]
This method logs a message at the SEVERE level. @param mesg The message @param t exception to log
[ "This", "method", "logs", "a", "message", "at", "the", "SEVERE", "level", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L218-L220
37,276
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/logging/Logger.java
Logger.log
public void log(Level mesgLevel, String mesg, Throwable t) { if (mesgLevel.ordinal() >= level.ordinal()) { StringBuilder builder = new StringBuilder(); builder.append(mesgLevel.name()); builder.append(": ["); builder.append(simpleClassName != null ? simpleClassNam...
java
public void log(Level mesgLevel, String mesg, Throwable t) { if (mesgLevel.ordinal() >= level.ordinal()) { StringBuilder builder = new StringBuilder(); builder.append(mesgLevel.name()); builder.append(": ["); builder.append(simpleClassName != null ? simpleClassNam...
[ "public", "void", "log", "(", "Level", "mesgLevel", ",", "String", "mesg", ",", "Throwable", "t", ")", "{", "if", "(", "mesgLevel", ".", "ordinal", "(", ")", ">=", "level", ".", "ordinal", "(", ")", ")", "{", "StringBuilder", "builder", "=", "new", "...
This method logs a message at the supplied message level with an optional exception. @param mesgLevel The level @param mesg The message @param t The optional exception
[ "This", "method", "logs", "a", "message", "at", "the", "supplied", "message", "level", "with", "an", "optional", "exception", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/logging/Logger.java#L230-L259
37,277
hawkular/hawkular-apm
server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanDeriverUtil.java
SpanDeriverUtil.deriveOperation
public static String deriveOperation(Span span) { if (SpanHttpDeriverUtil.isHttp(span)) { return SpanHttpDeriverUtil.getHttpMethod(span); } return span.getName(); }
java
public static String deriveOperation(Span span) { if (SpanHttpDeriverUtil.isHttp(span)) { return SpanHttpDeriverUtil.getHttpMethod(span); } return span.getName(); }
[ "public", "static", "String", "deriveOperation", "(", "Span", "span", ")", "{", "if", "(", "SpanHttpDeriverUtil", ".", "isHttp", "(", "span", ")", ")", "{", "return", "SpanHttpDeriverUtil", ".", "getHttpMethod", "(", "span", ")", ";", "}", "return", "span", ...
Derives an operation from supplied span. @param span the Span @return operation (e.g. HTTP method)
[ "Derives", "an", "operation", "from", "supplied", "span", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanDeriverUtil.java#L39-L44
37,278
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.isCompleteExceptIgnoredNodes
public boolean isCompleteExceptIgnoredNodes() { synchronized (nodeStack) { if (nodeStack.isEmpty() && retainedNodes.isEmpty()) { return true; } else { // Check that remaining nodes can be ignored for (int i=0; i < nodeStack.size(); i++) { ...
java
public boolean isCompleteExceptIgnoredNodes() { synchronized (nodeStack) { if (nodeStack.isEmpty() && retainedNodes.isEmpty()) { return true; } else { // Check that remaining nodes can be ignored for (int i=0; i < nodeStack.size(); i++) { ...
[ "public", "boolean", "isCompleteExceptIgnoredNodes", "(", ")", "{", "synchronized", "(", "nodeStack", ")", "{", "if", "(", "nodeStack", ".", "isEmpty", "(", ")", "&&", "retainedNodes", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "else",...
This method determines if the fragment is complete with the exception of ignored nodes. @return Whether the fragment is complete with the exception of ignored nodes
[ "This", "method", "determines", "if", "the", "fragment", "is", "complete", "with", "the", "exception", "of", "ignored", "nodes", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L108-L127
37,279
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.pushNode
public void pushNode(Node node) { initNode(node); // Reset in stream inStream = null; synchronized (nodeStack) { // Clear popped stack poppedNodes.clear(); // Check if fragment is in suppression mode if (suppress) { supp...
java
public void pushNode(Node node) { initNode(node); // Reset in stream inStream = null; synchronized (nodeStack) { // Clear popped stack poppedNodes.clear(); // Check if fragment is in suppression mode if (suppress) { supp...
[ "public", "void", "pushNode", "(", "Node", "node", ")", "{", "initNode", "(", "node", ")", ";", "// Reset in stream", "inStream", "=", "null", ";", "synchronized", "(", "nodeStack", ")", "{", "// Clear popped stack", "poppedNodes", ".", "clear", "(", ")", ";...
This method pushes a new node into the trace fragment hierarchy. @param node The new node
[ "This", "method", "pushes", "a", "new", "node", "into", "the", "trace", "fragment", "hierarchy", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L236-L272
37,280
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.popNode
public Node popNode(Class<? extends Node> cls, String uri) { synchronized (nodeStack) { // Check if fragment is in suppression mode if (suppress) { if (!suppressedNodeStack.isEmpty()) { // Check if node is on the suppressed stack ...
java
public Node popNode(Class<? extends Node> cls, String uri) { synchronized (nodeStack) { // Check if fragment is in suppression mode if (suppress) { if (!suppressedNodeStack.isEmpty()) { // Check if node is on the suppressed stack ...
[ "public", "Node", "popNode", "(", "Class", "<", "?", "extends", "Node", ">", "cls", ",", "String", "uri", ")", "{", "synchronized", "(", "nodeStack", ")", "{", "// Check if fragment is in suppression mode", "if", "(", "suppress", ")", "{", "if", "(", "!", ...
This method pops the latest node from the trace fragment hierarchy. @param cls The type of node to pop @param uri The optional uri to match @return The node
[ "This", "method", "pops", "the", "latest", "node", "from", "the", "trace", "fragment", "hierarchy", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L282-L303
37,281
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.popNode
protected Node popNode(Stack<Node> stack, Class<? extends Node> cls, String uri) { Node top = stack.isEmpty() ? null : stack.peek(); if (top != null) { if (nodeMatches(top, cls, uri)) { Node node = stack.pop(); poppedNodes.push(node); return n...
java
protected Node popNode(Stack<Node> stack, Class<? extends Node> cls, String uri) { Node top = stack.isEmpty() ? null : stack.peek(); if (top != null) { if (nodeMatches(top, cls, uri)) { Node node = stack.pop(); poppedNodes.push(node); return n...
[ "protected", "Node", "popNode", "(", "Stack", "<", "Node", ">", "stack", ",", "Class", "<", "?", "extends", "Node", ">", "cls", ",", "String", "uri", ")", "{", "Node", "top", "=", "stack", ".", "isEmpty", "(", ")", "?", "null", ":", "stack", ".", ...
This method pops a node of the defined class and optional uri from the stack. If the uri is not defined, then the latest node of the approach class will be chosen. @param stack The stack @param cls The node type @param uri The optional uri to match @return The node, or null if no suitable candidate is found
[ "This", "method", "pops", "a", "node", "of", "the", "defined", "class", "and", "optional", "uri", "from", "the", "stack", ".", "If", "the", "uri", "is", "not", "defined", "then", "the", "latest", "node", "of", "the", "approach", "class", "will", "be", ...
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L315-L337
37,282
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.nodeMatches
protected boolean nodeMatches(Node node, Class<? extends Node> cls, String uri) { if (node.getClass() == cls) { return uri == null || NodeUtil.isOriginalURI(node, uri); } return false; }
java
protected boolean nodeMatches(Node node, Class<? extends Node> cls, String uri) { if (node.getClass() == cls) { return uri == null || NodeUtil.isOriginalURI(node, uri); } return false; }
[ "protected", "boolean", "nodeMatches", "(", "Node", "node", ",", "Class", "<", "?", "extends", "Node", ">", "cls", ",", "String", "uri", ")", "{", "if", "(", "node", ".", "getClass", "(", ")", "==", "cls", ")", "{", "return", "uri", "==", "null", "...
This method determines whether the supplied node matches the specified class and optional URI. @param node The node @param cls The class @param uri The optional URI @return Whether the node is of the correct type and matches the optional URI
[ "This", "method", "determines", "whether", "the", "supplied", "node", "matches", "the", "specified", "class", "and", "optional", "URI", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L348-L354
37,283
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.retainNode
public void retainNode(String id) { synchronized (retainedNodes) { Node current = getCurrentNode(); if (current != null) { retainedNodes.put(id, current); } } }
java
public void retainNode(String id) { synchronized (retainedNodes) { Node current = getCurrentNode(); if (current != null) { retainedNodes.put(id, current); } } }
[ "public", "void", "retainNode", "(", "String", "id", ")", "{", "synchronized", "(", "retainedNodes", ")", "{", "Node", "current", "=", "getCurrentNode", "(", ")", ";", "if", "(", "current", "!=", "null", ")", "{", "retainedNodes", ".", "put", "(", "id", ...
This method indicates that the current node, for this thread of execution, should be retained temporarily pending further changes. @param id The identifier used to later on to identify the node
[ "This", "method", "indicates", "that", "the", "current", "node", "for", "this", "thread", "of", "execution", "should", "be", "retained", "temporarily", "pending", "further", "changes", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L362-L370
37,284
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.addUncompletedCorrelationId
public void addUncompletedCorrelationId(String id, Node node, int position) { NodePlaceholder placeholder = new NodePlaceholder(); placeholder.setNode(node); placeholder.setPosition(position); uncompletedCorrelationIdsNodeMap.put(id, placeholder); }
java
public void addUncompletedCorrelationId(String id, Node node, int position) { NodePlaceholder placeholder = new NodePlaceholder(); placeholder.setNode(node); placeholder.setPosition(position); uncompletedCorrelationIdsNodeMap.put(id, placeholder); }
[ "public", "void", "addUncompletedCorrelationId", "(", "String", "id", ",", "Node", "node", ",", "int", "position", ")", "{", "NodePlaceholder", "placeholder", "=", "new", "NodePlaceholder", "(", ")", ";", "placeholder", ".", "setNode", "(", "node", ")", ";", ...
This method associates a parent node and child position with a correlation id. @param id The correlation id @param node The parent node @param position The child node position within the parent node
[ "This", "method", "associates", "a", "parent", "node", "and", "child", "position", "with", "a", "correlation", "id", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L406-L411
37,285
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.getUncompletedCorrelationIdPosition
public int getUncompletedCorrelationIdPosition(String id) { if (uncompletedCorrelationIdsNodeMap.containsKey(id)) { return uncompletedCorrelationIdsNodeMap.get(id).getPosition(); } return -1; }
java
public int getUncompletedCorrelationIdPosition(String id) { if (uncompletedCorrelationIdsNodeMap.containsKey(id)) { return uncompletedCorrelationIdsNodeMap.get(id).getPosition(); } return -1; }
[ "public", "int", "getUncompletedCorrelationIdPosition", "(", "String", "id", ")", "{", "if", "(", "uncompletedCorrelationIdsNodeMap", ".", "containsKey", "(", "id", ")", ")", "{", "return", "uncompletedCorrelationIdsNodeMap", ".", "get", "(", "id", ")", ".", "getP...
This method returns the child position associated with the supplied correlation id. @param id The correlation id @return The child node position, or -1 if unknown
[ "This", "method", "returns", "the", "child", "position", "associated", "with", "the", "supplied", "correlation", "id", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L429-L434
37,286
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.removeUncompletedCorrelationId
public Node removeUncompletedCorrelationId(String id) { NodePlaceholder placeholder=uncompletedCorrelationIdsNodeMap.remove(id); if (placeholder != null) { return placeholder.getNode(); } return null; }
java
public Node removeUncompletedCorrelationId(String id) { NodePlaceholder placeholder=uncompletedCorrelationIdsNodeMap.remove(id); if (placeholder != null) { return placeholder.getNode(); } return null; }
[ "public", "Node", "removeUncompletedCorrelationId", "(", "String", "id", ")", "{", "NodePlaceholder", "placeholder", "=", "uncompletedCorrelationIdsNodeMap", ".", "remove", "(", "id", ")", ";", "if", "(", "placeholder", "!=", "null", ")", "{", "return", "placehold...
This method removes the uncompleted correlation id and its associated information. @param id The correlation id @return The node associated with the correlation id
[ "This", "method", "removes", "the", "uncompleted", "correlation", "id", "and", "its", "associated", "information", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L443-L449
37,287
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.writeInData
public void writeInData(int hashCode, byte[] b, int offset, int len) { if (inStream != null && (hashCode == -1 || hashCode == inHashCode)) { inStream.write(b, offset, len); } }
java
public void writeInData(int hashCode, byte[] b, int offset, int len) { if (inStream != null && (hashCode == -1 || hashCode == inHashCode)) { inStream.write(b, offset, len); } }
[ "public", "void", "writeInData", "(", "int", "hashCode", ",", "byte", "[", "]", "b", ",", "int", "offset", ",", "int", "len", ")", "{", "if", "(", "inStream", "!=", "null", "&&", "(", "hashCode", "==", "-", "1", "||", "hashCode", "==", "inHashCode", ...
This method writes data to the in buffer. @param hashCode The hash code, or -1 to ignore the hash code @param b The bytes @param offset The offset @param len The length
[ "This", "method", "writes", "data", "to", "the", "in", "buffer", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L508-L512
37,288
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.getInData
public byte[] getInData(int hashCode) { if (inStream != null && (hashCode == -1 || hashCode == inHashCode)) { try { inStream.close(); } catch (IOException e) { log.severe("Failed to close in data stream: " + e); } byte[] b = inStrea...
java
public byte[] getInData(int hashCode) { if (inStream != null && (hashCode == -1 || hashCode == inHashCode)) { try { inStream.close(); } catch (IOException e) { log.severe("Failed to close in data stream: " + e); } byte[] b = inStrea...
[ "public", "byte", "[", "]", "getInData", "(", "int", "hashCode", ")", "{", "if", "(", "inStream", "!=", "null", "&&", "(", "hashCode", "==", "-", "1", "||", "hashCode", "==", "inHashCode", ")", ")", "{", "try", "{", "inStream", ".", "close", "(", "...
This method returns the data associated with the in buffer and resets the buffer to be inactive. @param hashCode The hash code, or -1 to ignore the hash code @return The data
[ "This", "method", "returns", "the", "data", "associated", "with", "the", "in", "buffer", "and", "resets", "the", "buffer", "to", "be", "inactive", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L521-L533
37,289
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.writeOutData
public void writeOutData(int hashCode, byte[] b, int offset, int len) { if (outStream != null && (hashCode == -1 || hashCode == outHashCode)) { outStream.write(b, offset, len); } }
java
public void writeOutData(int hashCode, byte[] b, int offset, int len) { if (outStream != null && (hashCode == -1 || hashCode == outHashCode)) { outStream.write(b, offset, len); } }
[ "public", "void", "writeOutData", "(", "int", "hashCode", ",", "byte", "[", "]", "b", ",", "int", "offset", ",", "int", "len", ")", "{", "if", "(", "outStream", "!=", "null", "&&", "(", "hashCode", "==", "-", "1", "||", "hashCode", "==", "outHashCode...
This method writes data to the out buffer. @param hashCode The hash code, or -1 to ignore the hash code @param b The bytes @param offset The offset @param len The length
[ "This", "method", "writes", "data", "to", "the", "out", "buffer", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L563-L567
37,290
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.getOutData
public byte[] getOutData(int hashCode) { if (outStream != null && (hashCode == -1 || hashCode == outHashCode)) { try { outStream.close(); } catch (IOException e) { log.severe("Failed to close out data stream: " + e); } byte[] b = ou...
java
public byte[] getOutData(int hashCode) { if (outStream != null && (hashCode == -1 || hashCode == outHashCode)) { try { outStream.close(); } catch (IOException e) { log.severe("Failed to close out data stream: " + e); } byte[] b = ou...
[ "public", "byte", "[", "]", "getOutData", "(", "int", "hashCode", ")", "{", "if", "(", "outStream", "!=", "null", "&&", "(", "hashCode", "==", "-", "1", "||", "hashCode", "==", "outHashCode", ")", ")", "{", "try", "{", "outStream", ".", "close", "(",...
This method returns the data associated with the out buffer and resets the buffer to be inactive. @param hashCode The hash code, or -1 to ignore the hash code @return The data
[ "This", "method", "returns", "the", "data", "associated", "with", "the", "out", "buffer", "and", "resets", "the", "buffer", "to", "be", "inactive", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L576-L588
37,291
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.setState
public void setState(Object context, String name, Object value) { StateInformation si = stateInformation.get(name); if (si == null) { si = new StateInformation(); stateInformation.put(name, si); } si.set(context, value); }
java
public void setState(Object context, String name, Object value) { StateInformation si = stateInformation.get(name); if (si == null) { si = new StateInformation(); stateInformation.put(name, si); } si.set(context, value); }
[ "public", "void", "setState", "(", "Object", "context", ",", "String", "name", ",", "Object", "value", ")", "{", "StateInformation", "si", "=", "stateInformation", ".", "get", "(", "name", ")", ";", "if", "(", "si", "==", "null", ")", "{", "si", "=", ...
This method stores state information associated with the name and optional context. @param context The optional context @param name The name @param value The value
[ "This", "method", "stores", "state", "information", "associated", "with", "the", "name", "and", "optional", "context", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L598-L605
37,292
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.getState
public Object getState(Object context, String name) { StateInformation si = stateInformation.get(name); if (si == null) { return null; } return si.get(context); }
java
public Object getState(Object context, String name) { StateInformation si = stateInformation.get(name); if (si == null) { return null; } return si.get(context); }
[ "public", "Object", "getState", "(", "Object", "context", ",", "String", "name", ")", "{", "StateInformation", "si", "=", "stateInformation", ".", "get", "(", "name", ")", ";", "if", "(", "si", "==", "null", ")", "{", "return", "null", ";", "}", "retur...
This method returns the state associated with the name and optional context. @param context The optional context @param name The name @return The state, or null if not found
[ "This", "method", "returns", "the", "state", "associated", "with", "the", "name", "and", "optional", "context", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L615-L621
37,293
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TagUtil.java
TagUtil.getUriPath
public static String getUriPath(String value) { try { URL url = new URL(value); return url.getPath(); } catch (MalformedURLException e) { return value; } }
java
public static String getUriPath(String value) { try { URL url = new URL(value); return url.getPath(); } catch (MalformedURLException e) { return value; } }
[ "public", "static", "String", "getUriPath", "(", "String", "value", ")", "{", "try", "{", "URL", "url", "=", "new", "URL", "(", "value", ")", ";", "return", "url", ".", "getPath", "(", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")", "...
This method extracts the 'path' component of a URL. If the supplied value is not a valid URL format, then it will simply return the supplied value. @param value The URI value @return The path of a URL, or the value returned as is
[ "This", "method", "extracts", "the", "path", "component", "of", "a", "URL", ".", "If", "the", "supplied", "value", "is", "not", "a", "valid", "URL", "format", "then", "it", "will", "simply", "return", "the", "supplied", "value", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TagUtil.java#L64-L71
37,294
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TagUtil.java
TagUtil.getUriPath
public static String getUriPath(Map<String, Object> tags) { for (Map.Entry<String,Object> entry : tags.entrySet()) { if (isUriKey(entry.getKey())) { return getUriPath(entry.getValue().toString()); } } return null; }
java
public static String getUriPath(Map<String, Object> tags) { for (Map.Entry<String,Object> entry : tags.entrySet()) { if (isUriKey(entry.getKey())) { return getUriPath(entry.getValue().toString()); } } return null; }
[ "public", "static", "String", "getUriPath", "(", "Map", "<", "String", ",", "Object", ">", "tags", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "tags", ".", "entrySet", "(", ")", ")", "{", "if", "(", ...
This method returns the URI value from a set of supplied tags, by first identifying which tag relates to a URI and then returning its path value. @param tags The tags @return The URI path, or null if not found
[ "This", "method", "returns", "the", "URI", "value", "from", "a", "set", "of", "supplied", "tags", "by", "first", "identifying", "which", "tag", "relates", "to", "a", "URI", "and", "then", "returning", "its", "path", "value", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TagUtil.java#L81-L88
37,295
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java
NodeUtil.rewriteURI
@Deprecated public static void rewriteURI(Node node, String uri) { node.getProperties().add(new Property(APM_ORIGINAL_URI, node.getUri())); node.setUri(uri); }
java
@Deprecated public static void rewriteURI(Node node, String uri) { node.getProperties().add(new Property(APM_ORIGINAL_URI, node.getUri())); node.setUri(uri); }
[ "@", "Deprecated", "public", "static", "void", "rewriteURI", "(", "Node", "node", ",", "String", "uri", ")", "{", "node", ".", "getProperties", "(", ")", ".", "add", "(", "new", "Property", "(", "APM_ORIGINAL_URI", ",", "node", ".", "getUri", "(", ")", ...
This method rewrites the URI associated with the supplied node and stores the original in the node's details. @param node The node @param uri The new URI @deprecated Only used in original JavaAgent. Not to be used with OpenTracing.
[ "This", "method", "rewrites", "the", "URI", "associated", "with", "the", "supplied", "node", "and", "stores", "the", "original", "in", "the", "node", "s", "details", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java#L65-L69
37,296
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java
NodeUtil.isOriginalURI
@Deprecated public static boolean isOriginalURI(Node node, String uri) { if (node.getUri().equals(uri)) { return true; } if (node.hasProperty(APM_ORIGINAL_URI)) { return node.getProperties(APM_ORIGINAL_URI).iterator().next().getValue().equals(uri); } r...
java
@Deprecated public static boolean isOriginalURI(Node node, String uri) { if (node.getUri().equals(uri)) { return true; } if (node.hasProperty(APM_ORIGINAL_URI)) { return node.getProperties(APM_ORIGINAL_URI).iterator().next().getValue().equals(uri); } r...
[ "@", "Deprecated", "public", "static", "boolean", "isOriginalURI", "(", "Node", "node", ",", "String", "uri", ")", "{", "if", "(", "node", ".", "getUri", "(", ")", ".", "equals", "(", "uri", ")", ")", "{", "return", "true", ";", "}", "if", "(", "no...
This method determines whether the supplied URI matches the original URI on the node. @param node The node @param uri The URI @return Whether the supplied URI is the same as the node's original @deprecated Only used in original JavaAgent. Not to be used with OpenTracing.
[ "This", "method", "determines", "whether", "the", "supplied", "URI", "matches", "the", "original", "URI", "on", "the", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java#L80-L89
37,297
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/internal/actions/DataExpressionHandler.java
DataExpressionHandler.getDataValue
protected Object getDataValue(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (source == DataSource.Content) { return values[index]; } else if (source == DataSource.Header) { return headers.get(key); } return ...
java
protected Object getDataValue(Trace trace, Node node, Direction direction, Map<String, ?> headers, Object[] values) { if (source == DataSource.Content) { return values[index]; } else if (source == DataSource.Header) { return headers.get(key); } return ...
[ "protected", "Object", "getDataValue", "(", "Trace", "trace", ",", "Node", "node", ",", "Direction", "direction", ",", "Map", "<", "String", ",", "?", ">", "headers", ",", "Object", "[", "]", "values", ")", "{", "if", "(", "source", "==", "DataSource", ...
This method returns the data value associated with the requested data source and key.. @param trace The trace @param node The node @param direction The direction @param headers The optional headers @param values The values @return The required data value
[ "This", "method", "returns", "the", "data", "value", "associated", "with", "the", "requested", "data", "source", "and", "key", ".." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/internal/actions/DataExpressionHandler.java#L95-L103
37,298
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/ContainerNode.java
ContainerNode.includeProperties
@Override protected void includeProperties(Set<Property> allProperties) { super.includeProperties(allProperties); nodes.forEach(n -> n.includeProperties(allProperties)); }
java
@Override protected void includeProperties(Set<Property> allProperties) { super.includeProperties(allProperties); nodes.forEach(n -> n.includeProperties(allProperties)); }
[ "@", "Override", "protected", "void", "includeProperties", "(", "Set", "<", "Property", ">", "allProperties", ")", "{", "super", ".", "includeProperties", "(", "allProperties", ")", ";", "nodes", ".", "forEach", "(", "n", "->", "n", ".", "includeProperties", ...
This method adds the properties for this node to the supplied set. @param allProperties The aggregated set of properties
[ "This", "method", "adds", "the", "properties", "for", "this", "node", "to", "the", "supplied", "set", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/ContainerNode.java#L85-L89
37,299
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/ContainerNode.java
ContainerNode.overallEndTime
@Override protected long overallEndTime() { long ret = super.overallEndTime(); for (Node child : nodes) { long childEndTime = child.overallEndTime(); if (childEndTime > ret) { ret = childEndTime; } } return ret; }
java
@Override protected long overallEndTime() { long ret = super.overallEndTime(); for (Node child : nodes) { long childEndTime = child.overallEndTime(); if (childEndTime > ret) { ret = childEndTime; } } return ret; }
[ "@", "Override", "protected", "long", "overallEndTime", "(", ")", "{", "long", "ret", "=", "super", ".", "overallEndTime", "(", ")", ";", "for", "(", "Node", "child", ":", "nodes", ")", "{", "long", "childEndTime", "=", "child", ".", "overallEndTime", "(...
This method determines the overall end time of this node. @return The overall end time
[ "This", "method", "determines", "the", "overall", "end", "time", "of", "this", "node", "." ]
57a4df0611b359597626563ea5f9ac64d4bb2533
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/ContainerNode.java#L96-L109