Conversation
c7daa85 to
37671dc
Compare
packages/kbn-optimizer/src/cli.ts
Outdated
There was a problem hiding this comment.
@vigneshshanmugam, this is the issue I mentioned previously. I haven't dug into it too deeply, but it appears the callback to flush is called before the HTTP request is made. Is this something you could look into? A 1-second wait is obviously something we don't want to merge with.
There was a problem hiding this comment.
Sure, I will have a look.
There was a problem hiding this comment.
Were you able to reproduce?
There was a problem hiding this comment.
Was busy with other stuffs, Apologies for the delay. Will get back to it soon. Is it blocking the current PR?
There was a problem hiding this comment.
Hey, yeah we will need to resolve that before moving forward with this. We're currently working to have APM collection for local development, CI and on Cloud.
There was a problem hiding this comment.
Sure, Had a quick look and it seems like since there is no active request to the APM server, the callback is getting immediately invoked as a result. I will debug more on how we can tune it to report events from every CLI run.
There was a problem hiding this comment.
Btw, I did try a few runs and all of the events were reported properly to the server even without the setTimeout hack as the underlying transport layer guarantees the transaction was written to the stream when trans.end() is called and flush guarantees the stream is closed properly.
Do we need to do anything else here?
af1cc2c to
774aee4
Compare
774aee4 to
fc6bf16
Compare
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
7fd07f3 to
88ad854
Compare
88ad854 to
45b86cd
Compare
💔 Build Failed
Failed CI StepsBuild metricsHistory
To update your PR or re-run it, just comment with: |
As we work to improve the developer experience, it's important that we track the time of bootstrap and optimizer. With this, we can also ensure that developers across operating systems and machines are receiving a similar expereince.