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 initial tracing to SignatureController #4655

Merged

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Sep 5, 2024

Explanation

Add an optional trace constructor callback to the TransactionController to support generating Sentry traces within the controller, without coupling to the Sentry package.

Add an optional traceContext argument to addTransaction to facilitate generating nested traces within a parent trace generated within a client.

Add initial instrumentation of the transaction lifecycle.

References

https://github.com/MetaMask/MetaMask-planning/issues/2904

Changelog

@metamask/controller-utils

  • ADDED: Add Trace types

@metamask/signature-controller

  • ADDED: Add optional trace callback to constructor.
  • ADDED: Add optional traceContext option to newUnsignedTypedMessage and newUnsignedPersonalMessage methods.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@OGPoyraz OGPoyraz requested review from a team as code owners September 5, 2024 10:45
@OGPoyraz
Copy link
Member Author

OGPoyraz commented Sep 5, 2024

@metamaskbot publish-preview

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "18.1.1-preview-473880a1",
  "@metamask-previews/address-book-controller": "6.0.0-preview-473880a1",
  "@metamask-previews/announcement-controller": "7.0.0-preview-473880a1",
  "@metamask-previews/approval-controller": "7.0.3-preview-473880a1",
  "@metamask-previews/assets-controllers": "38.0.0-preview-473880a1",
  "@metamask-previews/base-controller": "7.0.0-preview-473880a1",
  "@metamask-previews/build-utils": "3.0.0-preview-473880a1",
  "@metamask-previews/chain-controller": "0.1.1-preview-473880a1",
  "@metamask-previews/composable-controller": "9.0.0-preview-473880a1",
  "@metamask-previews/controller-utils": "11.2.0-preview-473880a1",
  "@metamask-previews/ens-controller": "14.0.0-preview-473880a1",
  "@metamask-previews/eth-json-rpc-provider": "4.1.3-preview-473880a1",
  "@metamask-previews/gas-fee-controller": "20.0.0-preview-473880a1",
  "@metamask-previews/json-rpc-engine": "9.0.2-preview-473880a1",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.2-preview-473880a1",
  "@metamask-previews/keyring-controller": "17.2.0-preview-473880a1",
  "@metamask-previews/logging-controller": "6.0.0-preview-473880a1",
  "@metamask-previews/message-manager": "10.1.0-preview-473880a1",
  "@metamask-previews/name-controller": "8.0.0-preview-473880a1",
  "@metamask-previews/network-controller": "21.0.0-preview-473880a1",
  "@metamask-previews/notification-controller": "6.0.0-preview-473880a1",
  "@metamask-previews/notification-services-controller": "0.2.1-preview-473880a1",
  "@metamask-previews/permission-controller": "11.0.1-preview-473880a1",
  "@metamask-previews/permission-log-controller": "3.0.0-preview-473880a1",
  "@metamask-previews/phishing-controller": "12.0.1-preview-473880a1",
  "@metamask-previews/polling-controller": "10.0.0-preview-473880a1",
  "@metamask-previews/preferences-controller": "13.0.2-preview-473880a1",
  "@metamask-previews/profile-sync-controller": "0.2.1-preview-473880a1",
  "@metamask-previews/queued-request-controller": "5.0.0-preview-473880a1",
  "@metamask-previews/rate-limit-controller": "6.0.0-preview-473880a1",
  "@metamask-previews/selected-network-controller": "18.0.0-preview-473880a1",
  "@metamask-previews/signature-controller": "19.0.0-preview-473880a1",
  "@metamask-previews/transaction-controller": "36.0.0-preview-473880a1",
  "@metamask-previews/user-operation-controller": "15.0.0-preview-473880a1"
}

@OGPoyraz
Copy link
Member Author

OGPoyraz commented Sep 6, 2024

@metamaskbot publish-preview

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "18.1.1-preview-6ea311ff",
  "@metamask-previews/address-book-controller": "6.0.0-preview-6ea311ff",
  "@metamask-previews/announcement-controller": "7.0.0-preview-6ea311ff",
  "@metamask-previews/approval-controller": "7.0.3-preview-6ea311ff",
  "@metamask-previews/assets-controllers": "38.0.0-preview-6ea311ff",
  "@metamask-previews/base-controller": "7.0.0-preview-6ea311ff",
  "@metamask-previews/build-utils": "3.0.0-preview-6ea311ff",
  "@metamask-previews/chain-controller": "0.1.1-preview-6ea311ff",
  "@metamask-previews/composable-controller": "9.0.0-preview-6ea311ff",
  "@metamask-previews/controller-utils": "11.2.0-preview-6ea311ff",
  "@metamask-previews/ens-controller": "14.0.0-preview-6ea311ff",
  "@metamask-previews/eth-json-rpc-provider": "4.1.3-preview-6ea311ff",
  "@metamask-previews/gas-fee-controller": "20.0.0-preview-6ea311ff",
  "@metamask-previews/json-rpc-engine": "9.0.2-preview-6ea311ff",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.2-preview-6ea311ff",
  "@metamask-previews/keyring-controller": "17.2.0-preview-6ea311ff",
  "@metamask-previews/logging-controller": "6.0.0-preview-6ea311ff",
  "@metamask-previews/message-manager": "10.1.0-preview-6ea311ff",
  "@metamask-previews/name-controller": "8.0.0-preview-6ea311ff",
  "@metamask-previews/network-controller": "21.0.0-preview-6ea311ff",
  "@metamask-previews/notification-controller": "6.0.0-preview-6ea311ff",
  "@metamask-previews/notification-services-controller": "0.2.1-preview-6ea311ff",
  "@metamask-previews/permission-controller": "11.0.1-preview-6ea311ff",
  "@metamask-previews/permission-log-controller": "3.0.0-preview-6ea311ff",
  "@metamask-previews/phishing-controller": "12.0.1-preview-6ea311ff",
  "@metamask-previews/polling-controller": "10.0.0-preview-6ea311ff",
  "@metamask-previews/preferences-controller": "13.0.2-preview-6ea311ff",
  "@metamask-previews/profile-sync-controller": "0.2.1-preview-6ea311ff",
  "@metamask-previews/queued-request-controller": "5.0.0-preview-6ea311ff",
  "@metamask-previews/rate-limit-controller": "6.0.0-preview-6ea311ff",
  "@metamask-previews/selected-network-controller": "18.0.0-preview-6ea311ff",
  "@metamask-previews/signature-controller": "19.0.0-preview-6ea311ff",
  "@metamask-previews/transaction-controller": "36.0.0-preview-6ea311ff",
  "@metamask-previews/user-operation-controller": "15.0.0-preview-6ea311ff"
}

matthewwalsh0
matthewwalsh0 previously approved these changes Sep 6, 2024
@OGPoyraz
Copy link
Member Author

OGPoyraz commented Sep 6, 2024

@metamaskbot publish-preview

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "18.1.1-preview-39802fe2",
  "@metamask-previews/address-book-controller": "6.0.0-preview-39802fe2",
  "@metamask-previews/announcement-controller": "7.0.0-preview-39802fe2",
  "@metamask-previews/approval-controller": "7.0.3-preview-39802fe2",
  "@metamask-previews/assets-controllers": "38.0.0-preview-39802fe2",
  "@metamask-previews/base-controller": "7.0.0-preview-39802fe2",
  "@metamask-previews/build-utils": "3.0.0-preview-39802fe2",
  "@metamask-previews/chain-controller": "0.1.1-preview-39802fe2",
  "@metamask-previews/composable-controller": "9.0.0-preview-39802fe2",
  "@metamask-previews/controller-utils": "11.2.0-preview-39802fe2",
  "@metamask-previews/ens-controller": "14.0.0-preview-39802fe2",
  "@metamask-previews/eth-json-rpc-provider": "4.1.3-preview-39802fe2",
  "@metamask-previews/gas-fee-controller": "20.0.0-preview-39802fe2",
  "@metamask-previews/json-rpc-engine": "9.0.2-preview-39802fe2",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.2-preview-39802fe2",
  "@metamask-previews/keyring-controller": "17.2.0-preview-39802fe2",
  "@metamask-previews/logging-controller": "6.0.0-preview-39802fe2",
  "@metamask-previews/message-manager": "10.1.0-preview-39802fe2",
  "@metamask-previews/name-controller": "8.0.0-preview-39802fe2",
  "@metamask-previews/network-controller": "21.0.0-preview-39802fe2",
  "@metamask-previews/notification-controller": "6.0.0-preview-39802fe2",
  "@metamask-previews/notification-services-controller": "0.2.1-preview-39802fe2",
  "@metamask-previews/permission-controller": "11.0.1-preview-39802fe2",
  "@metamask-previews/permission-log-controller": "3.0.0-preview-39802fe2",
  "@metamask-previews/phishing-controller": "12.0.1-preview-39802fe2",
  "@metamask-previews/polling-controller": "10.0.0-preview-39802fe2",
  "@metamask-previews/preferences-controller": "13.0.2-preview-39802fe2",
  "@metamask-previews/profile-sync-controller": "0.2.1-preview-39802fe2",
  "@metamask-previews/queued-request-controller": "5.0.0-preview-39802fe2",
  "@metamask-previews/rate-limit-controller": "6.0.0-preview-39802fe2",
  "@metamask-previews/selected-network-controller": "18.0.0-preview-39802fe2",
  "@metamask-previews/signature-controller": "19.0.0-preview-39802fe2",
  "@metamask-previews/transaction-controller": "36.0.0-preview-39802fe2",
  "@metamask-previews/user-operation-controller": "15.0.0-preview-39802fe2"
}

@OGPoyraz OGPoyraz merged commit f8872e5 into main Sep 11, 2024
116 checks passed
@OGPoyraz OGPoyraz deleted the 2901-add-performance-metric-infrastructure-to-signature-controller branch September 11, 2024 13:43
@OGPoyraz OGPoyraz mentioned this pull request Sep 12, 2024
3 tasks
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