Skip to content
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

feat: run telemetry collection as a background process #147

Merged

Conversation

francinelucca
Copy link
Contributor

Closes #143

Changelog

New

  • Spawn detached child process in index.js to perform collection

Changed

  • Moved index.js collection logic onto collect.js file
  • Modified esbuild configuration to include two files: index.js (spawn process) and collect.js (collection)

Testing / reviewing

Try running collection from a "instrumented package" (for example, @carbon/react inside carbon-website) and confirm the process exists immediately and the temp log file is generated with correct metrics in the temp folder of machine.
CI='true' node [path-to-telemetry]/dist/index.js --config=telemetry.yml (remember to npm run build & npm run bundle the local telemetry package first)

@francinelucca
Copy link
Contributor Author

@jdharvey-ibm I had to modify the build settings to output a dist folder instead of a single dist/out.js file since I need to build both index.js and collect.js, happy to talk through if there's a better way to do this.

@jdharvey-ibm
Copy link
Member

We are okay with there being no new test coverage in this PR. The code is not worth the effort it would take to test it.

Copy link

sonarcloud bot commented Dec 15, 2023

Quality Gate Failed Quality Gate failed

Failed conditions

0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@jdharvey-ibm jdharvey-ibm merged commit 273a466 into main Dec 15, 2023
5 of 6 checks passed
@jdharvey-ibm jdharvey-ibm deleted the 143-run-telemetry-collection-as-a-background-process branch December 15, 2023 19:35
@telemmy telemmy bot mentioned this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run telemetry collection as a background process
2 participants