Skip to content

[Bug]  #11583

@liu-zhizhu

Description

@liu-zhizhu

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

NodeJS Server Side Agent (apache/skywalking-nodejs)

What happened

when sending http request in my nodejs project,I need to set http request header Connection: close,the trace log will be sent to skyworking.

I think the problem is in function HttpPlugin.prototype.interceptClientRequest:

  1. wrapEmit(span, req, true, 'close'): when http request header Connection: keep-alive, the "close" event will not be emitted
  2. wrapEmit(span, res, false): this line change to wrapEmit(span, res, false, 'end') , the trace log will be sent to skyworking too

What you expected to happen

I don't want to set http request header Connection: close, and the trace log will be sent to skyworking

How to reproduce

  1. Setting http request header Connection: keep-alive, the trace log will not be sent to skyworking

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working and you are sure it's a bug!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions