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

Introducing a delay on sample collection for the cli triggered doctor runs #416

Open
fikret-buyukisik-bam opened this issue Nov 30, 2021 · 1 comment
Labels
doctor enhancement New feature or request good first issue Good for newcomers

Comments

@fikret-buyukisik-bam
Copy link

fikret-buyukisik-bam commented Nov 30, 2021

Introduction

We can set a delay to start of sampling when we use node-clinic-doctor as a library. But there is no way to set that delay when it is called from clinic cli.

Why it is important?

The operations happening at the application start are creating noise in the collected data.
If we could set a delay to sampling, we can easily bypass that and start sampling from relatively stable state of the application.

Expected Behavior

When we pass "NODE_CLINIC_DOCTOR_TIMEOUT_DELAY" env variable, sampling should start with a delay relative to application start.

Current Behavior

when "clinic doctor" is triggered from cli "NODE_CLINIC_DOCTOR_TIMEOUT_DELAY" environmental variable is always set to 0

Notes

The value coming from environmental variable is being overridden by "collectDelay" parameter coming from constructor at the line:
https://github.com/clinicjs/node-clinic-doctor/blob/main/index.js:75
And clinic library is not setting the "collectDelay" parameter, therefore it is getting the default value of 0.

Environment

  • Clinic.js v10.0.0 Doctor v9.0.0
  • Node.js v14.17.3 npm 7.24.1
  • Brave 1.31.88
  • OSX 11.5.2
@RafaelGSS RafaelGSS added enhancement New feature or request good first issue Good for newcomers labels Nov 30, 2021
@himanshu007-creator
Copy link

Hi I would love to work on this issue. Five me some time and I will find a solution

@RafaelGSS RafaelGSS transferred this issue from clinicjs/node-clinic-doctor Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doctor enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants