|
| 1 | +/* |
| 2 | + * Copyright The OpenTelemetry Authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +/* |
| 18 | + * This file contains a copy of unstable semantic convention definitions |
| 19 | + * used by this package. |
| 20 | + * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv |
| 21 | + */ |
| 22 | + |
| 23 | +/** |
| 24 | + * Deprecated, use `server.address`, `server.port` attributes instead. |
| 25 | + * |
| 26 | + * @example "Server=(localdb)\\v11.0;Integrated Security=true;" |
| 27 | + * |
| 28 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 29 | + * |
| 30 | + * @deprecated Replaced by `server.address` and `server.port`. |
| 31 | + */ |
| 32 | +export const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const; |
| 33 | + |
| 34 | +/** |
| 35 | + * Deprecated, use `db.collection.name` instead. |
| 36 | + * |
| 37 | + * @example "mytable" |
| 38 | + * |
| 39 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 40 | + * |
| 41 | + * @deprecated Replaced by `db.collection.name`. |
| 42 | + */ |
| 43 | +export const ATTR_DB_MONGODB_COLLECTION = 'db.mongodb.collection' as const; |
| 44 | + |
| 45 | +/** |
| 46 | + * Deprecated, use `db.namespace` instead. |
| 47 | + * |
| 48 | + * @example customers |
| 49 | + * @example main |
| 50 | + * |
| 51 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 52 | + * |
| 53 | + * @deprecated Replaced by `db.namespace`. |
| 54 | + */ |
| 55 | +export const ATTR_DB_NAME = 'db.name' as const; |
| 56 | + |
| 57 | +/** |
| 58 | + * Deprecated, use `db.operation.name` instead. |
| 59 | + * |
| 60 | + * @example findAndModify |
| 61 | + * @example HMSET |
| 62 | + * @example SELECT |
| 63 | + * |
| 64 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 65 | + * |
| 66 | + * @deprecated Replaced by `db.operation.name`. |
| 67 | + */ |
| 68 | +export const ATTR_DB_OPERATION = 'db.operation' as const; |
| 69 | + |
| 70 | +/** |
| 71 | + * The database statement being executed. |
| 72 | + * |
| 73 | + * @example SELECT * FROM wuser_table |
| 74 | + * @example SET mykey "WuValue" |
| 75 | + * |
| 76 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 77 | + * |
| 78 | + * @deprecated Replaced by `db.query.text`. |
| 79 | + */ |
| 80 | +export const ATTR_DB_STATEMENT = 'db.statement' as const; |
| 81 | + |
| 82 | +/** |
| 83 | + * Deprecated, use `db.system.name` instead. |
| 84 | + * |
| 85 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 86 | + * |
| 87 | + * @deprecated Replaced by `db.system.name`. |
| 88 | + */ |
| 89 | +export const ATTR_DB_SYSTEM = 'db.system' as const; |
| 90 | + |
| 91 | +/** |
| 92 | + * Deprecated, use `server.address` on client spans and `client.address` on server spans. |
| 93 | + * |
| 94 | + * @example example.com |
| 95 | + * |
| 96 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 97 | + * |
| 98 | + * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans. |
| 99 | + */ |
| 100 | +export const ATTR_NET_PEER_NAME = 'net.peer.name' as const; |
| 101 | + |
| 102 | +/** |
| 103 | + * Deprecated, use `server.port` on client spans and `client.port` on server spans. |
| 104 | + * |
| 105 | + * @example 8080 |
| 106 | + * |
| 107 | + * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 108 | + * |
| 109 | + * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans. |
| 110 | + */ |
| 111 | +export const ATTR_NET_PEER_PORT = 'net.peer.port' as const; |
| 112 | + |
| 113 | +/** |
| 114 | + * Enum value "mongodb" for attribute {@link ATTR_DB_SYSTEM}. |
| 115 | + * |
| 116 | + * MongoDB |
| 117 | + * |
| 118 | + * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
| 119 | + */ |
| 120 | +export const DB_SYSTEM_VALUE_MONGODB = 'mongodb' as const; |
0 commit comments