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(telemetry): Pushed changes to optimise the delay after the process end… #689

Open
wants to merge 3 commits into
base: rupareddy/TelemetryChangesMain
Choose a base branch
from

Conversation

rupareddy5-21
Copy link
Contributor

@rupareddy5-21 rupareddy5-21 commented Apr 25, 2023

…s and to calculate configfileOptions

@@ -30,7 +30,7 @@ export async function start(options: SWACLIConfig) {
// Make sure this code (or code from utils) does't depend on environment variables!

const cmdStartTime = new Date().getTime();
const flagsUsed = getFlagsUsed(options);
const flagsUsed = getFlagsUsed(options, "start");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have constant to use here SWACommand ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Type SWACommand cant be used as a value here.

@@ -92,7 +92,7 @@ export async function start(options: SWACLIConfig) {
else if (!fs.existsSync(outputLocation!)) {
logger.error(`The folder "${resolvedOutputLocation}" is not found. Exit.`, true);
const cmdEndTime = new Date().getTime();
collectTelemetryEvent(TELEMETRY_EVENTS.Start, {
await collectTelemetryEvent(TELEMETRY_EVENTS.Start, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so collectTelemetryEvent is async call

"outputLocation",
"apiLocation",
"appDevserverUrl",
"apiDevserverUrl",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this hard coding?

not sure if this scalable.. is there a way to build this list dynamically from the these commands code?

@@ -90,6 +90,7 @@ export class BaseTelemetrySender implements TelemetrySender {
this._telemetryClient = client;
this._instantiationStatus = InstantiationStatus.INSTANTIATED;
this._flushQueues();
this._telemetryClient.flush();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please check if flush is async and do we need to await() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants