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: zipkin in web #1265 #1393

Closed
wants to merge 1 commit into from

Conversation

Booster2ooo
Copy link

Which problem is this PR solving?

Zipkin in web #1265,

Short description of the changes

Refactored for browser compatibility in addition to nodejs

  • Moved current zipkin exporter implementation in /src/platform/node
  • Created a new zipkin exporter using fetch instead of node http/https apis
  • Add package.json browser field

/!\ Lacks testing

refactored for browser compatibility in addition to existing nodejs

closes issue open-telemetry#1265
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 5, 2020

CLA Check
The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #1393 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1393   +/-   ##
=======================================
  Coverage   94.03%   94.03%           
=======================================
  Files         149      149           
  Lines        4322     4322           
  Branches      880      880           
=======================================
  Hits         4064     4064           
  Misses        258      258           
Impacted Files Coverage Δ
...emetry-exporter-zipkin/src/platform/node/zipkin.ts 98.46% <100.00%> (ø)
...ges/opentelemetry-exporter-zipkin/src/transform.ts 100.00% <100.00%> (ø)

@@ -4,7 +4,10 @@
"description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"repository": "open-telemetry/opentelemetry-js", "browser": {
Copy link
Member

Choose a reason for hiding this comment

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

browser on its own line please.

Why is this a different platform configuration style than our other packages?

Copy link
Author

Choose a reason for hiding this comment

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

Agreed for the new line.

I don't understand the issue with the "different style than the other packages", could you elaborate please ? I took @opentelemetry/exporter-collector as an exemple.

@@ -0,0 +1 @@
export * from './zipkin';
Copy link
Member

Choose a reason for hiding this comment

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

missing header

please add a newline at the end of the file

/**
* Zipkin Exporter
*/
export class ZipkinExporter implements SpanExporter {
Copy link
Member

Choose a reason for hiding this comment

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

This is almost the same as the node version, but is completely copied. Is there no way to use a base class to share functionality?

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.

You should refactor zipkin in a way that only sendmethod should be extracted and defined in platform. For web you should use XMLHttpRequest not fetch but default method should be sendBeacon with a fallback to XMLHttpRequest if user defines any headers. You can check the ExporterCollector how it is done and I think it should have similar styling / approach here, thx

@obecny
Copy link
Member

obecny commented Aug 6, 2020

Have you checked that the issue you are trying to resolve has been assigned ?

@Booster2ooo
Copy link
Author

Booster2ooo commented Aug 6, 2020

Have you checked that the issue you are trying to resolve has been assigned ?

Yes, I did see it was assigned to you @obecny but I thought I could help. I hope this doesn't go against the contributing guidelines. I must admit I'm not very familiar with collaboration so I'm sorry if I crossed any line.

@obecny
Copy link
Member

obecny commented Aug 6, 2020

Have you checked that the issue you are trying to resolve has been assigned ?

Yes, I did see it was assigned to you @obecny but I thought I could help. I hope this doesn't go against the contributing guidelines. I must admit I'm not very familiar with collaboration so I'm sorry if I crossed any line.

I was working on this already and almost finished

@Booster2ooo
Copy link
Author

Have you checked that the issue you are trying to resolve has been assigned ?

Yes, I did see it was assigned to you @obecny but I thought I could help. I hope this doesn't go against the contributing guidelines. I must admit I'm not very familiar with collaboration so I'm sorry if I crossed any line.

I was working on this already and almost finished

Sorry I overstepped (even if I'm happy I did because I'm learning doing so :)), I guess your PR will probably be way more qualitative. I'll probably try to implement the improvements you and dyladan raised, just for my own sake, but this PR can bit ignored/closed I assume.

@obecny
Copy link
Member

obecny commented Aug 7, 2020

Have you checked that the issue you are trying to resolve has been assigned ?

Yes, I did see it was assigned to you @obecny but I thought I could help. I hope this doesn't go against the contributing guidelines. I must admit I'm not very familiar with collaboration so I'm sorry if I crossed any line.

I was working on this already and almost finished

Sorry I overstepped (even if I'm happy I did because I'm learning doing so :)), I guess your PR will probably be way more qualitative. I'll probably try to implement the improvements you and dyladan raised, just for my own sake, but this PR can bit ignored/closed I assume.

No worries :), we are always happy to welcome people who wants to contribute. There are many opened issues which are not assigned to anyone, maybe you could have a look at them and see if anything sounds interesting for you (don't feel being pushed) and if so you can comment on that issue so we can assign it to you to avoid duplication of work.
With regards to zipkin itself I have already published my PR with changes.
thx

@Booster2ooo Booster2ooo closed this Aug 7, 2020
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.

3 participants