Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get call stack in spring-webflux boots on netty server #6352

Closed
dinesh4747 opened this issue Dec 22, 2019 · 34 comments
Closed

Unable to get call stack in spring-webflux boots on netty server #6352

dinesh4747 opened this issue Dec 22, 2019 · 34 comments

Comments

@dinesh4747
Copy link

Environment:

Pinpoint Agent version - 2.0.0-RC1
Spring boot version - Spring Boot 2.1.3.RELEASE
App code runs on - reactor-netty server which will be started inherently since it uses spring webflux

Issue - Unable to get the scattered point which helps in discovering the

Below exception indicated that spring boot with reactor netty server which comes with spring webflux

2019-12-22 18:46:49 INFO checkapp:addorder:1577040406302 => local. ready() transportId:14
2019-12-22 18:46:49 INFO connect:PingSession{id=14, header=Header{agentId='addorder', applicationName='checkapp', agentStartTime=1577040406302, socketId=1}, eventIdAllocator=0}
2019-12-22 18:46:49 INFO checkapp:addorder:1577040406302 => local. execute handshake:[740, 710, 730, 750]
2019-12-22 18:46:49 INFO AgentInfo{checkapp:addorder:1577040406302:} handleHandshake() started. data:[740, 710, 730, 750]
2019-12-22 18:56:54 INFO Failed to span stream, cause=CANCELLED: cancelled before receiving half close
2019-12-22 18:56:54 INFO Failed to ping stream, id=2, cause=CANCELLED: cancelled before receiving half close
2019-12-22 18:56:54 INFO Failed to stat stream, cause=CANCELLED: cancelled before receiving half close
2019-12-22 18:56:54 INFO Failed to command stream, checkapp:addorder:1577040406302 => local, cause=CANCELLED: cancelled before receiving half close
2019-12-22 18:56:54 INFO close:PingSession{id=14, header=Header{agentId='addorder', applicationName='checkapp', agentStartTime=1577040406302, socketId=1}, eventIdAllocator=3}/ShutdownEventListener{shutdown=false}
2019-12-22 18:56:54 INFO checkapp:addorder:1577040406302 <=> local all streamChannels will be close.
22-Dec-2019 18:56:54.721 SEVERE [Pinpoint-GrpcAgent-Server-3] io.grpc.internal.SerializingExecutor.run Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed@7f6f43d3
io.grpc.StatusRuntimeException: CANCELLED: call already cancelled
at io.grpc.Status.asRuntimeException(Status.java:517)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:356)
at com.navercorp.pinpoint.collector.receiver.grpc.PinpointGrpcServer.close(PinpointGrpcServer.java:289)
at com.navercorp.pinpoint.collector.receiver.grpc.PinpointGrpcServer.disconnected(PinpointGrpcServer.java:273)
at com.navercorp.pinpoint.collector.receiver.grpc.service.command.GrpcCommandService$2.onError(GrpcCommandService.java:131)
at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:269)
at io.grpc.PartialForwardingServerCallListener.onCancel(PartialForwardingServerCallListener.java:40)
at io.grpc.ForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:23)
at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:40)
at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:96)
at io.grpc.PartialForwardingServerCallListener.onCancel(PartialForwardingServerCallListener.java:40)
at io.grpc.ForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:23)
at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:40)
at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:96)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:293)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:738)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at com.navercorp.pinpoint.collector.monitor.MonitoredRunnableDecorator$InstrumentedRunnable.run(MonitoredRunnableDecorator.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-12-22 19:00:02 INFO Initialize schedule listener. spanStreamExecutorInterceptor v1.Span/SendSpan, headers=Metadata(content-type=application/grpc,user-agent=grpc-java-netty/1.14.0,agentid=addorder,applicationname=checkapp,starttime=1577041198645,grpc-accept-encoding=gzip), initNumMessages=32, scheduler=StreamExecutorRejectedExecutionRequestScheduler{scheduledExecutorService=java.util.concurrent.ScheduledThreadPoolExecutor@31e4fad7[Running, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 2614], periodMillis=1000}, listener=Listener{rejectedExecutionListener=RejectedExecutionListener{rejectedExecutionCounter=0, serverCall=DefaultServerCallWrapper{serverCall=io.grpc.internal.ServerCallImpl@22401702}}, requestScheduledFuture=java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@67428d2e}

Please do help us in givingja

@jaehong-kim
Copy link
Contributor

@david100gom
Hi.
Applicable starting from Pinpoint 2.0.0-RC2.
README

@dinesh4747
Copy link
Author

@jaehong-kim - Thanks for the timely clarification, does current code base has RC2 version where i can use it ? and when RC2 version planned for a release ?

@dinesh4747
Copy link
Author

@jaehong-kim - whether the Netty spring webflux plugin available in master branch ?

@jaehong-kim
Copy link
Contributor

@dinesh4747
Applies to the current master version.
RC2 version is being prepared.

@dinesh4747
Copy link
Author

@jaehong-kim - Thanks for the update and I tried using the binaries from master/latest, But unable to find the tracing data for application methods, rather it shows the call stack only for native netty and webflux.

In none of the request, Pinpoint couldnt get the profiling data for the rest api request

Referemce logs:

019-12-25 00:25:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :140) AFTER com.google.gson.Gson args:() result:{"traceId":"5e025f256fedb4682b992ff62015a4f4","spanId":"2b992ff62015a4f4","spanExportable":"false","timestampSeconds":1577213744,"timestampNanos":363000000,"severity":"INFO","thread":"reactor-http-nio-5","logger":"com.lowes.cart.infrastructure.integration.client.impl.CartDataConnectorImpl","message":"Reponse Time - cart-data-svc - updateCart API : 2897ms","context":"default","logging.googleapis.com/trace":"projects/gcp-ushi-telemetry-npe/traces/5e025f256fedb4682b992ff62015a4f4","logging.googleapis.com/spanId":"2b992ff62015a4f4"}
2019-12-25 00:25:44 DEBUG BEFORE reactor.core.publisher.FluxPeek$PeekSubscriber args:(DefaultKafkaSender$Response)
2019-12-25 00:25:44 DEBUG AsyncContext not found
2019-12-25 00:25:44 DEBUG BEFORE reactor.core.publisher.FluxPeek$PeekSubscriber args:(Cart)
2019-12-25 00:25:44 DEBUG AsyncContext not found
2019-12-25 00:25:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :115) BEFORE com.google.gson.Gson args:()
2019-12-25 00:25:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 DEBUG BEFORE reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber args:(DefaultKafkaSender$Response)
2019-12-25 00:25:44 DEBUG AsyncContext not found
2019-12-25 00:25:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2019-12-25 00:25:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :140) AFTER com.google.gson.Gson args:() result:{"traceId":"5e025f25506c05ce92c11aafa5a3432f","spanId":"92c11aafa5a3432f","spanExportable":"false","timestampSeconds":1577213744,"timestampNanos":364000000,"severity":"INFO","thread":"single-1","logger":"com.lowes.cart.infrastructure.integration.client.impl.ReverseSyncMigrationConnectorImpl","message":"onNext(Correlation\u003d6615169416495509919 metadata\u003dcart-data-reverse-sync-0@-1 exception\u003dnull)","context":"default","logging.googleapis.com/trace":"projects/gcp-ushi-telemetry-npe/traces/5e025f25506c05ce92c11aafa5a3432f","logging.googleapis.com/spanId":"92c11aafa5a3432f"}
2019-12-25 00:25:44 [DEBUG](c.n.p.b.i.BasicMethodInterceptor :115) BEFORE com.fasterxml.jackson.databind.ObjectMapper args:(null, null, null)
2019-12-25 00:25:44 DEBUG AFTER reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber args:(DefaultKafkaSender$Response) result:null
2019-12-25 00:25:44 DEBUG AsyncContext not found

@dinesh4747
Copy link
Author

@jaehong-kim - Not sure what does Async context was missing refers to.. But none of the spring-webflux apps could trace

Can someone please give us some direction ?

@emeroad
Copy link
Member

emeroad commented Dec 26, 2019

Can you make a reproduction sample project?

@jaehong-kim
Copy link
Contributor

@dinesh4747
What application methods are you using?
Is this a WebClient call?

@dinesh4747
Copy link
Author

dinesh4747 commented Dec 27, 2019

@jaehong-kim - Yes we org.springframework.web.reactive.function.client.WebClient making any external calls

From the call tree I could see only the trace of Netty native method calls and none of the application related method calls were been intercepted

Screenshot 2019-12-27 at 10 34 54 AM

While you look at the API column, it was very evident that it traces "Netty, jackson and webflux" where none of the application specific methods where getting traces

@jaehong-kim
Copy link
Contributor

@dinesh4747
Where is the WebClient calling code located?

Sample Code

...

@RestController
@RequestMapping("/employees")
public class EmployeeReactiveController {
    private EmployeeRepository employeeRepository;

    public EmployeeReactiveController(EmployeeRepository employeeRepository) {
        this.employeeRepository = employeeRepository;
    }

    @GetMapping("/{id}")
    private Mono<Employee> getEmployeeById(@PathVariable String id) {
        Mono<Employee> mono = employeeRepository.findEmployeeById(id);
        return mono;
    }

    @GetMapping
    private Flux<Employee> getAllEmployees() {
        return employeeRepository.findAllEmployees();
    }
}

@dinesh4747
Copy link
Author

@ResponseStatus(HttpStatus.CREATED) @Timed Mono<Cart> addToCart( @RequestBody @AnyOf({"RegularItemATCRequest", "GiftCardATCRequest", "RequiredToFunctionATCRequest"}) final Cart cart, @RequestHeader final HttpHeaders httpHeaders);

Above was code base actually used in one of the api call

@dinesh4747
Copy link
Author

Looks like pinpoint agent doesn't pick up the application methods and just profiles only the native Netty method internal calls, is there any specific config changes need to be done or I am missing something here

i have forked the code from master version snapshot-2.0

It would be really great if someone can show some direction here

@dinesh4747
Copy link
Author

In order to trace Netty based spring webflux whether we need any specific configuration or tweaks in pinpoint.config... since i have followed the steps as mentioned in the plugin but still unable to trace application specific methods @jaehong-kim @emeroad

@dinesh4747 dinesh4747 changed the title In Pinpint-2.0-RC1 Reactor-netty with Spring webflix is not working - Unable to get the call tree/Stack Trace Unable to get call stack in spring-webflux boots on netty server Jan 1, 2020
@dinesh4747
Copy link
Author

could someone please help me here in some direction which will bring this issue to closure...

@dinesh4747
Copy link
Author

Few Observations:

  1. Tried with an option of giving the main application name under profiler.springboot.bootstrap.main=com.MainApplication.class ---> but didn't help much

  2. Tried with profiler.reactor-netty.server.bootstrap.main=com.MainApplication.class ----> this also didn't help

  3. Finally tried with profiler.entrypoint=className ---> It also didn't help

While you look at the call stack as attached below, it was tracing only the native/internal method calls of netty/spring webflux and none of the application bound calls being traced

Screenshot 2020-01-02 at 12 56 57 PM

@pinpoint-apm pinpoint-apm deleted a comment from dinesh4747 Jan 3, 2020
@dinesh4747
Copy link
Author

@jaehong-kim - Could you please share your guidance here, your word of though would be Highly appreciated

@jaehong-kim
Copy link
Contributor

@dinesh4747

  • If you want to track spring bean
profiler.spring.beans.1.scope=component-scan
profiler.spring.beans.1.base-packages=
profiler.spring.beans.1.name.pattern=
profiler.spring.beans.1.class.pattern=
profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository

profiler.spring.beans.2.scope=post-processor
profiler.spring.beans.2.base-packages=
profiler.spring.beans.2.name.pattern=
profiler.spring.beans.2.class.pattern=
profiler.spring.beans.2.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
  • If you want to trace the method
# Needs to be a comma separated list of fully qualified class names, or fully qualified package names with wild card class.
profiler.include=com.MainApplication.*

or

# Needs to be a comma separated list of fully qualified method names. Wild card not supported.
profiler.entrypoint=com.MainApplication.execute
  • Remove the "class" from the bootstrap.main configuration
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
profiler.springboot.bootstrap.main=com.MainApplication

If you have additional methods you want to track, pass the actual code. please

@dinesh4747
Copy link
Author

@jaehong-kim - Thanks a ton Kim... while you look at the screenshot above in correlation with options tried, do you see any discrepancy and why its tracing application specific method calls by default?... Any clue or suspicion on this pls...

@dinesh4747
Copy link
Author

@jaehong-kim - As per the documentation here - https://github.com/naver/pinpoint/blob/master/plugins/spring-webflux/README.md - By default we should get the tracing of application specific methods running under netty server right.. But I don't see its coming out..

Could you please confirm if I am missing something here or any specific config changes to be done to enable appl specific method tracing ?

@dinesh4747
Copy link
Author

dinesh4747 commented Jan 6, 2020

@jaehong-kim @emeroad - I have enabled the debug flag as well and tried using Thrift protocol as well as part of work around, but none of them appears to be working.. Is this a bug like netty profiler plugin was not tracing as expected

Version of spring boot and webflux used:

1) spring boot starter is :- 2.1.3.RELEASE
2) spring web flux :- 5.1.5.RELEASE

Logs for reference:

2020-01-06 12:46:44 DEBUG Initialized requestEvent. request=POST{uri=/cartcomp/cart, connection=SimpleConnection{channel=[id: 0x12f85769, L:/127.0.0.1:6060 - R:/127.0.0.1:54449]}}, serviceType=REACTOR_NETTY, methodDescriptor={className=reactor.netty.http.server.HttpServerHandle, methodName=onStateChange, parameterTypes=[reactor.netty.Connection, reactor.netty.ConnectionObserver$State], parameterVariableName=[connection, newState], parameterDescriptor=(reactor.netty.Connection connection, reactor.netty.ConnectionObserver$State newState), apiDescriptor=reactor.netty.http.server.HttpServerHandle.onStateChange(reactor.netty.Connection connection, reactor.netty.ConnectionObserver$State newState), lineNumber=57, apiId=-1154, fullName=reactor.netty.http.server.HttpServerHandle.onStateChange(reactor.netty.Connection connection, reactor.netty.ConnectionObserver$State newState):57, type=0}
2020-01-06 12:46:44 DEBUG SamplingFlag=null
2020-01-06 12:46:44 [DEBUG](c.n.p.p.c.LoggingBaseTraceFactory :94 ) newAsyncTraceObject()
2020-01-06 12:46:44 DEBUG register ActiveTrace key:SampledActiveTrace{traceRoot=DefaultTraceRoot{traceId=DefaultTraceId{agentId='item-host', agentStartTime=1578294884426, transactionSequence=10, parentSpanId=-1, spanId=6048055075911268839, flags=0}, agentId='item-host', traceStartTime=1578295004390}}
2020-01-06 12:46:44 [DEBUG](c.n.p.b.p.r.RequestTraceReader :327) TraceID not exist. start new trace. requestUrl:/cartcomp/cart, remoteAddr:127.0.0.1:54449
2020-01-06 12:46:44 [DEBUG](c.n.p.b.p.r.ServerRequestRecorder :322) Record rpcName=/cartcomp/cart
2020-01-06 12:46:44 [DEBUG](c.n.p.b.p.r.ServerRequestRecorder :322) Record endPoint=/cartcomp/cart
2020-01-06 12:46:44 [DEBUG](c.n.p.b.p.r.ServerRequestRecorder :322) Record remoteAddress=127.0.0.1:54449
2020-01-06 12:46:44 DEBUG Set closeable-AsyncContext StatefulAsyncContext{asyncState=ListenableAsyncState{asyncStateListener=com.navercorp.pinpoint.profiler.context.SpanAsyncStateListener@381c0f8, setup=true, await=false, finish=false}} DefaultAsyncContext{traceRoot=DefaultTraceRoot{traceId=DefaultTraceId{agentId='item-host', agentStartTime=1578294884426, transactionSequence=10, parentSpanId=-1, spanId=6048055075911268839, flags=0}, agentId='item-host', traceStartTime=1578295004390}, asyncId=DefaultAsyncId{asyncId=10, sequence=0}}
2020-01-06 12:46:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :115) BEFORE com.google.gson.Gson args:()
2020-01-06 12:46:44 [DEBUG](c.n.p.b.i.BasicMethodInterceptor :115) BEFORE com.fasterxml.jackson.databind.ObjectMapper args:(null, null, null)
2020-01-06 12:46:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :115) BEFORE com.google.gson.Gson args:()
2020-01-06 12:46:44 [DEBUG](c.n.p.b.i.BasicMethodInterceptor :115) BEFORE com.fasterxml.jackson.databind.ObjectMapper args:(null, null, null)
2020-01-06 12:46:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 DEBUG tryAfter() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor
2020-01-06 12:46:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :140) AFTER com.google.gson.Gson args:() result:{"timestampSeconds":1578295004,"timestampNanos":391000000,"severity":"INFO","thread":"reactor-http-nio-11","logger":"com.lowes.commerceidentity.filter.AuthenticationWebFilter","message":"op\u003dauth_web_filter, status\u003dOK, desc\u003drequest url\u003d/cartcomp/cart","context":"default"}
2020-01-06 12:46:44 [DEBUG](c.n.p.p.g.i.ToJsonInterceptor :115) BEFORE com.google.gson.Gson args:()
2020-01-06 12:46:44 DEBUG tryBefore() returns false: interceptorScopeTransaction: InterceptorScopeInvocation(GSON_SCOPE)[depth=1], executionPoint: BOUNDARY. Skip interceptor class com.navercorp.pinpoint.plugin.gson.interceptor.ToJsonInterceptor

Requesting you to take a final look and confirm so that I can proceed with other options, since I have spent almost close to a month on this... Any help or suggestion would really take me in closing this ticket

@dinesh4747
Copy link
Author

@jaehong-kim - Awaiting for your response on this ticket... Your view on this ticket would really help in getting into some closure...

@jaehong-kim
Copy link
Contributor

@dinesh4747
I really want to help too. But the demands are abstract.
Show me your project code.

@dinesh4747
Copy link
Author

dinesh4747 commented Jan 8, 2020

@jaehong-kim - As requested here with I have enclosed the code base for your reference, Requesting you to help with your valuable guidance.

And while try tracing it only displays as "Spring boot" App image in the server map and I dont what was the issue,

Thanks for your time and response in anticipation

@jaehong-kim
Copy link
Contributor

@dinesh4747

For TestController

profiler.spring.beans.2.scope=post-processor
profiler.spring.beans.2.base-packages=
profiler.spring.beans.2.name.pattern=
profiler.spring.beans.2.class.pattern=
profiler.spring.beans.2.annotation=org.springframework.web.bind.annotation.RestController

@dinesh4747
Copy link
Author

dinesh4747 commented Jan 9, 2020

@jaehong-kim - Thanks for your quick response, Unfortunately Hard luck from the call stack we don't see application specific methods where getting profiled/traced and showing up in the call stack and we are still stuck at the same issue

we were looking for TestController and service calls needs to be profiled but none of them appears to showing up here from the below snapshot

Screenshot 2020-01-09 at 12 46 31 PM

While you look at the call stack it was only netty/spring webflux internal/native method calls were getting traced, But we wanted the actual application specific methods calls to profiled.. Let me know if I am missing something here.

@dinesh4747
Copy link
Author

@jaehong-kim - Could you please share your view from the above comment, here with I have enclosed the config as well for your reference

###########################################################

Spring WebFlux

###########################################################
profiler.spring.webflux.enable=true

Client

Record Parameter.

profiler.spring.webflux.client.param=true

Record cookies.

profiler.spring.webflux.client.cookie=true

When cookies should be dumped. It could be ALWAYS or EXCEPTION.

profiler.spring.webflux.client.cookie.dumptype=ALWAYS

1 out of n cookies will be sampled where n is the rate. (1: 100%)

profiler.spring.webflux.client.cookie.sampling.rate=1

Cookie dump size.

profiler.spring.webflux.client.cookie.dumpsize=1024

#profiler.springboot.bootstrap.main=com.sample.cart.CartServiceApplication

###########################################################

Reactor

###########################################################
profiler.reactor.enable=true

Set whether to trace the Subscriber.onError(Throwable t) method

profiler.reactor.trace.subscribe.error=true

###########################################################

Netty

###########################################################

recommend netty plugin disable, when using VERTX.

profiler.netty=true
profiler.netty.http=true

###########################################################

spring-beans

###########################################################

Profile spring-beans

profiler.spring.beans=true

filters

filter

filter OR filters

filter

value

value AND filter

value

token

token OR token

token

profiler.spring.beans.n.scope= [component-scan | post-processor] default is component-scan.

profiler.spring.beans.n.base-packages= [package name, ...]

profiler.spring.beans.n.name.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]

profiler.spring.beans.n.class.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]

profiler.spring.beans.n.annotation= [annotation name, ...]

Scope:

component-scan: <context:component-scan ... /> or @componentscan

post-processor: BeanPostProcessor - Slow!!!

ANT Style pattern rules:

? - matches on character

* - matches zero or more characters

** - matches zero or more 'directories' in a path

Examples

profiler.spring.beans.1.scope=component-scan

profiler.spring.beans.1.base-packages=com.foo, com.bar

profiler.spring.beans.1.name.pattern=.*Foo, regex:.*Bar, antstyle:*Controller

profiler.spring.beans.1.class.pattern=

profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository

profiler.spring.beans.2.scope=post-processor

profiler.spring.beans.2.base-packages=com.foo

profiler.spring.beans.2.name.pattern=

profiler.spring.beans.2.class.pattern=antstyle:com.foo.repository.Repository, antstyle:com.foo.Service.Main

profiler.spring.beans.2.annotation=

#profiler.spring.beans.1.scope=component-scan
#profiler.spring.beans.1.base-packages=
#profiler.spring.beans.1.name.pattern=
#profiler.spring.beans.1.class.pattern=
#profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository

profiler.spring.beans.1.scope=component-scan
profiler.spring.beans.1.base-packages=com.sample.cart
profiler.spring.beans.1.name.pattern=.*TestService, regex:.*TestService, antstyle:*TestController
profiler.spring.beans.1.class.pattern=
profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository

profiler.spring.beans.2.scope=post-processor
profiler.spring.beans.2.base-packages=
profiler.spring.beans.2.name.pattern=.*TestService, regex:.*TestService, antstyle:*TestController
profiler.spring.beans.2.class.pattern=
profiler.spring.beans.2.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository,com.sample.cart.controller.TestController,org.springframework.stereotype.Component

profiler.spring.beans.mark.error=true

@dinesh4747
Copy link
Author

@jaehong-kim - Looking for your inputs here please.

@dinesh4747
Copy link
Author

@jaehong-kim @emeroad @naver - please do help on your final look and so that move forward with other options, also tried all the options as suggested but none of them really helped in tracing the application specific method calls of spring webflux

your help and suggestions would be highly appreciated

@dinesh4747
Copy link
Author

can someone pls respond to this issue pls
... @jaehong-kim @emeroad

@dinesh4747
Copy link
Author

@emeroad @koo-taejin @Xylus @RoySRose @jaehong-kim - In context to this thread and associated below list of issues

a) #5949
b) #5782

Just wanted to understand and clarity on whether the current/latest version of Pinpoint (2RC2) supports flux and mono calls or not ?

@emeroad
Copy link
Member

emeroad commented Jan 21, 2020

@dinesh4747
Sorry, we don't quite understand your problem
Please create a reproduction case for problem analysis

@dinesh4747
Copy link
Author

dinesh4747 commented Jan 21, 2020

@emeroad - Thanks for your response, If you can look at the entire list of comments attached in this ticket, you will some background

To summarise - From the release notes it says that pinpoint-2RC2 supports spring webflux tracing but it didn't work as expected where unable to trace mono and flux calls

I have also attached my sample code for reproduction and @jaehong-kim had a look and suggested few options on the config, But that didn't help as well. Hence I wanted to understand whether its a bug or currently mono and flux trace is not supported in pinpoint.

Kindly let me know Incase of additional information and I can also share my code base again for reproducing the same.

@dinesh4747
Copy link
Author

@jaehong-kim @emeroad - can someone pls help this get into closure I have been trying really hard in all ways to get conclusion

pls do share some lights on this... I have even went on to share my code base as well, but none of them worked... pls help.me here

@stale
Copy link

stale bot commented Mar 9, 2020

This issue/proposal has been automatically marked as stale because it hasn't had any recent activity. It will automatically be closed if no further activity occurs for 20days. If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Pinpoint Community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants