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

Class extends value undefined is not a constructor or null #1524

Closed
nagarajatantry opened this issue Sep 12, 2020 · 7 comments
Closed

Class extends value undefined is not a constructor or null #1524

nagarajatantry opened this issue Sep 12, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@nagarajatantry
Copy link
Contributor

Please answer these questions before submitting a bug report.

What version of OpenTelemetry are you using?

v0.11.0

Please provide the code you used to setup the OpenTelemetry SDK

I am using tracer-web example.

What did you do?

I am trying to play around with exporters. I tried out the opentelemetry-exporter-collector and it works as expected. i.e. i start seeing traces in backend collector. Then I tried the same with opentelemetry-exporter-collector-proto

What did you expect to see?

I expected the traces to be exported to my backend in protobuf format.

What did you see instead?

I see an error in console

CollectorExporterNodeBase.js?a322:23 Uncaught TypeError: Class extends value undefined is not a constructor or null
    at Object.eval (CollectorExporterNodeBase.js?a322:23)
    at eval (CollectorExporterNodeBase.js:56)
    at Object../node_modules/@opentelemetry/exporter-collector-proto/build/src/CollectorExporterNodeBase.js (document-load.js:1938)
    at __webpack_require__ (document-load.js:790)
    at fn (document-load.js:101)
    at eval (CollectorTraceExporter.js?d14e:19)
    at Object../node_modules/@opentelemetry/exporter-collector-proto/build/src/CollectorTraceExporter.js (document-load.js:1962)
    at __webpack_require__ (document-load.js:790)
    at fn (document-load.js:101)
    at eval (index.js?22ba:28)

Additional context

Add any other context about the problem here.

@nagarajatantry nagarajatantry added the bug Something isn't working label Sep 12, 2020
@vmarchaud
Copy link
Member

/cc @obecny

@obecny
Copy link
Member

obecny commented Sep 12, 2020

tracer-web - proto and grpc is not supported in web so only opentelemetry-exporter-collector can be used in web, the proto and grpc is for node only

@nagarajatantry
Copy link
Contributor Author

thank you @obecny
Is it something open for contribution?

Also I tried the proto in basic-tracer-node example I am getting the below error

> [email protected] start /Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node
> node ./index.js

/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/protobufjs/src/root.js:104
            throw err;
            ^

Error: ENOENT: no such file or directory, open '/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/@opentelemetry/exporter-collector-proto/build/protos/opentelemetry/proto/common/v1/common.proto'
    at Object.openSync (fs.js:465:3)
    at Object.readFileSync (fs.js:368:35)
    at fetch (/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/protobufjs/src/root.js:172:34)
    at Root.load (/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/protobufjs/src/root.js:206:13)
    at Root.loadSync (/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/protobufjs/src/root.js:247:17)
    at onInit (/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/@opentelemetry/exporter-collector-proto/build/src/util.js:35:28)
    at Immediate.<anonymous> (/Users/ntantry/dev/github.com/opentelemetry-js/examples/basic-tracer-node/node_modules/@opentelemetry/exporter-collector-proto/build/src/CollectorExporterNodeBase.js:31:13)
    at processImmediate (internal/timers.js:461:21) {

@obecny
Copy link
Member

obecny commented Sep 16, 2020

fix is here #1539

@obecny
Copy link
Member

obecny commented Sep 16, 2020

Is it something open for contribution?

Contributions are always welcome. It would be a separate package though, are you thinking about proto over xmlhttprequest or grpc as well ? It would require extra packages to be included which might be heavy for web. If you think this is something that can be useful please create a new issue and describe it. This way other people can comment it, thx

@nagarajatantry
Copy link
Contributor Author

Sorry for the delay in response. Yes I am thinking about using proto over http1.1 as well as in future with grpc.
Will create a new issue and we can track it there.
Thank you

@DanielGorlo
Copy link

Might be joining the party late here but I was wondering if anyone got protobuf exporter to run from client side.

pichlermarc added a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this issue Dec 15, 2023
… DynamoDB attributes (open-telemetry#1524)

* feat(opentelemetry-instrumentation-aws-sdk): add missing spec-defined DynamoDB attributes

* feat(opentelemetry-instrumentation-aws-sdk): add checks for input attributes and additional unit tests

* feat(opentelemetry-instrumentation-aws-sdk): run lint on dynamoDB unit tests

---------

Co-authored-by: Haddas Bronfman <[email protected]>
Co-authored-by: Marc Pichler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants