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

Update OTLPExporterBrowserBase.ts #3546

Closed

Conversation

kohlikohl
Copy link

Which problem is this PR solving?

When using @opentelemetry/otlp-exporter-base on a worker I get an error messages that window is not defined in OTLPExporterBrowserBase.ts. This is because a worker does not have a window object.
Fixes #3545

Short description of the changes

Replace window with globalThis.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Use/Used the @opentelemetry/otlp-exporter-base package on a worker.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@kohlikohl kohlikohl requested a review from a team January 17, 2023 21:22
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 17, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kohlikohl / name: Matthias Knoll (288e8f1)

@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Merging #3546 (790e5e5) into main (5127371) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 790e5e5 differs from pull request most recent head 288e8f1. Consider uploading reports for the commit 288e8f1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3546      +/-   ##
==========================================
- Coverage   93.80%   93.79%   -0.02%     
==========================================
  Files         249      249              
  Lines        7640     7640              
  Branches     1589     1589              
==========================================
- Hits         7167     7166       -1     
- Misses        473      474       +1     
Impacted Files Coverage Δ
...-trace-base/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️

@pichlermarc
Copy link
Member

Hi @kohlikohl, thank you for you contribution 🙂
I just saw #3542 which was opened earlier that seems to address a similar problem, but goes a bit further in fixing it. Would you mind heading over to that PR to see if that fixes your issue? 🙂

@kohlikohl
Copy link
Author

@pichlermarc - ahh, #3542 looks great and works for me too. I'll close my PR and issue.
Liebe Grüsse nach Wien! :)

@kohlikohl kohlikohl closed this Jan 18, 2023
@pichlermarc
Copy link
Member

Thank you, I linked your issue to the other PR. 🙂
Liebe Grüße zurück nach Seattle! :)

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.

OTLPExporterBrowserBase not worker compatible
2 participants