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

@opentelemetry/auto-instrumentations-web not ES5 compatible #1186

Closed
mdbudnick opened this issue Sep 19, 2022 · 4 comments
Closed

@opentelemetry/auto-instrumentations-web not ES5 compatible #1186

mdbudnick opened this issue Sep 19, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@mdbudnick
Copy link

mdbudnick commented Sep 19, 2022

What version of OpenTelemetry are you using?

0.30.0

What version of Node are you using?

14.20.0

What did you do?

I've installed "@opentelemetry/auto-instrumentations-web": "^0.30.0",
and in my project use import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web' with an OTLPExporter.

It works fine except for IE 10 and 11 because the module code in my client js is not ES5-compatible:

function(e, t, r) {
            "use strict";
            Object.defineProperty(r, "__esModule", {
                value: !0
            }), r.getWebAutoInstrumentations = void 0;
            const n = e("@opentelemetry/api"),
                o = e("@opentelemetry/instrumentation-document-load"),
                s = e("@opentelemetry/instrumentation-fetch"),
                i = e("@opentelemetry/instrumentation-user-interaction"),
                a = e("@opentelemetry/instrumentation-xml-http-request"),
                l = {
                    "@opentelemetry/instrumentation-document-load": o.DocumentLoadInstrumentation,
                    "@opentelemetry/instrumentation-fetch": s.FetchInstrumentation,
                    "@opentelemetry/instrumentation-user-interaction": i.UserInteractionInstrumentation,
                    "@opentelemetry/instrumentation-xml-http-request": a.XMLHttpRequestInstrumentation
                };
            r.getWebAutoInstrumentations = function(e = {})
}

i.e. default values are not allowed for arguments: function(e = {})

What did you expect to see?

ES5 compliant code that works in IE10 and 11. From what I have found in this project, ES5 compliance can (should?) be expected.

What did you see instead?

An error in my run.js: Expected ')' after the e in function(e = {}) because default argument values were introduced in ES6

Additional context

It is possible I am not doing something obvious, I am a backend engineer setting up OTel tracing in our company.

@mdbudnick mdbudnick added the bug Something isn't working label Sep 19, 2022
@mdbudnick
Copy link
Author

Also this open-telemetry/opentelemetry-js#1368

@mdbudnick
Copy link
Author

Created #1187

@dyladan dyladan added enhancement New feature or request and removed bug Something isn't working labels Sep 21, 2022
@dyladan
Copy link
Member

dyladan commented Sep 21, 2022

This is not a bug since the packages in question aren't supporting es5

@mdbudnick
Copy link
Author

Ok, closing this ticket. I have been working with the team on excluding it from IE clients. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants