Gate static telemetry bootstrap and remove invalid OpenTelemetry dependency#37
Conversation
Co-authored-by: phuquoc81 <51638662+phuquoc81@users.noreply.github.com>
Co-authored-by: phuquoc81 <51638662+phuquoc81@users.noreply.github.com>
Restore main workflow badge and repair the `main.yml` Actions workflow
Co-authored-by: phuquoc81 <51638662+phuquoc81@users.noreply.github.com>
Co-authored-by: phuquoc81 <51638662+phuquoc81@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR makes browser telemetry safe for static Fastcash launches by gating OpenTelemetry initialization behind explicit opt-in and by removing an invalid dependency that could break installs.
Changes:
- Make telemetry opt-in on static launches via
?telemetry=1orlocalStorage.fastcash.telemetry=enabled. - Update
otel-init.jsto skip initialization when prerequisites aren’t met and to load OTel packages dynamically. - Remove the invalid
@opentelemetry/sdk-webdependency and replace the corrupted workflow file with a real CI workflow.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removes invalid OTel dependency; confirms ESM module setup. |
| otel-init.js | Adds conditional telemetry bootstrap and dynamic imports. |
| index.html | Gates telemetry loading behind opt-in flags. |
| README.md | Adds GitHub Actions badge; minor formatting cleanup. |
| .github/workflows/main.yml | Replaces invalid content with a Node-based validation workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: phuquoc81 <51638662+phuquoc81@users.noreply.github.com>
Applied in 7cf2810. I updated the telemetry follow-up so import-map browser support is checked separately from import-map configuration, and the default enablement message now mentions the import-map requirement for static launches. Screenshot: https://github.com/user-attachments/assets/e7fb17e6-9374-46bf-bed3-fe85300b025a |
There was a problem hiding this comment.
Pull request overview
This PR makes static (no-bundler) Fastcash launches stop attempting to initialize OpenTelemetry by default, and fixes dependency installation by removing a non-existent OpenTelemetry package.
Changes:
- Gate telemetry bootstrap behind an explicit opt-in (
?telemetry=1orlocalStorageflag) inindex.html. - Make
otel-init.jsfail closed for unsupported static contexts (no import-map support / no configured import map / missing Kubiks key) and use dynamic imports. - Remove invalid
@opentelemetry/sdk-webdependency frompackage.json.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package.json | Removes invalid OpenTelemetry dependency that breaks installs. |
| otel-init.js | Adds static-environment guards + dynamic imports; requires Kubiks key before init. |
| index.html | Makes telemetry opt-in and adjusts logging around initialization. |
| .github/workflows/main.yml | Minor workflow cleanup/rename; keeps JS syntax validation + build step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Static Fastcash launches were attempting to initialize browser telemetry in an environment that cannot resolve bare npm imports, producing runtime console errors. The telemetry dependency set also included an invalid package, causing
npm installto fail.Telemetry bootstrap
?telemetry=1orlocalStorage.setItem("fastcash.telemetry", "enabled")Static-environment handling
fastcash.kubiksKeyis not configuredDependency cleanup
@opentelemetry/sdk-webfrompackage.jsonsince the package does not exist and breaks dependency installationResulting behavior
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.