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(sdks/actor/runtime): include url for debugging actor in internal error metadata #1952

Conversation

NathanFlurry
Copy link
Member

Changes

Copy link
Member Author

NathanFlurry commented Jan 28, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

cloudflare-workers-and-pages bot commented Jan 28, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2eaad4
Status:🚫  Build failed.

View logs

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances actor debugging capabilities by adding error metadata URLs that link directly to specific actor instances in the Rivet Hub.

  • Added InternalErrorMetadata interface in sdks/actor/runtime/src/errors.ts to include debugging URLs
  • Modified error handling in sdks/actor/runtime/src/actor.ts to include actor-specific Hub URLs in error metadata
  • Updated sdks/actor/runtime/src/event.ts to pass actorMetadata and construct debugging URLs for WebSocket errors
  • Enhanced error logging with additional context (connectionId, rpcRequestId, rpcName)

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 518 to 526
metadata = {
url: `https://hub.rivet.gg/projects/${this._metadata.project.slug}/environments/${this._metadata.environment.slug}/actors?actorId=${this._metadata.actor.id}`,
} satisfies errors.InternalErrorMetadata;
Copy link

Choose a reason for hiding this comment

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

logic: URL construction assumes project.slug and environment.slug are always available. Should handle case where metadata fields are undefined.

@NathanFlurry NathanFlurry force-pushed the 01-27-feat_sdks_actor_runtime_include_url_for_debugging_actor_in_internal_error_metadata branch from 9485632 to d2eaad4 Compare January 28, 2025 20:42
@NathanFlurry NathanFlurry force-pushed the 01-27-feat_sdks_actor_runtime_include_url_for_debugging_actor_in_internal_error_metadata branch from 2ea6c4b to d2eaad4 Compare January 28, 2025 21:01
Copy link

cloudflare-workers-and-pages bot commented Jan 28, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2eaad4
Status:🚫  Build failed.

View logs

Copy link
Contributor

graphite-app bot commented Jan 30, 2025

Merge activity

  • Jan 30, 3:38 AM EST: A user added this pull request to the Graphite merge queue.
  • Jan 30, 3:43 AM EST: CI is running for this PR on a draft PR: #1974
  • Jan 30, 3:45 AM EST: A user merged this pull request with the Graphite merge queue via draft PR: #1974.

NathanFlurry added a commit that referenced this pull request Jan 30, 2025
… error metadata (#1952)

<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot closed this Jan 30, 2025
@graphite-app graphite-app bot deleted the 01-27-feat_sdks_actor_runtime_include_url_for_debugging_actor_in_internal_error_metadata branch January 30, 2025 08: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.

1 participant