Skip to content

chore(analytics): capture abnormal run test events - INS-5623#8765

Merged
ihexxa merged 7 commits into
developfrom
chore/track-run-test
Jun 30, 2025
Merged

chore(analytics): capture abnormal run test events - INS-5623#8765
ihexxa merged 7 commits into
developfrom
chore/track-run-test

Conversation

@ihexxa

@ihexxa ihexxa commented May 29, 2025

Copy link
Copy Markdown
Contributor

Changes

  • chore(analytics): capture abnormal run test events
  • Also include org id in segment tracking

@ihexxa ihexxa self-assigned this May 29, 2025
@ihexxa ihexxa marked this pull request as draft May 29, 2025 07:56
@ihexxa ihexxa force-pushed the chore/track-run-test branch from 9d73116 to a4a5c70 Compare June 5, 2025 03:11
@ihexxa ihexxa marked this pull request as ready for review June 5, 2025 03:12
@ihexxa ihexxa requested a review from CurryYangxx June 5, 2025 03:12
@ihexxa ihexxa changed the title chore(analytics): capture abnormal run test events chore(analytics): capture abnormal run test events - INS-5623 Jun 5, 2025
@ihexxa ihexxa force-pushed the chore/track-run-test branch from a4a5c70 to 0d3a499 Compare June 12, 2025 03:40
@ihexxa ihexxa force-pushed the chore/track-run-test branch from 0d3a499 to e989097 Compare June 13, 2025 06:00
@ihexxa ihexxa force-pushed the chore/track-run-test branch from ef7f851 to 75a6193 Compare June 13, 2025 06:04
} catch (error: unknown) {
console.warn('[analytics] Unexpected error while sending segment event', error);
} finally {
if (!userSession?.hashedAccountId && [SegmentEvent.unitTestRun, SegmentEvent.unitTestRunAll].includes(event)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems you just want to send a specific Sentry event here, but trackSegmentEvent is a common function.
I think it is better to report Sentry event directly in the corresponding action.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is added temporarily and finally we will remove this, or we may need to add several duplicated captures calls with some logic for getting session.

@ihexxa ihexxa merged commit 228f1b2 into develop Jun 30, 2025
15 of 18 checks passed
@ihexxa ihexxa deleted the chore/track-run-test branch June 30, 2025 06:37
RoamingLost pushed a commit to RoamingLost/insomnia that referenced this pull request Aug 6, 2025
)

* chore: capture abnormal run test events

* fix: lint

* fix: lint

* chore: enable sentry in main

* fix: lint

* fix: remove duplicated sentry init

* fix: lint
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.

2 participants