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

Automatic tracing of express #666

Open
vmarchaud opened this issue Jan 5, 2020 · 7 comments
Open

Automatic tracing of express #666

vmarchaud opened this issue Jan 5, 2020 · 7 comments
Assignees
Projects
Milestone

Comments

@vmarchaud
Copy link
Member

@vmarchaud vmarchaud commented Jan 5, 2020

Is it applicable for Node or Browser or both
Node only

Do you expect this plugin to be commonly used
Weekly Downloads: 6M (https://www.npmjs.com/package/express)

What version of plugin are you interested in using
Versions: 4

Additional context

Implementation of datadog: https://github.com/DataDog/dd-trace-js/tree/master/packages/datadog-plugin-express

@vmarchaud vmarchaud added this to the Alpha v0.4 milestone Jan 5, 2020
@vmarchaud vmarchaud self-assigned this Jan 5, 2020
@vmarchaud vmarchaud added this to To do in Plugins via automation Jan 5, 2020
@dyladan

This comment has been minimized.

Copy link
Contributor

@dyladan dyladan commented Jan 5, 2020

What do you think would be gained beyond the http information already available? Are we better off auto-instrumenting it or just exporting a middleware that uses the API?

@OlivierAlbertini

This comment has been minimized.

Copy link
Member

@OlivierAlbertini OlivierAlbertini commented Jan 5, 2020

What do you think would be gained beyond the http information already available?

You can get the route attribute.

I have already done an express plugin internally for OpenTelemetry and I don't see a real advantage to have it in this repo (I'm not against to have it too)... I did it because some packages like body-parser seems to clear the scope... So I bind the middleware after body-parser to recreate it if this happens. You can also create an error middleware where you can add the detailed error to the span...

I think the express plugin is more useful for customizing the span.

@dyladan

This comment has been minimized.

Copy link
Contributor

@dyladan dyladan commented Jan 6, 2020

dropping scope is a big deal so that sounds like a good win for us. can you work with @vmarchaud since you already made an internal version?

@vmarchaud

This comment has been minimized.

Copy link
Member Author

@vmarchaud vmarchaud commented Jan 6, 2020

@OlivierAlbertini I didn't had the issue with my OC plugin, that's weird.

@dyladan That was a common request back when i worked at @keymetrics to allow customers to aggregate by the route (since it's common to have an id in urls). Also useful to pinpoint if you have a sync middleware (like auth with jwt) taking a lot of time.

dropping scope is a big deal so that sounds like a good win for us

I'm not sure to understand since it was dropping the scope it should fail to create child spans afterward, i don't see why it's a good win ^^

@dyladan

This comment has been minimized.

Copy link
Contributor

@dyladan dyladan commented Jan 6, 2020

@vmarchaud let me rephrase. If the scope is being dropped, and creating a plugin can prevent it from being dropped, then that sounds like a good win.

@vmarchaud

This comment has been minimized.

Copy link
Member Author

@vmarchaud vmarchaud commented Jan 6, 2020

@dyladan Got it, indeed its important in that case.

@OlivierAlbertini

This comment has been minimized.

Copy link
Member

@OlivierAlbertini OlivierAlbertini commented Jan 6, 2020

@OlivierAlbertini I didn't had the issue with my OC plugin, that's weird.

Currently we have Opencensus and OpenTelemetry in our environnement and we have the issue with OpenCensus "0.0.19" for sure and OpenTelemetry "0.1.1".

It doesn't happens every time (it's really hard to reproduce) and I don't know how the body parser works but having a middleware after have fixed the issue. I flagged those spans differently in order to see if there is a pattern...

@dyladan, yes I can work with @vmarchaud. I can make a draft PR and request a review (@vmarchaud ) but you can create a PR too since you made the issue and I can review it... As you want @vmarchaud, you decide ^^

vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Jan 11, 2020
vmarchaud added a commit to vmarchaud/opentelemetry-js that referenced this issue Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Plugins
  
To do
3 participants
You can’t perform that action at this time.