use of com.navercorp.pinpoint.bootstrap.context.SpanRecorder in project pinpoint by naver.
the class ApacheDubboProviderInterceptor method createTrace.
@Override
protected Trace createTrace(Object target, Object[] args) {
final Trace trace = readRequestTrace(target, args);
if (trace.canSampled()) {
final SpanRecorder recorder = trace.getSpanRecorder();
// You have to record a service type within Server range.
recorder.recordServiceType(ApacheDubboConstants.DUBBO_PROVIDER_SERVICE_TYPE);
recorder.recordApi(DUBBO_PROVIDER_METHOD_DESCRIPTOR);
recordRequest(recorder, target, args);
}
return trace;
}
use of com.navercorp.pinpoint.bootstrap.context.SpanRecorder in project pinpoint by naver.
the class ServerStreamCreatedInterceptor method createTrace.
private Trace createTrace(final GrpcServerStreamRequest request) {
Trace trace = requestTraceReader.read(request);
if (trace.canSampled()) {
SpanRecorder spanRecorder = trace.getSpanRecorder();
spanRecorder.recordServiceType(GrpcConstants.SERVER_SERVICE_TYPE);
spanRecorder.recordApi(GRPC_SERVER_CALL_METHOD_DESCRIPTOR);
this.serverRequestRecorder.record(spanRecorder, request);
}
return trace;
}
use of com.navercorp.pinpoint.bootstrap.context.SpanRecorder in project pinpoint by naver.
the class PeriodicSchedulerTaskRunMethodInterceptor method createTrace.
@Override
public Trace createTrace(Object target, Object[] args) {
if (AsyncContextAccessorUtils.getAsyncContext(target) == null) {
return null;
}
final Trace trace = traceContext.newTraceObject();
if (trace.canSampled()) {
final SpanRecorder recorder = trace.getSpanRecorder();
// You have to record a service type within Server range.
recorder.recordServiceType(ReactorConstants.REACTOR_SCHEDULER);
recorder.recordApi(REACTOR_PERIODIC_SCHEDULER_METHOD_DESCRIPTOR);
recorder.recordRemoteAddress("LOCAL");
recorder.recordRpcName("/schedulePeriodically");
recorder.recordEndPoint("/");
}
return trace;
}
Aggregations