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: Add signature tracing #11453

Merged

Conversation

OGPoyraz
Copy link
Member

Description

  • Adding createTracingMiddleware to start tracing for defined type of messages.
  • Adding trace callback to SignatureController.
  • End Notification Display trace after signature confirmation landed on users screen.

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/1883

Manual testing steps

  1. Set MM_SENTRY_DSN_DEV to developer Sentry dsn, see the value here https://github.com/MetaMask/metamask-extension/blob/develop/.metamaskrc.dist
  2. Go test-dapp in app, trigger and personal signature
  3. If you used the mentioned dsn above, your Signature trace will appear on this link: https://metamask.sentry.io/traces/?project=273496&query=signature%3ATransaction&source=traces&statsPeriod=1h

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@OGPoyraz OGPoyraz requested review from a team as code owners September 26, 2024 08:11
@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Sep 26, 2024
@OGPoyraz OGPoyraz added the No QA Needed Apply this label when your PR does not need any QA effort. label Sep 26, 2024
@OGPoyraz OGPoyraz added the Run Smoke E2E Triggers smoke e2e on Bitrise label Sep 26, 2024
Copy link
Contributor

github-actions bot commented Sep 26, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 7e7823e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/66431eff-be4e-4076-86ff-2ac6ffcf169c

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

vinistevam
vinistevam previously approved these changes Sep 26, 2024
jpuri
jpuri previously approved these changes Sep 26, 2024
@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 30, 2024
@OGPoyraz OGPoyraz removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 1, 2024
@OGPoyraz OGPoyraz added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 1, 2024
@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 2, 2024
@OGPoyraz OGPoyraz requested a review from a team as a code owner October 4, 2024 09:46
@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 4, 2024
Copy link

sonarcloud bot commented Oct 4, 2024

@OGPoyraz OGPoyraz added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 4, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 7, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 7, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 7, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: db91a0d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/56a2426f-530b-46c1-86d6-1bf053dc99ad

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link
Member

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

some optimisations suggested

app/core/createTracingMiddleware/index.ts Show resolved Hide resolved
app/core/createTracingMiddleware/index.ts Show resolved Hide resolved
app/core/createTracingMiddleware/index.ts Show resolved Hide resolved
Copy link
Member

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

LGTM

@OGPoyraz OGPoyraz added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit a11ee59 Oct 8, 2024
55 checks passed
@OGPoyraz OGPoyraz deleted the 1883-add-performance-metrics-for-signature-requests-in-mobile branch October 8, 2024 09:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

C: This test file covers the new code changes, but doesn't test it.
If it's important to make sure trace is called, you could spy on it.

@@ -2,6 +2,7 @@ import Modal from 'react-native-modal';
import React, { useEffect, useState } from 'react';
import { StyleSheet } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { useSelector } from 'react-redux';
Copy link
Contributor

Choose a reason for hiding this comment

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

C: This should not be in the PR. If it was a file you worked on, reorganising imports is fine, but if it's only the import change, you may leave it as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

S: add a test case and spy on endTrace in app/components/Approvals/SignatureApproval/SignatureApproval.test.tsx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.34.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-confirmations Push issues to confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants