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

fix(opentelemetry-plugin-xml-http-request): define span kind as CLIENT for xmlhttprequests #1002

Merged
merged 6 commits into from
May 1, 2020

Conversation

ivansenic
Copy link
Contributor

Which problem is this PR solving?

The xml-http-request plugin does not correctly set the span kind to CLIENT when creating the span on the open method. This makes all spans that represent XHR requests having the default span kind of INTERNAL.

Per spec INTERNAL -> Default value. Indicates that the span is used internally., which in this case is not true and should be CLIENT -> Indicates that the span covers the client-side wrapper around an RPC or other remote request..

Short description of the changes

One-liner to set the span kind to CLIENT.

@vmarchaud
Copy link
Member

@ivansenic Thanks for taking the time to make that PR ! You'll just need to sign the CLA (see: https://identity.linuxfoundation.org/projects/cncf)

@ivansenic
Copy link
Contributor Author

ivansenic commented Apr 30, 2020

@vmarchaud No problem. I signed the CLA. However, the check is still red, I guess I need to re-submit to trigger the check again? Should I force rebase in order to get the new commit id and force push?

@dyladan
Copy link
Member

dyladan commented Apr 30, 2020

@obecny please take a look at this one. If you're ok I'll merge it.

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mayurkale22
Copy link
Member

Thanks for the PR @ivansenic and welcome to Opentelemetry community!

@codecov-io
Copy link

codecov-io commented Apr 30, 2020

Codecov Report

Merging #1002 into master will decrease coverage by 12.61%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #1002       +/-   ##
===========================================
- Coverage   95.00%   82.38%   -12.62%     
===========================================
  Files         212       80      -132     
  Lines        8806     2101     -6705     
  Branches      796      296      -500     
===========================================
- Hits         8366     1731     -6635     
+ Misses        440      370       -70     
Impacted Files Coverage Δ
...s/opentelemetry-plugin-xml-http-request/src/xhr.ts 79.12% <ø> (ø)
packages/opentelemetry-core/test/utils/url.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...ckages/opentelemetry-core/test/platform/id.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...s/opentelemetry-core/src/platform/node/sdk-info.ts 0.00% <0.00%> (-100.00%) ⬇️
...pentelemetry-core/src/platform/node/performance.ts 0.00% <0.00%> (-100.00%) ⬇️
...pentelemetry-core/test/internal/validators.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...ntelemetry-core/test/trace/NoRecordingSpan.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...telemetry-core/test/platform/hex-to-base64.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...elemetry-core/test/trace/spancontext-utils.test.ts 0.00% <0.00%> (-100.00%) ⬇️
...lemetry-core/test/trace/ProbabilitySampler.test.ts 0.00% <0.00%> (-100.00%) ⬇️
... and 134 more

@mayurkale22
Copy link
Member

@ivansenic please fix the lint (npm run lint:fix).

@ivansenic
Copy link
Contributor Author

@ivansenic please fix the lint (npm run lint:fix).

@mayurkale22 Sorry for that, my bad.. Fixed and pushed.

@mayurkale22 mayurkale22 merged commit 6cf5406 into open-telemetry:master May 1, 2020
@ivansenic ivansenic deleted the ise-fix-xhr-spankind branch May 1, 2020 19:41
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants