-
Notifications
You must be signed in to change notification settings - Fork 276
[db] Add docs for context info propagation #2236
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
Changes from 4 commits
1529979
ab6e386
08b02a8
2c26648
0ccfda5
a6e65f4
886aa37
f633fa2
5b835f8
e021083
1bcbf0d
e6803f5
f986ee2
8794c1d
ec00e3c
fa6cf6d
2c0e01a
430957b
7f05f5e
5534272
9876582
89a4baf
0e7ff53
8effebc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Use this changelog template to create an entry for release notes. | ||
| # | ||
| # If your change doesn't affect end users you should instead start | ||
| # your pull request title with [chore] or use the "Skip Changelog" label. | ||
|
|
||
| # One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
| change_type: enhancement | ||
|
|
||
| # The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) | ||
| component: db | ||
|
|
||
| # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
| note: Add doc for context information propagation | ||
|
|
||
| # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
| # The values here must be integers. | ||
| issues: [2162] | ||
|
|
||
| # (Optional) One or more lines of additional information to render under the primary note. | ||
| # These lines will be padded with 2 spaces and then inserted directly into the document. | ||
| # Use pipe (|) for multiline entries. | ||
| subtext: |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ linkTitle: Spans | |||
| - [Notes and well-known identifiers for `db.system.name`](#notes-and-well-known-identifiers-for-dbsystemname) | ||||
| - [Sanitization of `db.query.text`](#sanitization-of-dbquerytext) | ||||
| - [Generating a summary of the query](#generating-a-summary-of-the-query) | ||||
| - [Propagating context to databases](#propagating-context-to-databases) | ||||
| - [Semantic conventions for specific database technologies](#semantic-conventions-for-specific-database-technologies) | ||||
|
|
||||
| <!-- tocstop --> | ||||
|
|
@@ -478,6 +479,41 @@ Semantic conventions for individual database systems or specialized instrumentat | |||
| MAY specify a different `db.query.summary` format as long as produced summary remains | ||||
| relatively short and its cardinality remains low comparing to the `db.query.text`. | ||||
|
|
||||
| ## Propagating context to databases | ||||
|
|
||||
| **Status**: [Development][DocumentStatus] | ||||
|
|
||||
| Instrumentations SHOULD propagate the context information to databases. | ||||
pellared marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
|
|
||||
| | Attribute | Type | Description | Require level | Stability | | ||||
pellared marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| |----------------|--------|---------------------------------------|-------------------|----------------------------------------------------------------| | ||||
| | `service.name` | string | Logical name of the service [1] | `Required` |  | | ||||
|
||||
| - [`service.name`](#service) |
Example:
/*baggage='service.name%3Dbar'*/
@pellared, do you know how to express an attribute in baggage in the semantic convention doc?
I think that we just need to write it down as I do not think we have any semantic conventions for baggage key-values so far.
CC @reyang, @dyladan, @yurishkuro, @arminru
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the best name to use here? service.name or peer.service.
I slightly prefer peer.service.
service.name. peer.service applies to the remote (downstream service): link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pellared Do you recommend using the format /*baggage='service.name%3Dbar'*/ instead of /*baggage.service.name='bar'*/? I'm not sure if there is an existing propagator we can use. Just wanted to double-check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest exploring /*baggage='service.name%3Dbar'* and use of the baggage propagator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pellared Updated the examples accordingly.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open question, not a blocker for the PR, can be considered separately.
Should we support any text-propagators here by using format/names knows from http headers?
Ref: B3/B3multi as an example: https://github.com/openzipkin/b3-propagation?tab=readme-ov-file#single-header
Uh oh!
There was an error while loading. Please reload this page.