-
Notifications
You must be signed in to change notification settings - Fork 98
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
Running cloud trace with webpack #774
Comments
We currently do not support webpack, since we assume that required modules reside in |
Thanks for the reply. What I have been using webpack was primarily for hot module reloading. But I think I found a workaround for my immediate issue, which is to initialize tracing in a separate file, like trace.js, require the index and have webpack load trace.js first: trace.js:
webpack.*.conf.js
|
We've done some tests and found that we cannot not support webpack or bundlers at all at this point. |
It seems trace agent really doesn't support webpack, but it supports typescript compiler. I have tested it. Here is the repo: So, if I use |
Ultimately what is preventing us from working with transpiled code is whether |
@kjin Thanks for explaining. I have to choose TypeScript compiler instead of choosing webpack. And I want to know do you have any plans for supporting webpack? Or, it's an impossible feature? |
I would not expect TypeScript and webpack are not mutually exclusive, as they have fairly different purposes. That being said, unfortunately, we have no plans to support webpack, apologies for that! |
Any updates on this? Is webpack support on your roadmap? |
When I try to start my nodejs service with trace, I see the following error:
ERROR:@google-cloud/trace-agent: TraceAgent#start: Tracing might not work as the following modules were loaded before the trace agent was initialized: [...]
and it lists every package dependency in my package.json.
I placed the declaration at the top of index.js:
require('@google-cloud/trace-agent').start({projectId: 'projectId'})
Which is where my webpack config js points to:
Do you know if I am doing something wrong?
The text was updated successfully, but these errors were encountered: