Open PurpleTape opened 3 months ago
@PurpleTape thanks for reaching out. Are you bundling your app? If yes which bundler are you using?
I'd be very interested in a way to reproduce this. I think it's caused by the different named exports for Node.js and Browser we're using in that package and I'm currently working on eliminating those.
Hello, @pichlermarc!
I have prepared a repository with a reproduction of the error. Inside the repository, you can find steps to reproduce the error. I also want to mention that I use Vite to build a backend, not a frontend
@PurpleTape thank you for providing the reproducer - I think the repro app does try to bundle it up for the browser, though. The proto-metrics exporter only supports node.js at the moment, see https://github.com/open-telemetry/opentelemetry-js/issues/4098. So I think it's fair to expect that this would not work at the moment.
Is there some extra config that you're using to build your backend app with vite
? AFAIK there's usually some extra plugins involved in such a build, right?
@pichlermarc, yes, you're right! I used additional Vite plugins for backend development. Most likely, the current level of development of Vite tools is not enough for stable backend development and I need to choose other tools.
If you are interested, I have updated the repository, bringing it to the form in which backend development is carried out
@pichlermarc have you had a chance to look at this to determine the priority level, whether it is a bug? Just looking at how best to label it and triage it for now.
@pichlermarc have you had a chance to look at this to determine the priority level, whether it is a bug? Just looking at how best to label it and triage it for now.
@JamieDanielson it is a bug that has a few different layers to it. It's the good old ESM/CJS dual-export issue (#4743) + wrong export naming (differently named exports for nodejs and browser). Once we fix the naming (this will be done via the work I'm doing on #4116), then this issue here will become a duplicate of #3989.
As it causes compile and likely runtime issues, and there are currently no workarounds, I'll label this as P1.
What's the status of this issue? Still an issue for me. Thanks
@sebastien-comeau I moved a lot of the transport code, which was step 1. Now I need to do the same with the config (step 2, currently in progress). Once I'm done with that we can collapse all the exporter base code into all platform agnostic types (step 3).
I'm aiming for this to land in 0.55.0
.
@pichlermarc nice to hear. What's the ETA for version 0.55.0
?
@sebastien-comeau sometime in the first week of october.
What happened?
Actual Result
When I start the project, I get an import error:
Additional Details
OpenTelemetry Setup Code
No response
package.json
Relevant log output
No response