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 section on span status for databases #1560

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

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Nov 8, 2024

Addresses the DB part of #1536.

Let's polish it for databases and then expand to other conventions (and potentially have a generic guidance).

The intention is to keep exception event part experimental since

  • there doesn't seem to be a consensus or a common approach for it
  • span events is going away

Merge requirement checklist

@lmolkova lmolkova requested review from a team as code owners November 8, 2024 02:58
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved

- SHOULD set the span status code to `Error`
- SHOULD set the `error.type` attribute
- SHOULD set the span status description when it has additional information
Copy link
Contributor

Choose a reason for hiding this comment

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

should this have any requirements about not having any confidential data? Similar to how we have on metrics errors where we don't add if it shows actual values of queries, etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see how database instrumentation can determine if there is any sensitive or confidential data in the arbitrary exception message. Someone can put sensitive data into database name (bluesky has DB per user and they might call them accordingly), but how can we provide basic observability in the common case if we assume the worst?

Happy to consider any specific cases when we can do something on the instrumentation side.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if I wasn't clear, I didn't mean that is the job of the instrumentation to determine this, I meant more as a recommendation, that this sentence could include something on the lines of

SHOULD set the span status description when it has additional information about the error that aligns with [Span Status Description][SpanStatus] and does not contain sensitive data.

docs/database/database-spans.md Show resolved Hide resolved
docs/database/database-spans.md Outdated Show resolved Hide resolved
@@ -0,0 +1,4 @@
change_type: enhancement
component: db
note: Specify how to set span kind for database operations.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
note: Specify how to set span kind for database operations.
note: Specify how to set span status for database operations.

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

Successfully merging this pull request may close these issues.

6 participants