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

Tracing #3

Open
aldesantis opened this issue Jul 15, 2018 · 0 comments
Open

Tracing #3

aldesantis opened this issue Jul 15, 2018 · 0 comments
Labels

Comments

@aldesantis
Copy link
Member

It would be nice to have a way to see what was the last step executed by an operation, so that we can easily understand what is halting an operation.

We could set the last executed step on the operation's skill, e.g.

result = Api::V2::User::Operation::Show.call('id' => 1)
result['result.last_step'] # => "model.find_by"
result['result.failing_step'] # => "policy.default"

result.failing_step here can be computed like this (here be dragons):

steps = Api::V2::User::Operation::Show.skills['pipetree'].instance_variable_get('@index').keys
steps[steps.index(result['result.last_step']) + 1]

This should also be indicated in Pragma::Rails::NoResponseError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant