Frontend tracing - NEW!
Frontend instrumentation is in its early stages. If you encounter any issues contact support.
Configuration is required.
Sprkl frontend instrumentation provides function-level instrumentation to every code change. The frontend trace will show you every click and HTTP request made, connecting it to the related source code, and propagating the context to your backend.
Sprkl and OpenTelemetry instrumentation can be enabled on the frontend by doing the following:
Instrument your web server code with the Sprkl CLI in any environment.
Transpiler plugin - either Webpack or Rollup.
Configuration
Webpack
Install the Webpack loader:
Configure Webpack
Webpack configuration is also available for:
Rollup
Install the Rollup plugin:
Configure Rollup
Rollup configuration is also available for:
Transpiler configuration Options
These options are used both for the Webpack loader and the Rollup plugin.
Other
For any other tooling or servers (like Remix), we provide Web server instrumentation, although this method is less preferred and is unstable.
This instrumentation tries to transform the javascript/ HTML files that are being served from that server. Since there are many implementations of frontend web servers, the code-level Sprkl instrumentation may not work, but OpenTelemetry instrumentation should work in any case.
Note that enabling the web server instrumentation with the webpack loader or rollup plugin can cause issues due to collision, so to be on the safe side prefer the Webpack loader or Rollup plugin.
Enable Sprkl web server instrumentation with the flag:
Or add in the configuration file at ~/.sprkl/cli.json
:
Last updated