-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline incubating constants from semantic-conventions
- Loading branch information
1 parent
a27311d
commit 3a42a6a
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
59 changes: 59 additions & 0 deletions
59
plugins/node/opentelemetry-instrumentation-pg/src/semantic-conventions.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* These constants are considered experimental exports of `@opentelemetry/semantic-conventions`. | ||
* They're being inlined until they're officially exported by `@opentelemetry/semantic-conventions`. | ||
*/ | ||
|
||
/** | ||
* The number of connections that are currently in state described by the `state` attribute | ||
* | ||
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. | ||
*/ | ||
export declare const METRIC_DB_CLIENT_CONNECTION_COUNT: 'db.client.connection.count'; | ||
|
||
/** | ||
* The number of pending requests for an open connection, cumulative for the entire pool | ||
* | ||
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. | ||
*/ | ||
export declare const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS: 'db.client.connection.pending_requests'; | ||
|
||
/** | ||
* Duration of database client operations. | ||
* | ||
* @note Batch operations **SHOULD** be recorded as a single operation. | ||
* | ||
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. | ||
*/ | ||
export declare const METRIC_DB_CLIENT_OPERATION_DURATION: 'db.client.operation.duration'; | ||
|
||
/** | ||
* The name of the database, fully qualified within the server address and port. | ||
* | ||
* @example customers | ||
* | ||
* @example test.users | ||
* | ||
* @note If a database system has multiple namespace components, they **SHOULD** be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces **SHOULD** **NOT** be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid. | ||
* Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system. | ||
* It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. | ||
* | ||
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. | ||
*/ | ||
export declare const ATTR_DB_NAMESPACE: 'db.namespace'; | ||
|
||
/** | ||
* The name of the operation or command being executed. | ||
* | ||
* @example findAndModify | ||
* | ||
* @example HMSET | ||
* | ||
* @example SELECT | ||
* | ||
* @note It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. | ||
* If the operation name is parsed from the query text, it **SHOULD** be the first operation name found in the query. | ||
* For batch operations, if the individual operations are known to have the same operation name then that operation name **SHOULD** be used prepended by `BATCH `, otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database system specific term if more applicable. | ||
* | ||
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. | ||
*/ | ||
export declare const ATTR_DB_OPERATION_NAME: 'db.operation.name'; |