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

Add common guidance on recording errors on spans and metrics, clarify DB conventions #1716

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Dec 28, 2024

Fixes #1536

  • Document HTTP + DB approach for span status + description as generic for spans
  • Document error.type as generic error attribute on spans and metrics
  • Specify how to classify db.response.status_codes as failures
  • Update recommendation to record exceptions as a span events or log records

Important

We can and should implement strategy of reporting exceptions on local root spans in OTel SDK - it should not be an instrumentation concern.

Here's an OTEP on how to record exceptions on logs - it discusses the details of configurable exception recording strategy.
Since public facing log API is in development, we'll keep using span events for the time being.

Merge requirement checklist

@lmolkova lmolkova requested review from a team as code owners December 28, 2024 18:27
@lmolkova lmolkova requested a review from Copilot December 28, 2024 18:28

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 20 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • docs/database/redis.md: Evaluated as low risk
  • docs/database/cassandra.md: Evaluated as low risk
  • docs/database/cosmosdb.md: Evaluated as low risk
  • docs/rpc/rpc-spans.md: Evaluated as low risk
  • docs/messaging/messaging-spans.md: Evaluated as low risk
  • docs/cli/cli-spans.md: Evaluated as low risk
  • docs/http/http-spans.md: Evaluated as low risk
  • docs/general/recording-errors.md: Evaluated as low risk
  • docs/gen-ai/gen-ai-spans.md: Evaluated as low risk
  • docs/faas/faas-spans.md: Evaluated as low risk
  • docs/exceptions/README.md: Evaluated as low risk
  • docs/database/elasticsearch.md: Evaluated as low risk
  • docs/database/database-spans.md: Evaluated as low risk
  • docs/database/mongodb.md: Evaluated as low risk
  • docs/database/couchdb.md: Evaluated as low risk
@lmolkova lmolkova force-pushed the generic-recording-errors branch 2 times, most recently from 4c1fdc3 to 456f377 Compare January 9, 2025 01:40
docs/exceptions/README.md Outdated Show resolved Hide resolved
docs/exceptions/README.md Outdated Show resolved Hide resolved
docs/exceptions/README.md Outdated Show resolved Hide resolved
docs/exceptions/README.md Outdated Show resolved Hide resolved
docs/general/recording-errors.md Outdated Show resolved Hide resolved
docs/general/recording-errors.md Outdated Show resolved Hide resolved
docs/general/recording-errors.md Outdated Show resolved Hide resolved
.chloggen/1716.yaml Outdated Show resolved Hide resolved
docs/http/http-spans.md Outdated Show resolved Hide resolved
@@ -11,33 +11,6 @@ exceptions associated with spans.

<!-- toc -->

- [Recording an Exception](#recording-an-exception)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

docs/general/recording-errors.md Outdated Show resolved Hide resolved
@lmolkova lmolkova force-pushed the generic-recording-errors branch from 4558c9c to 4ddc1d1 Compare January 10, 2025 16:31
Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

This looks good to me, but we may want to give some vendors extra time to adjust to the new span status guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs More Approval
4 participants