tom-pytel edited a comment on pull request #20:
URL: https://github.com/apache/skywalking-nodejs/pull/20#issuecomment-752950308
> > how bad is the time difference?
>
> By "don't match", I meant for example, the `endTime` of the client side
span is earlier than the `endTime` of the server side, which makes no sense at
all.
>
> > [EDIT] And how important is it that the times match?
>
> This effects nearly all time-related metrics, slow services, latency,
response time percentiles, etc.
Just to double check that we are not excluding something unnecessarily I
have been looking inside `on-finished`, was hoping to clear it but
unfortunately I did actually find something which might be problematic with
separate instances :( if you are curious it is the following at line 160:
```js
function createListener(msg) {
function listener(err) {
if (msg.__onFinished === listener) msg.__onFinished = null
```
`listener` would be different for different instances of `on-finished`
module and so not sure what would happen but they might wind up overwriting
each other's queues of listeners.
And I see how the time difference problem is caused in the reverted
HttpPlugin, just need to bind `stopIfNotStopped()` to the actual end of the
response processing without using `on-finished` (and verify change in order of
span stop is ok).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]