-
Notifications
You must be signed in to change notification settings - Fork 621
feat(instrumentations-tedious): support net.* and database semconv migration
#3273
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
Merged
+245
−65
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d3cc76b
feat(instrumentations-tedious): support `net.*` and database semconv …
trentm 98166fd
drop the TODO for review of db.namespace, this instr has no code owne…
trentm 43b8ad5
align table cols
trentm e974b50
Merge branch 'main' into trentm-semconv-up-tedious
trentm 3092401
drop self-dev comment
trentm b256d13
copypasta ioredis to tedious
trentm e22ccd5
Merge branch 'main' into trentm-semconv-up-tedious
trentm 8410e0e
fix prettier
trentm 629f93b
note issue number relevant to these TODO comments
trentm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,19 +42,29 @@ registerInstrumentations({ | |
|
|
||
| ## Semantic Conventions | ||
|
|
||
| This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) | ||
| This instrumentation implements Semantic Conventions (semconv) v1.7.0. Since then, networking (in semconv v1.23.1) and database (in semconv v1.33.0) semantic conventions were stabilized. As of `@opentelemetry/[email protected]` support has been added for migrating to the stable semantic conventions using the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable as follows: | ||
|
|
||
| 1. Upgrade to the latest version of this instrumentation package. | ||
| 2. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http/dup,database/dup` to emit both old and stable semantic conventions. (The `http` token is used to control the `net.*` attributes, the `database` token to control to `db.*` attributes.) | ||
| 3. Modify alerts, dashboards, metrics, and other processes in your Observability system to use the stable semantic conventions. | ||
| 4. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http,database` to emit only the stable semantic conventions. | ||
|
|
||
| By default, if `OTEL_SEMCONV_STABILITY_OPT_IN` includes neither of the above tokens, the old v1.7.0 semconv is used. | ||
| The intent is to provide an approximate 6 month time window for users of this instrumentation to migrate to the new database and networking semconv, after which a new minor version will use the new semconv by default and drop support for the old semconv. | ||
| See [the HTTP migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/) and the [database migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/) for details. | ||
|
|
||
| Attributes collected: | ||
|
|
||
| | Attribute | Short Description | | ||
| | ----------------------- | ------------------------------------------------------------------------------ | | ||
| | `db.name` | This attribute is used to report the name of the database being accessed. | | ||
| | `db.sql.table` | The name of the primary table that the operation is acting upon. | | ||
| | `db.statement` | The database statement being executed. | | ||
| | `db.system` | An identifier for the database management system (DBMS) product being used. | | ||
| | `db.user` | Username for accessing the database. | | ||
| | `net.peer.name` | Remote hostname or similar. | | ||
| | `net.peer.port` | Remote port number. | | ||
| | Old semconv | Stable semconv | Description | | ||
| | --------------- | -------------------- | ---------------------------------- | | ||
| | `db.system` | `db.system.name` | 'mssql' (old), 'microsoft.sql_server' (stable) | | ||
| | `db.statement` | `db.query.text` | The database query being executed. | | ||
| | `db.user` | Removed | Username for accessing the database. | | ||
| | `db.name` | Removed | Integrated into new `db.namespace`. | | ||
| | (not included) | `db.namespace` | The database associated with the connection, qualified by the instance name. | | ||
| | `db.sql.table` | `db.collection.name` | The name of a collection (table, container) within the database. | | ||
| | `net.peer.name` | `server.address` | Remote hostname or similar. | | ||
| | `net.peer.port` | `server.port` | Remote port number. | | ||
|
|
||
| ### Trace Context Propagation | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.