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(koa): Skip update HTTP's span name and update RpcMetadata's route instead #1567

Merged
merged 12 commits into from
Aug 13, 2023

Conversation

chigia001
Copy link
Contributor

@chigia001 chigia001 commented Jul 12, 2023

Which problem is this PR solving?

Each framework has a different approach to updating Span's name and HTTP_ROUTE attribute. We want to delegate this to instrumentation-http for consistent's name and attribute
This PR fixes the above issue for koa when integrate with @koa/router as koa are not support routing natively.

Short description of the changes

  • Skip modifying HTTP's Span name directly in instrumentation-koa code
  • Update route property of RpcMetadata

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1567 (ef8a835) into main (eeda32a) will decrease coverage by 4.29%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1567      +/-   ##
==========================================
- Coverage   96.06%   91.77%   -4.29%     
==========================================
  Files          14      139     +125     
  Lines         914     7110    +6196     
  Branches      199     1426    +1227     
==========================================
+ Hits          878     6525    +5647     
- Misses         36      585     +549     
Files Changed Coverage Δ
...lemetry-instrumentation-koa/src/instrumentation.ts 97.53% <100.00%> (ø)

... and 124 files with indirect coverage changes

@chigia001 chigia001 changed the title feat(koa): Skip update HTTP's span name and update RpcMetadata's route instead feat(instrumentation-koa): Skip update HTTP's span name and update RpcMetadata's route instead Jul 13, 2023
@chigia001 chigia001 changed the title feat(instrumentation-koa): Skip update HTTP's span name and update RpcMetadata's route instead feat(koa): Skip update HTTP's span name and update RpcMetadata's route instead Jul 14, 2023
@chigia001
Copy link
Contributor Author

can we merge this or add pkg:instrumentation-koa label so we can test tav for this?

@blumamir
Copy link
Member

This one is ready to merge, but the build seems to have an issue

lerna ERR! lifecycle "prepare" errored in "@opentelemetry/instrumentation-koa", exiting 1

Can you please take a look?

@chigia001
Copy link
Contributor Author

My bad, forgot to remove unused import.

@blumamir blumamir merged commit 825b5a8 into open-telemetry:main Aug 13, 2023
14 of 15 checks passed
@dyladan dyladan mentioned this pull request Aug 13, 2023
@chigia001 chigia001 deleted the fix-1381-koa branch August 13, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants