finos / symphony-bdk-java

The Symphony BDK (Bot Developer Kit) for Java helps you to create production-grade Chat Bots and Extension Applications on top of the Symphony REST APIs.
https://symphony-bdk-java.finos.org
Apache License 2.0
23 stars 69 forks source link

Initialise DistributedTracingContext in AbstractActivity #482

Closed yinan-symphony closed 3 years ago

yinan-symphony commented 3 years ago

Feature Request

DistributedTracingContext is initialised for the rest api request today, i would like to have the same traceability for the activities.

Description of Problem:

When BOT receives a message from DF, i'd like to the traceability as we do in the rest api.

Potential Solutions:

Initialise the DistributedTracingContext at the start point of the #processEvent.

... if you've considered alternatives, clearly and concisely describe those too.

symphony-youri commented 3 years ago

That makes sense, some points we can discuss:

yinan-symphony commented 3 years ago

@symphony-youri yes, event better if we do it for all events, not only activities. well, a random value would be fine IMO (so no security concern then), just as what we have for rest requests. The idea is to ease the search by using this random value in the log file.

symphony-youri commented 3 years ago

Note for implementation: also check on the Agent side that if we have a trace id (or generate one) that we can correlate what happens on the agent side / bot side.

thibauult commented 3 years ago

+ trace (debug mode) DF events when dispatched to listeners. Also we might consider handling exceptions (see here) raised by the listener.

thibauult commented 3 years ago

Hi @yinan-symphony,

Pull request now opened https://github.com/finos/symphony-bdk-java/pull/489