-
Notifications
You must be signed in to change notification settings - Fork 893
/
database.yaml
518 lines (511 loc) · 18.3 KB
/
database.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
groups:
- id: db
prefix: db
type: span
brief: >
This document defines the attributes used to perform database client calls.
span_kind: client
attributes:
- id: system
tag: connection-level
brief: An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
requirement_level: required
type:
allow_custom_values: true
members:
- id: other_sql
value: 'other_sql'
brief: 'Some other SQL database. Fallback only. See notes.'
- id: mssql
value: 'mssql'
brief: 'Microsoft SQL Server'
- id: mssqlcompact
value: 'mssqlcompact'
brief: 'Microsoft SQL Server Compact'
- id: mysql
value: 'mysql'
brief: 'MySQL'
- id: oracle
value: 'oracle'
brief: 'Oracle Database'
- id: db2
value: 'db2'
brief: 'IBM Db2'
- id: postgresql
value: 'postgresql'
brief: 'PostgreSQL'
- id: redshift
value: 'redshift'
brief: 'Amazon Redshift'
- id: hive
value: 'hive'
brief: 'Apache Hive'
- id: cloudscape
value: 'cloudscape'
brief: 'Cloudscape'
- id: hsqldb
value: 'hsqldb'
brief: 'HyperSQL DataBase'
- id: progress
value: 'progress'
brief: 'Progress Database'
- id: maxdb
value: 'maxdb'
brief: 'SAP MaxDB'
- id: hanadb
value: 'hanadb'
brief: 'SAP HANA'
- id: ingres
value: 'ingres'
brief: 'Ingres'
- id: firstsql
value: 'firstsql'
brief: 'FirstSQL'
- id: edb
value: 'edb'
brief: 'EnterpriseDB'
- id: cache
value: 'cache'
brief: 'InterSystems Caché'
- id: adabas
value: 'adabas'
brief: 'Adabas (Adaptable Database System)'
- id: firebird
value: 'firebird'
brief: 'Firebird'
- id: derby
value: 'derby'
brief: 'Apache Derby'
- id: filemaker
value: 'filemaker'
brief: 'FileMaker'
- id: informix
value: 'informix'
brief: 'Informix'
- id: instantdb
value: 'instantdb'
brief: 'InstantDB'
- id: interbase
value: 'interbase'
brief: 'InterBase'
- id: mariadb
value: 'mariadb'
brief: 'MariaDB'
- id: netezza
value: 'netezza'
brief: 'Netezza'
- id: pervasive
value: 'pervasive'
brief: 'Pervasive PSQL'
- id: pointbase
value: 'pointbase'
brief: 'PointBase'
- id: sqlite
value: 'sqlite'
brief: 'SQLite'
- id: sybase
value: 'sybase'
brief: 'Sybase'
- id: teradata
value: 'teradata'
brief: 'Teradata'
- id: vertica
value: 'vertica'
brief: 'Vertica'
- id: h2
value: 'h2'
brief: 'H2'
- id: coldfusion
value: 'coldfusion'
brief: 'ColdFusion IMQ'
- id: cassandra
value: 'cassandra'
brief: 'Apache Cassandra'
- id: hbase
value: 'hbase'
brief: 'Apache HBase'
- id: mongodb
value: 'mongodb'
brief: 'MongoDB'
- id: redis
value: 'redis'
brief: 'Redis'
- id: couchbase
value: 'couchbase'
brief: 'Couchbase'
- id: couchdb
value: 'couchdb'
brief: 'CouchDB'
- id: cosmosdb
value: 'cosmosdb'
brief: 'Microsoft Azure Cosmos DB'
- id: dynamodb
value: 'dynamodb'
brief: 'Amazon DynamoDB'
- id: neo4j
value: 'neo4j'
brief: 'Neo4j'
- id: geode
value: 'geode'
brief: 'Apache Geode'
- id: elasticsearch
value: 'elasticsearch'
brief: 'Elasticsearch'
- id: memcached
value: 'memcached'
brief: 'Memcached'
- id: cockroachdb
value: 'cockroachdb'
brief: 'CockroachDB'
- id: opensearch
value: 'opensearch'
brief: 'OpenSearch'
- id: clickhouse
value: 'clickhouse'
brief: 'ClickHouse'
- id: spanner
value: 'spanner'
brief: 'Cloud Spanner'
- id: trino
value: 'trino'
brief: 'Trino'
- id: connection_string
tag: connection-level
type: string
brief: >
The connection string used to connect to the database.
It is recommended to remove embedded credentials.
examples: 'Server=(localdb)\v11.0;Integrated Security=true;'
- id: user
tag: connection-level
type: string
brief: >
Username for accessing the database.
examples: ['readonly_user', 'reporting_user']
- id: jdbc.driver_classname
tag: connection-level-tech-specific
type: string
brief: >
The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.
examples: ['org.postgresql.Driver', 'com.microsoft.sqlserver.jdbc.SQLServerDriver']
- id: name
tag: call-level
type: string
requirement_level:
conditionally_required: If applicable.
brief: >
This attribute is used to report the name of the database being accessed.
For commands that switch the database, this should be set to the target database
(even if the command fails).
note: >
In some SQL databases, the database name to be used is called "schema name".
In case there are multiple layers that could be considered for database name
(e.g. Oracle instance name and schema name),
the database name to be used is the more specific layer (e.g. Oracle schema name).
examples: [ 'customers', 'main' ]
- id: statement
tag: call-level
type: string
requirement_level:
recommended: >
Should be collected by default only if there is sanitization that excludes sensitive information.
brief: >
The database statement being executed.
examples: ['SELECT * FROM wuser_table', 'SET mykey "WuValue"']
- id: operation
tag: call-level
type: string
requirement_level:
conditionally_required: If `db.statement` is not applicable.
brief: >
The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations)
such as `findAndModify`, or the SQL keyword.
note: >
When setting this to an SQL keyword, it is not recommended to
attempt any client-side parsing of `db.statement` just to get this
property, but it should be set if the operation name is provided by
the library being instrumented.
If the SQL statement has an ambiguous operation, or performs more
than one operation, this value may be omitted.
examples: ['findAndModify', 'HMSET', 'SELECT']
- ref: net.peer.name
tag: connection-level
requirement_level:
conditionally_required: See alternative attributes below.
brief: >
Name of the database host.
- ref: net.peer.port
tag: connection-level
requirement_level:
conditionally_required: If using a port other than the default port for this DBMS and if `net.peer.name` is set.
- ref: net.sock.peer.addr
tag: connection-level
- ref: net.sock.peer.port
tag: connection-level
- ref: net.sock.family
tag: connection-level
- ref: net.sock.peer.name
requirement_level:
recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set.
- ref: net.transport
tag: connection-level
requirement_level:
conditionally_required: If database type is in-process (`"inproc"`), recommended for other database types.
constraints:
- any_of:
- 'net.peer.name'
- 'net.sock.peer.addr'
- id: db.mssql
prefix: db.mssql
type: span
extends: db
brief: >
Connection-level attributes for Microsoft SQL Server
attributes:
- id: instance_name
tag: connection-level-tech-specific
type: string
note: >
If setting a `db.mssql.instance_name`, `net.peer.port` is no longer
required (but still recommended if non-standard).
brief: >
The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
connecting to. This name is used to determine the port of a named instance.
examples: 'MSSQLSERVER'
- id: db.cassandra
prefix: db.cassandra
type: span
extends: db
brief: >
Call-level attributes for Cassandra
attributes:
- id: page_size
type: int
tag: call-level-tech-specific-cassandra
brief: >
The fetch size used for paging, i.e. how many rows will be returned at once.
examples: [5000]
- id: consistency_level
tag: call-level-tech-specific-cassandra
brief: >
The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
type:
members:
- id: all
value: 'all'
- id: each_quorum
value: 'each_quorum'
- id: quorum
value: 'quorum'
- id: local_quorum
value: 'local_quorum'
- id: one
value: 'one'
- id: two
value: 'two'
- id: three
value: 'three'
- id: local_one
value: 'local_one'
- id: any
value: 'any'
- id: serial
value: 'serial'
- id: local_serial
value: 'local_serial'
- id: table
type: string
tag: call-level-tech-specific-cassandra
requirement_level: recommended
brief: The name of the primary table that the operation is acting upon, including the keyspace name (if applicable).
note: >
This mirrors the db.sql.table attribute but references cassandra rather than sql.
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: 'mytable'
- id: idempotence
type: boolean
tag: call-level-tech-specific-cassandra
brief: >
Whether or not the query is idempotent.
- id: speculative_execution_count
type: int
tag: call-level-tech-specific-cassandra
brief: >
The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
examples: [0, 2]
- id: coordinator.id
type: string
tag: call-level-tech-specific-cassandra
brief: >
The ID of the coordinating node for a query.
examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
- id: coordinator.dc
type: string
tag: call-level-tech-specific-cassandra
brief: >
The data center of the coordinating node for a query.
examples: 'us-west-2'
- id: db.redis
prefix: db.redis
type: span
extends: db
brief: >
Call-level attributes for Redis
attributes:
- id: database_index
type: int
requirement_level:
conditionally_required: If other than the default database (`0`).
tag: call-level-tech-specific
brief: >
The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer.
To be used instead of the generic `db.name` attribute.
examples: [0, 1, 15]
- id: db.mongodb
prefix: db.mongodb
type: span
extends: db
brief: >
Call-level attributes for MongoDB
attributes:
- id: collection
type: string
requirement_level: required
tag: call-level-tech-specific
brief: >
The collection being accessed within the database stated in `db.name`.
examples: [ 'customers', 'products' ]
- id: db.sql
prefix: 'db.sql'
type: span
extends: 'db'
brief: >
Call-level attributes for SQL databases
attributes:
- id: table
tag: call-level-tech-specific
type: string
requirement_level: recommended
brief: The name of the primary table that the operation is acting upon, including the database name (if applicable).
note: >
It is not recommended to attempt any client-side parsing of
`db.statement` just to get this property, but it should be set if
it is provided by the library being instrumented.
If the operation is acting upon an anonymous table, or more than one table, this
value MUST NOT be set.
examples: ['public.users', 'customers']
- id: db.cosmosdb
type: span
extends: db
prefix: db.cosmosdb
brief: >
Call-level attributes for Cosmos DB.
attributes:
- id: client_id
type: string
brief: Unique Cosmos client instance id.
examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
- id: operation_type
type:
allow_custom_values: true
members:
- id: invalid
value: 'Invalid'
- id: create
value: 'Create'
- id: patch
value: 'Patch'
- id: read
value: 'Read'
- id: read_feed
value: 'ReadFeed'
- id: delete
value: 'Delete'
- id: replace
value: 'Replace'
- id: execute
value: 'Execute'
- id: query
value: 'Query'
- id: head
value: 'Head'
- id: head_feed
value: 'HeadFeed'
- id: upsert
value: 'Upsert'
- id: batch
value: 'Batch'
- id: query_plan
value: 'QueryPlan'
- id: execute_javascript
value: 'ExecuteJavaScript'
brief: CosmosDB Operation Type.
requirement_level:
conditionally_required: when performing one of the operations in this list
- ref: user_agent.original
brief: 'Full user-agent string is generated by Cosmos DB SDK'
note: >
The user-agent value is generated by SDK which is a combination of<br>
`sdk_version` : Current version of SDK. e.g. 'cosmos-netstandard-sdk/3.23.0'<br>
`direct_pkg_version` : Direct package version used by Cosmos DB SDK. e.g. '3.23.1'<br>
`number_of_client_instances` : Number of cosmos client instances created by the application. e.g. '1'<br>
`type_of_machine_architecture` : Machine architecture. e.g. 'X64'<br>
`operating_system` : Operating System. e.g. 'Linux 5.4.0-1098-azure 104 18'<br>
`runtime_framework` : Runtime Framework. e.g. '.NET Core 3.1.32'<br>
`failover_information` : Generated key to determine if region failover enabled.
Format Reg-{D (Disabled discovery)}-S(application region)|L(List of preferred regions)|N(None, user did not configure it).
Default value is "NS".
examples: ['cosmos-netstandard-sdk/3.23.0\|3.23.1\|1\|X64\|Linux 5.4.0-1098-azure 104 18\|.NET Core 3.1.32\|S\|']
- id: connection_mode
type:
allow_custom_values: false
members:
- id: gateway
value: 'gateway'
brief: Gateway (HTTP) connections mode
- id: direct
value: 'direct'
brief: Direct connection.
brief: Cosmos client connection mode.
requirement_level:
conditionally_required: if not `direct` (or pick gw as default)
- id: container
type: string
brief: Cosmos DB container name.
requirement_level:
conditionally_required: if available
examples: 'anystring'
- id: request_content_length
type: int
brief: Request payload size in bytes
- id: status_code
type: int
brief: Cosmos DB status code.
examples: [200, 201]
requirement_level:
conditionally_required: if response was received
- id: sub_status_code
type: int
brief: Cosmos DB sub status code.
examples: [1000, 1002]
requirement_level:
conditionally_required: when response was received and contained sub-code.
- id: request_charge
type: double
brief: RU consumed for that operation
examples: [46.18, 1.0]
requirement_level:
conditionally_required: when available
- id: db.tech
type: span
brief: "Semantic convention group for specific technologies"
constraints:
- include: 'db.cassandra'
- include: 'db.redis'
- include: 'db.mongodb'
- include: 'db.sql'
- include: 'db.cosmosdb'