Search in sources :

Example 6 with SpanHint

use of com.navercorp.pinpoint.web.vo.SpanHint in project pinpoint by naver.

the class SpanQueryBuilderTest method spanFilter.

@Test
public void spanFilter() {
    SpanHint spanHint = new SpanHint(COLLECTOR_ACCEPTOR_TIME, RESPONSE_TIME, "appName");
    SpanQueryBuilder builder = new SpanQueryBuilder();
    Predicate<SpanBo> filter = builder.newSpanFilter(txId, spanHint);
    SpanBo span = new SpanBo();
    span.setTransactionId(txId);
    span.setCollectorAcceptTime(100);
    span.setElapsed(200);
    span.setApplicationId("appName");
    Assert.assertTrue(filter.test(span));
}
Also used : SpanHint(com.navercorp.pinpoint.web.vo.SpanHint) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) Test(org.junit.Test)

Aggregations

SpanHint (com.navercorp.pinpoint.web.vo.SpanHint)6 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)5 Test (org.junit.Test)4 GetTraceInfo (com.navercorp.pinpoint.web.vo.GetTraceInfo)3 SpanDecoder (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.SpanDecoder)2 SpanQuery (com.navercorp.pinpoint.web.dao.hbase.SpanQuery)2 SpanQueryBuilder (com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder)2 TransactionId (com.navercorp.pinpoint.common.profiler.util.TransactionId)1 Filter (org.apache.hadoop.hbase.filter.Filter)1 TimestampsFilter (org.apache.hadoop.hbase.filter.TimestampsFilter)1