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

feat: reduce root span cardinality in express plugin #176

Merged
merged 7 commits into from
Oct 30, 2020

Conversation

gecgooden
Copy link
Contributor

@gecgooden gecgooden commented Aug 19, 2020

Which problem is this PR solving?

Fixes (partiall) open-telemetry/opentelemetry-js#897 for the express plugin. Span names should be low cardinality, and indicate that a span belongs to a class of spans.
Spans generated by incoming requests in the http plugin create spans with names such as GET /users/123, where 123 is a user identifier.
This has a high cardinality but the http plugin doesn't have the context to set a low cardinality name such as GET /users/:id.

Short description of the changes

When patching the request handler in express, we call updateName on the root span with the method of the request (eg GET), and the parameterized route (eg /users/:id) to rename it.

Signed-off-by: George Gooden <george@gecgooden.com>
@gecgooden gecgooden requested a review from a team August 19, 2020 14:20
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 19, 2020

CLA Check
The committers are authorized under a signed CLA.

@gecgooden
Copy link
Contributor Author

The failures are related to an missing dependency in the user interaction plugin (angular/angular#38526). Should I fix this by pinning the version of the dependency in this PR or should it be addressed another specific fix PR?

@vmarchaud
Copy link
Member

The failures are related to an missing dependency in the user interaction plugin (angular/angular#38526). Should I fix this by pinning the version of the dependency in this PR or should it be addressed another specific fix PR?

Not sure but i believe #175 solves the issue

@dyladan
Copy link
Member

dyladan commented Aug 21, 2020

I'm unlinking the linked issue since it only solves it for a single package.

@obecny obecny added the enhancement New feature or request label Sep 7, 2020
@dyladan
Copy link
Member

dyladan commented Sep 9, 2020

It looks like the build fails because our plan with circleci no longer supports the machine type we were using. Were we downgraded to a free plan? Perhaps we should consider moving tests fully to github actions as other sigs have done?

@dyladan
Copy link
Member

dyladan commented Oct 28, 2020

@gecgooden the tests are failing because they are running in your personal CircleCI account. You need to update your account in circleci to follow this repo.

@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #176 into master will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   95.06%   95.06%           
=======================================
  Files         110      110           
  Lines        5877     5881    +4     
  Branches      605      607    +2     
=======================================
+ Hits         5587     5591    +4     
  Misses        290      290           
Impacted Files Coverage Δ
node/opentelemetry-plugin-express/src/express.ts 97.14% <0.00%> (+0.11%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants