-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Labels
apiPublic APIPublic APIenhancementEnhancement of an existing featureEnhancement of an existing feature
Description
In my case, I am using asynchronous notifications with callbacks that can be processed at a later time than the original event occurred. In my case, I am able to retrieve the event timestamp from the notification parameter passed into the callback. I would like to be able to specify my own timestamp at start of transaction or a span, as well at an end of transaction or a span.
My callback code example:
public class TraceMessageProcessorNotificationListener
implements MessageProcessorNotificationListener<MessageProcessorNotification> {
@Override
public void onNotification(MessageProcessorNotification notification) {
switch (notification.getAction()) {
case MessageProcessorNotification.MESSAGE_PROCESSOR_PRE_INVOKE:
spanUtils.startSpan(notification); // <-- Set start span time explicitly here
break;
case MessageProcessorNotification.MESSAGE_PROCESSOR_POST_INVOKE:
spanUtils.endSpan(notification); // <-- Set end span time explicitly here
break;
}
}
}Metadata
Metadata
Assignees
Labels
apiPublic APIPublic APIenhancementEnhancement of an existing featureEnhancement of an existing feature