Search in sources :

Example 6 with PAnnotation

use of com.navercorp.pinpoint.grpc.trace.PAnnotation in project pinpoint by naver.

the class GrpcAnnotationHandlerTest method getValue.

@Test
public void getValue() {
    AnnotationFactory.AnnotationTypeHandler<PAnnotation> handler = new GrpcAnnotationHandler();
    PAnnotation.Builder builder = PAnnotation.newBuilder();
    builder.getValueBuilder().setStringValue("testStringField");
    PAnnotation pAnnotation = builder.build();
    Object value = handler.getValue(pAnnotation);
    Assert.assertEquals("testStringField", value);
}
Also used : PAnnotation(com.navercorp.pinpoint.grpc.trace.PAnnotation) AnnotationFactory(com.navercorp.pinpoint.common.server.bo.AnnotationFactory) Test(org.junit.Test)

Aggregations

PAnnotation (com.navercorp.pinpoint.grpc.trace.PAnnotation)6 VisibleForTesting (com.navercorp.pinpoint.common.annotations.VisibleForTesting)3 PSpanEvent (com.navercorp.pinpoint.grpc.trace.PSpanEvent)3 IntStringValue (com.navercorp.pinpoint.common.util.IntStringValue)2 PAnnotationValue (com.navercorp.pinpoint.grpc.trace.PAnnotationValue)2 PIntStringValue (com.navercorp.pinpoint.grpc.trace.PIntStringValue)2 PSpan (com.navercorp.pinpoint.grpc.trace.PSpan)2 Annotation (com.navercorp.pinpoint.profiler.context.Annotation)2 ArrayList (java.util.ArrayList)2 TraceId (com.navercorp.pinpoint.bootstrap.context.TraceId)1 AnnotationBo (com.navercorp.pinpoint.common.server.bo.AnnotationBo)1 AnnotationFactory (com.navercorp.pinpoint.common.server.bo.AnnotationFactory)1 PAcceptEvent (com.navercorp.pinpoint.grpc.trace.PAcceptEvent)1 PLocalAsyncId (com.navercorp.pinpoint.grpc.trace.PLocalAsyncId)1 PNextEvent (com.navercorp.pinpoint.grpc.trace.PNextEvent)1 PSpanMessage (com.navercorp.pinpoint.grpc.trace.PSpanMessage)1 PTransactionId (com.navercorp.pinpoint.grpc.trace.PTransactionId)1 AsyncId (com.navercorp.pinpoint.profiler.context.AsyncId)1 LocalAsyncId (com.navercorp.pinpoint.profiler.context.LocalAsyncId)1 SpanEvent (com.navercorp.pinpoint.profiler.context.SpanEvent)1