open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.56k stars 742 forks source link

Bundle size too large for js-web #4817

Open vjsamuel opened 2 weeks ago

vjsamuel commented 2 weeks ago

We have been in the process of doing instrumentation for our frontend applications. As a first step, the team has done some boiler plate instrumentation for events/exceptions using the logs SDK. However we see that the bundle size is way too large for us to ship it out without impacting page speed. The size can be seen in the screenshot below: image

Is there any opportunity to some short/mid/long term iterations to make sure that we substantially bring this number down?

Thank you for the great work that is being done here :)

pichlermarc commented 1 week ago

Hi @vjsamuel thanks for reaching out. We're aware of the issue but we have not formulated a plan yet. I think now is a good time to formulate that plan so that people can get working on it.

I have some ideas around the topic that (I think) we can implement to reduce the size of these bundles:

Questions about your specific situation:

Please let me know what you think of the proposed steps, I'll then create the issues for the tasks and will bring it up in the SIG meeting so that we can have a broader discussion on it before starting to work on it. :slightly_smiling_face: