Skip to content

Add exhaustive list of error codes and description of metric flag#4422

Merged
hhunter-ms merged 9 commits into
dapr:v1.15from
jake-engelberg:add-errorcode-metrics
Dec 13, 2024
Merged

Add exhaustive list of error codes and description of metric flag#4422
hhunter-ms merged 9 commits into
dapr:v1.15from
jake-engelberg:add-errorcode-metrics

Conversation

@jake-engelberg

@jake-engelberg jake-engelberg commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within codetabs
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

Added the exhaustive set of error codes dapr emits as well as how to enable metric recording for these error codes based on the associated PR below which implements this.

Issue reference

dapr/dapr#8256

Signed-off-by: Jake Engelberg <jake@diagrid.io>
@jake-engelberg jake-engelberg marked this pull request as ready for review November 6, 2024 23:30
@jake-engelberg jake-engelberg requested review from a team as code owners November 6, 2024 23:30
Comment thread daprdocs/content/en/operations/observability/metrics/metrics-overview.md Outdated
@github-actions

Copy link
Copy Markdown

Stale PR, paging all reviewers

@github-actions

Copy link
Copy Markdown

Stale PR, paging all reviewers

@github-actions

github-actions Bot commented Dec 1, 2024

Copy link
Copy Markdown

Stale PR, paging all reviewers

@github-actions github-actions Bot added the stale label Dec 1, 2024
jake-engelberg and others added 2 commits December 1, 2024 15:51
@hhunter-ms hhunter-ms removed the stale label Dec 2, 2024

@hhunter-ms hhunter-ms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

quick review - thank you!

Comment thread daprdocs/content/en/operations/observability/metrics/metrics-overview.md Outdated
Signed-off-by: Jake Engelberg <jake@diagrid.io>
@github-actions

Copy link
Copy Markdown

Stale PR, paging all reviewers

@github-actions github-actions Bot added the stale label Dec 10, 2024
@msfussell msfussell removed the stale label Dec 10, 2024
@msfussell

msfussell commented Dec 10, 2024

Copy link
Copy Markdown
Member

@jake-engelberg - I realize that we need to make error codes concept much more visible to developers by adding a topic under https://docs.dapr.io/developing-applications/building-blocks/ called "API Error codes" describing what they are and also how you can get metrics for them (This can point to the error codes list and the metrics configuration)

Also in this article we should mention that each SDK can handle and return the error code in the language specific way. For example this is Go https://docs.dapr.io/developing-applications/sdks/go/go-client/#error-handling but we also need to discuss with each of the SDK maintainers how to handle these. I suggest raising an issue into each of SDK repos for this to track this (if my understanding is correct)

@hhunter-ms can help as needed. Hannah - This reference article https://docs.dapr.io/reference/api/error_codes/ should be called "API Error codes" in the index file. I did not realize this was buried under Dapr API reference.

@@ -7,43 +7,150 @@ weight: 1400
---

For http calls made to Dapr runtime, when an error is encountered, an error json is returned in http response body. The json contains an error code and an descriptive error message, e.g.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jake-engelberg this is HTTP and gRPC?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is both and we'll update the wording soon to reflect the auto generated chart with both codes which at the moment sometimes differ:

dapr/dapr#8346

Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
Comment thread daprdocs/content/en/reference/api/error_codes.md Outdated
spec:
metrics:
enabled: true
recordErrorCodes: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You also need to;

  1. update this table in configuration setting https://docs.dapr.io/operations/configuration/configuration-overview/#metrics And in that table point to this article for the details.
  2. Update the configuration schema to add this under metrics section here https://docs.dapr.io/reference/resource-specs/configuration-schema/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hhunter-ms - Will do this. Do Jake you can ignore this comment.

jake-engelberg and others added 2 commits December 13, 2024 10:39
Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Jake Engelberg <152900222+jake-engelberg@users.noreply.github.com>
@hhunter-ms hhunter-ms merged commit 780c018 into dapr:v1.15 Dec 13, 2024
@marcduiker

Copy link
Copy Markdown
Contributor

@holopin-bot @jake-engelberg Thanks Jake!

@holopin-bot

holopin-bot Bot commented Jan 10, 2025

Copy link
Copy Markdown

Congratulations @jake-engelberg, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm5qxvv6811300cmj4flegr8q

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

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.

6 participants