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

Added fields to RpcException message for surfacing in AppInsights #70

Merged
merged 5 commits into from
May 26, 2022

Conversation

madelinegordon
Copy link
Contributor

Added the following fields for the scenario in which user code throws an exception:

  • exception type name
  • bool for isUserException, to be set by each worker upon throwing the exception.

These were added so that the user code exception can be piped through to AI and avoid customer confusion.

src/proto/FunctionRpc.proto Outdated Show resolved Hide resolved
src/proto/FunctionRpc.proto Outdated Show resolved Hide resolved
src/proto/FunctionRpc.proto Outdated Show resolved Hide resolved
Copy link
Contributor

@ejizba ejizba left a comment

Choose a reason for hiding this comment

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

Overall looks good! I'm excited for this feature - should be very helpful for Node.js users 😊

src/proto/FunctionRpc.proto Outdated Show resolved Hide resolved

// Worker specifies whether exception is a user exception,
// for purpose of application insights logging. Defaults to false.
optional bool is_user_exception = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

You're the first person to use optional in this file. I assume that's fine? But just surprised it hasn't been used already

Copy link
Member

Choose a reason for hiding this comment

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

Should be okay, we didn't want to have a breaking change xD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, maybe because these are the only fields on a message definition that are used in one specific scenario and not in others- we don't want to require that workers explicitly set these fields for exceptions not thrown by user code.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @madelinegordon @liliankasem I am updating the java worker protofile and it gives me error on the optional as

Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.

I wonder is there anything I missed. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

Ah if they're optional by default we should remove the label

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.

5 participants