-
Notifications
You must be signed in to change notification settings - Fork 821
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
[otlp-exporter] web exporters should set User-Agent
header upon requests.
#3808
Comments
User-Agent
header upon requests.
User-Agent
header upon requests.User-Agent
header upon requests.
Also, if the |
I found some usages of modern javascript features (such as |
I've finished the |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
not stale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Originally posted by @JamieDanielson in #3790 (comment)
The current test based on headless Chrome will return above error due to Chrome's limitation.
Setting the
user-agent
header in Chrome browser byHeaders
object or usingfetch()
will have no effect but won't throw any error.Using
XMLHttpRequest.setRequestHeader()
will throw the above error.As other browsers (tested on latest Firefox and Safari) work as expected, I suggest we use a
try...catch
block and ignore the output and complete the implementation as per specification.Another thing is that the current implementation uses
sendBeacon
if available and if no custom header being set. As theuser-agent
header should be present as per spec. We should remove the use ofsendBeacon
.We can also rely solely on
fetch
and dropXMLHttpRequest
. Users should use a polyfill forfetch
if they want to support legacy browsers.Related: #3790 #3806 #3291
The text was updated successfully, but these errors were encountered: