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): Add telemetry via @sentry/node #213

Merged
merged 9 commits into from
Jan 9, 2025

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented Jan 8, 2025

Adds telemetry by setting up a barebones Sentry instance using @sentry/node. Individual steps can be traced by wrapping them with the traceStep helper.

Here's an example of an execution:

Screenshot 2025-01-09 at 15 32 49@2x

Closes: #214

src/telemetry.ts Outdated
Comment on lines 29 to 31
event.exception?.values?.forEach(exception => {
delete exception.stacktrace;
});
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if this is even necessary in the action? Can it run anywhere else than on github's environment? Our main objective for deleting the stack trace in the wizard and plugins was that the stack trace file paths would likely come from users' devices.

Happy with either way, just wanted to ask if it's necessary.

Copy link
Member Author

@andreiborza andreiborza Jan 9, 2025

Choose a reason for hiding this comment

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

People could theoretically, for whatever reason, execute this action via something like https://github.com/nektos/act but I think the chance is rather low.

Will remove.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the hooks as well for the same reason.

src/telemetry.ts Outdated Show resolved Hide resolved
src/main.ts Outdated
},
async () => {
try {
const cli = getCLI();
Copy link
Member

Choose a reason for hiding this comment

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

l/suggestion: In the bundler plugins, we pass the trace to the CLI. Maybe worth to do this here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added here: f14edb3

@andreiborza
Copy link
Member Author

@Lms24 I added session tracking and the disable_telemetry flag to the action. Please have another look 🙏.

@andreiborza andreiborza force-pushed the ab/add-telemetry branch 2 times, most recently from 586f67a to 248798c Compare January 9, 2025 11:08
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines +20 to 21
}).releases;

Copy link
Member

Choose a reason for hiding this comment

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

Just to confirm: the for loop for setting the variables was moved to checkEnvironmentVariables, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, correct. That was really only necessary once at startup and since getCli is now not returning a singleton anymore I moved it over there.

@andreiborza andreiborza merged commit f6a6874 into master Jan 9, 2025
12 checks passed
@andreiborza andreiborza deleted the ab/add-telemetry branch January 9, 2025 15:45
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.

Add telemetry via Sentry
2 participants