| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
// Code generated from semantic convention specification. DO NOT EDIT. |
| 5 |
|
| 6 |
package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" |
| 7 |
|
| 8 |
import "go.opentelemetry.io/otel/attribute" |
| 9 |
|
| 10 |
// The shared attributes used to report a single exception associated with a |
| 11 |
// span or log. |
| 12 |
const ( |
| 13 |
// ExceptionTypeKey is the attribute Key conforming to the "exception.type" |
| 14 |
// semantic conventions. It represents the type of the exception (its |
| 15 |
// fully-qualified class name, if applicable). The dynamic type of the |
| 16 |
// exception should be preferred over the static type in languages that |
| 17 |
// support it. |
| 18 |
// |
| 19 |
// Type: string |
| 20 |
// RequirementLevel: Optional |
| 21 |
// Stability: stable |
| 22 |
// Examples: 'java.net.ConnectException', 'OSError' |
| 23 |
ExceptionTypeKey = attribute.Key("exception.type") |
| 24 |
|
| 25 |
// ExceptionMessageKey is the attribute Key conforming to the |
| 26 |
// "exception.message" semantic conventions. It represents the exception |
| 27 |
// message. |
| 28 |
// |
| 29 |
// Type: string |
| 30 |
// RequirementLevel: Optional |
| 31 |
// Stability: stable |
| 32 |
// Examples: 'Division by zero', "Can't convert 'int' object to str |
| 33 |
// implicitly" |
| 34 |
ExceptionMessageKey = attribute.Key("exception.message") |
| 35 |
|
| 36 |
// ExceptionStacktraceKey is the attribute Key conforming to the |
| 37 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace |
| 38 |
// as a string in the natural representation for the language runtime. The |
| 39 |
// representation is to be determined and documented by each language SIG. |
| 40 |
// |
| 41 |
// Type: string |
| 42 |
// RequirementLevel: Optional |
| 43 |
// Stability: stable |
| 44 |
// Examples: 'Exception in thread "main" java.lang.RuntimeException: Test |
| 45 |
// exception\\n at ' |
| 46 |
// 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' |
| 47 |
// 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' |
| 48 |
// 'com.example.GenerateTrace.main(GenerateTrace.java:5)' |
| 49 |
ExceptionStacktraceKey = attribute.Key("exception.stacktrace") |
| 50 |
) |
| 51 |
|
| 52 |
// ExceptionType returns an attribute KeyValue conforming to the |
| 53 |
// "exception.type" semantic conventions. It represents the type of the |
| 54 |
// exception (its fully-qualified class name, if applicable). The dynamic type |
| 55 |
// of the exception should be preferred over the static type in languages that |
| 56 |
// support it. |
| 57 |
func ExceptionType(val string) attribute.KeyValue { |
| 58 |
return ExceptionTypeKey.String(val) |
| 59 |
} |
| 60 |
|
| 61 |
// ExceptionMessage returns an attribute KeyValue conforming to the |
| 62 |
// "exception.message" semantic conventions. It represents the exception |
| 63 |
// message. |
| 64 |
func ExceptionMessage(val string) attribute.KeyValue { |
| 65 |
return ExceptionMessageKey.String(val) |
| 66 |
} |
| 67 |
|
| 68 |
// ExceptionStacktrace returns an attribute KeyValue conforming to the |
| 69 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace as a |
| 70 |
// string in the natural representation for the language runtime. The |
| 71 |
// representation is to be determined and documented by each language SIG. |
| 72 |
func ExceptionStacktrace(val string) attribute.KeyValue { |
| 73 |
return ExceptionStacktraceKey.String(val) |
| 74 |
} |
| 75 |
|
| 76 |
// Attributes for Events represented using Log Records. |
| 77 |
const ( |
| 78 |
// EventNameKey is the attribute Key conforming to the "event.name" |
| 79 |
// semantic conventions. It represents the name identifies the event. |
| 80 |
// |
| 81 |
// Type: string |
| 82 |
// RequirementLevel: Required |
| 83 |
// Stability: stable |
| 84 |
// Examples: 'click', 'exception' |
| 85 |
EventNameKey = attribute.Key("event.name") |
| 86 |
|
| 87 |
// EventDomainKey is the attribute Key conforming to the "event.domain" |
| 88 |
// semantic conventions. It represents the domain identifies the business |
| 89 |
// context for the events. |
| 90 |
// |
| 91 |
// Type: Enum |
| 92 |
// RequirementLevel: Required |
| 93 |
// Stability: stable |
| 94 |
// Note: Events across different domains may have same `event.name`, yet be |
| 95 |
// unrelated events. |
| 96 |
EventDomainKey = attribute.Key("event.domain") |
| 97 |
) |
| 98 |
|
| 99 |
var ( |
| 100 |
// Events from browser apps |
| 101 |
EventDomainBrowser = EventDomainKey.String("browser") |
| 102 |
// Events from mobile apps |
| 103 |
EventDomainDevice = EventDomainKey.String("device") |
| 104 |
// Events from Kubernetes |
| 105 |
EventDomainK8S = EventDomainKey.String("k8s") |
| 106 |
) |
| 107 |
|
| 108 |
// EventName returns an attribute KeyValue conforming to the "event.name" |
| 109 |
// semantic conventions. It represents the name identifies the event. |
| 110 |
func EventName(val string) attribute.KeyValue { |
| 111 |
return EventNameKey.String(val) |
| 112 |
} |
| 113 |
|
| 114 |
// Span attributes used by AWS Lambda (in addition to general `faas` |
| 115 |
// attributes). |
| 116 |
const ( |
| 117 |
// AWSLambdaInvokedARNKey is the attribute Key conforming to the |
| 118 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 119 |
// invoked ARN as provided on the `Context` passed to the function |
| 120 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 121 |
// `/runtime/invocation/next` applicable). |
| 122 |
// |
| 123 |
// Type: string |
| 124 |
// RequirementLevel: Optional |
| 125 |
// Stability: stable |
| 126 |
// Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' |
| 127 |
// Note: This may be different from `faas.id` if an alias is involved. |
| 128 |
AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") |
| 129 |
) |
| 130 |
|
| 131 |
// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the |
| 132 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 133 |
// invoked ARN as provided on the `Context` passed to the function |
| 134 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 135 |
// `/runtime/invocation/next` applicable). |
| 136 |
func AWSLambdaInvokedARN(val string) attribute.KeyValue { |
| 137 |
return AWSLambdaInvokedARNKey.String(val) |
| 138 |
} |
| 139 |
|
| 140 |
// Attributes for CloudEvents. CloudEvents is a specification on how to define |
| 141 |
// event data in a standard way. These attributes can be attached to spans when |
| 142 |
// performing operations with CloudEvents, regardless of the protocol being |
| 143 |
// used. |
| 144 |
const ( |
| 145 |
// CloudeventsEventIDKey is the attribute Key conforming to the |
| 146 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 147 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 148 |
// uniquely identifies the event. |
| 149 |
// |
| 150 |
// Type: string |
| 151 |
// RequirementLevel: Required |
| 152 |
// Stability: stable |
| 153 |
// Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' |
| 154 |
CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") |
| 155 |
|
| 156 |
// CloudeventsEventSourceKey is the attribute Key conforming to the |
| 157 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 158 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 159 |
// identifies the context in which an event happened. |
| 160 |
// |
| 161 |
// Type: string |
| 162 |
// RequirementLevel: Required |
| 163 |
// Stability: stable |
| 164 |
// Examples: 'https://github.com/cloudevents', |
| 165 |
// '/cloudevents/spec/pull/123', 'my-service' |
| 166 |
CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") |
| 167 |
|
| 168 |
// CloudeventsEventSpecVersionKey is the attribute Key conforming to the |
| 169 |
// "cloudevents.event_spec_version" semantic conventions. It represents the |
| 170 |
// [version of the CloudEvents |
| 171 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 172 |
// which the event uses. |
| 173 |
// |
| 174 |
// Type: string |
| 175 |
// RequirementLevel: Optional |
| 176 |
// Stability: stable |
| 177 |
// Examples: '1.0' |
| 178 |
CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") |
| 179 |
|
| 180 |
// CloudeventsEventTypeKey is the attribute Key conforming to the |
| 181 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 182 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 183 |
// contains a value describing the type of event related to the originating |
| 184 |
// occurrence. |
| 185 |
// |
| 186 |
// Type: string |
| 187 |
// RequirementLevel: Optional |
| 188 |
// Stability: stable |
| 189 |
// Examples: 'com.github.pull_request.opened', |
| 190 |
// 'com.example.object.deleted.v2' |
| 191 |
CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") |
| 192 |
|
| 193 |
// CloudeventsEventSubjectKey is the attribute Key conforming to the |
| 194 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 195 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 196 |
// of the event in the context of the event producer (identified by |
| 197 |
// source). |
| 198 |
// |
| 199 |
// Type: string |
| 200 |
// RequirementLevel: Optional |
| 201 |
// Stability: stable |
| 202 |
// Examples: 'mynewfile.jpg' |
| 203 |
CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") |
| 204 |
) |
| 205 |
|
| 206 |
// CloudeventsEventID returns an attribute KeyValue conforming to the |
| 207 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 208 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 209 |
// uniquely identifies the event. |
| 210 |
func CloudeventsEventID(val string) attribute.KeyValue { |
| 211 |
return CloudeventsEventIDKey.String(val) |
| 212 |
} |
| 213 |
|
| 214 |
// CloudeventsEventSource returns an attribute KeyValue conforming to the |
| 215 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 216 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 217 |
// identifies the context in which an event happened. |
| 218 |
func CloudeventsEventSource(val string) attribute.KeyValue { |
| 219 |
return CloudeventsEventSourceKey.String(val) |
| 220 |
} |
| 221 |
|
| 222 |
// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to |
| 223 |
// the "cloudevents.event_spec_version" semantic conventions. It represents the |
| 224 |
// [version of the CloudEvents |
| 225 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 226 |
// which the event uses. |
| 227 |
func CloudeventsEventSpecVersion(val string) attribute.KeyValue { |
| 228 |
return CloudeventsEventSpecVersionKey.String(val) |
| 229 |
} |
| 230 |
|
| 231 |
// CloudeventsEventType returns an attribute KeyValue conforming to the |
| 232 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 233 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 234 |
// contains a value describing the type of event related to the originating |
| 235 |
// occurrence. |
| 236 |
func CloudeventsEventType(val string) attribute.KeyValue { |
| 237 |
return CloudeventsEventTypeKey.String(val) |
| 238 |
} |
| 239 |
|
| 240 |
// CloudeventsEventSubject returns an attribute KeyValue conforming to the |
| 241 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 242 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 243 |
// of the event in the context of the event producer (identified by source). |
| 244 |
func CloudeventsEventSubject(val string) attribute.KeyValue { |
| 245 |
return CloudeventsEventSubjectKey.String(val) |
| 246 |
} |
| 247 |
|
| 248 |
// Semantic conventions for the OpenTracing Shim |
| 249 |
const ( |
| 250 |
// OpentracingRefTypeKey is the attribute Key conforming to the |
| 251 |
// "opentracing.ref_type" semantic conventions. It represents the |
| 252 |
// parent-child Reference type |
| 253 |
// |
| 254 |
// Type: Enum |
| 255 |
// RequirementLevel: Optional |
| 256 |
// Stability: stable |
| 257 |
// Note: The causal relationship between a child Span and a parent Span. |
| 258 |
OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") |
| 259 |
) |
| 260 |
|
| 261 |
var ( |
| 262 |
// The parent Span depends on the child Span in some capacity |
| 263 |
OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") |
| 264 |
// The parent Span does not depend in any way on the result of the child Span |
| 265 |
OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") |
| 266 |
) |
| 267 |
|
| 268 |
// The attributes used to perform database client calls. |
| 269 |
const ( |
| 270 |
// DBSystemKey is the attribute Key conforming to the "db.system" semantic |
| 271 |
// conventions. It represents an identifier for the database management |
| 272 |
// system (DBMS) product being used. See below for a list of well-known |
| 273 |
// identifiers. |
| 274 |
// |
| 275 |
// Type: Enum |
| 276 |
// RequirementLevel: Required |
| 277 |
// Stability: stable |
| 278 |
DBSystemKey = attribute.Key("db.system") |
| 279 |
|
| 280 |
// DBConnectionStringKey is the attribute Key conforming to the |
| 281 |
// "db.connection_string" semantic conventions. It represents the |
| 282 |
// connection string used to connect to the database. It is recommended to |
| 283 |
// remove embedded credentials. |
| 284 |
// |
| 285 |
// Type: string |
| 286 |
// RequirementLevel: Optional |
| 287 |
// Stability: stable |
| 288 |
// Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' |
| 289 |
DBConnectionStringKey = attribute.Key("db.connection_string") |
| 290 |
|
| 291 |
// DBUserKey is the attribute Key conforming to the "db.user" semantic |
| 292 |
// conventions. It represents the username for accessing the database. |
| 293 |
// |
| 294 |
// Type: string |
| 295 |
// RequirementLevel: Optional |
| 296 |
// Stability: stable |
| 297 |
// Examples: 'readonly_user', 'reporting_user' |
| 298 |
DBUserKey = attribute.Key("db.user") |
| 299 |
|
| 300 |
// DBJDBCDriverClassnameKey is the attribute Key conforming to the |
| 301 |
// "db.jdbc.driver_classname" semantic conventions. It represents the |
| 302 |
// fully-qualified class name of the [Java Database Connectivity |
| 303 |
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) |
| 304 |
// driver used to connect. |
| 305 |
// |
| 306 |
// Type: string |
| 307 |
// RequirementLevel: Optional |
| 308 |
// Stability: stable |
| 309 |
// Examples: 'org.postgresql.Driver', |
| 310 |
// 'com.microsoft.sqlserver.jdbc.SQLServerDriver' |
| 311 |
DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") |
| 312 |
|
| 313 |
// DBNameKey is the attribute Key conforming to the "db.name" semantic |
| 314 |
// conventions. It represents the this attribute is used to report the name |
| 315 |
// of the database being accessed. For commands that switch the database, |
| 316 |
// this should be set to the target database (even if the command fails). |
| 317 |
// |
| 318 |
// Type: string |
| 319 |
// RequirementLevel: ConditionallyRequired (If applicable.) |
| 320 |
// Stability: stable |
| 321 |
// Examples: 'customers', 'main' |
| 322 |
// Note: In some SQL databases, the database name to be used is called |
| 323 |
// "schema name". In case there are multiple layers that could be |
| 324 |
// considered for database name (e.g. Oracle instance name and schema |
| 325 |
// name), the database name to be used is the more specific layer (e.g. |
| 326 |
// Oracle schema name). |
| 327 |
DBNameKey = attribute.Key("db.name") |
| 328 |
|
| 329 |
// DBStatementKey is the attribute Key conforming to the "db.statement" |
| 330 |
// semantic conventions. It represents the database statement being |
| 331 |
// executed. |
| 332 |
// |
| 333 |
// Type: string |
| 334 |
// RequirementLevel: ConditionallyRequired (If applicable and not |
| 335 |
// explicitly disabled via instrumentation configuration.) |
| 336 |
// Stability: stable |
| 337 |
// Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' |
| 338 |
// Note: The value may be sanitized to exclude sensitive information. |
| 339 |
DBStatementKey = attribute.Key("db.statement") |
| 340 |
|
| 341 |
// DBOperationKey is the attribute Key conforming to the "db.operation" |
| 342 |
// semantic conventions. It represents the name of the operation being |
| 343 |
// executed, e.g. the [MongoDB command |
| 344 |
// name](https://docs.mongodb.com/manual/reference/command/#database-operations) |
| 345 |
// such as `findAndModify`, or the SQL keyword. |
| 346 |
// |
| 347 |
// Type: string |
| 348 |
// RequirementLevel: ConditionallyRequired (If `db.statement` is not |
| 349 |
// applicable.) |
| 350 |
// Stability: stable |
| 351 |
// Examples: 'findAndModify', 'HMSET', 'SELECT' |
| 352 |
// Note: When setting this to an SQL keyword, it is not recommended to |
| 353 |
// attempt any client-side parsing of `db.statement` just to get this |
| 354 |
// property, but it should be set if the operation name is provided by the |
| 355 |
// library being instrumented. If the SQL statement has an ambiguous |
| 356 |
// operation, or performs more than one operation, this value may be |
| 357 |
// omitted. |
| 358 |
DBOperationKey = attribute.Key("db.operation") |
| 359 |
) |
| 360 |
|
| 361 |
var ( |
| 362 |
// Some other SQL database. Fallback only. See notes |
| 363 |
DBSystemOtherSQL = DBSystemKey.String("other_sql") |
| 364 |
// Microsoft SQL Server |
| 365 |
DBSystemMSSQL = DBSystemKey.String("mssql") |
| 366 |
// MySQL |
| 367 |
DBSystemMySQL = DBSystemKey.String("mysql") |
| 368 |
// Oracle Database |
| 369 |
DBSystemOracle = DBSystemKey.String("oracle") |
| 370 |
// IBM DB2 |
| 371 |
DBSystemDB2 = DBSystemKey.String("db2") |
| 372 |
// PostgreSQL |
| 373 |
DBSystemPostgreSQL = DBSystemKey.String("postgresql") |
| 374 |
// Amazon Redshift |
| 375 |
DBSystemRedshift = DBSystemKey.String("redshift") |
| 376 |
// Apache Hive |
| 377 |
DBSystemHive = DBSystemKey.String("hive") |
| 378 |
// Cloudscape |
| 379 |
DBSystemCloudscape = DBSystemKey.String("cloudscape") |
| 380 |
// HyperSQL DataBase |
| 381 |
DBSystemHSQLDB = DBSystemKey.String("hsqldb") |
| 382 |
// Progress Database |
| 383 |
DBSystemProgress = DBSystemKey.String("progress") |
| 384 |
// SAP MaxDB |
| 385 |
DBSystemMaxDB = DBSystemKey.String("maxdb") |
| 386 |
// SAP HANA |
| 387 |
DBSystemHanaDB = DBSystemKey.String("hanadb") |
| 388 |
// Ingres |
| 389 |
DBSystemIngres = DBSystemKey.String("ingres") |
| 390 |
// FirstSQL |
| 391 |
DBSystemFirstSQL = DBSystemKey.String("firstsql") |
| 392 |
// EnterpriseDB |
| 393 |
DBSystemEDB = DBSystemKey.String("edb") |
| 394 |
// InterSystems Caché |
| 395 |
DBSystemCache = DBSystemKey.String("cache") |
| 396 |
// Adabas (Adaptable Database System) |
| 397 |
DBSystemAdabas = DBSystemKey.String("adabas") |
| 398 |
// Firebird |
| 399 |
DBSystemFirebird = DBSystemKey.String("firebird") |
| 400 |
// Apache Derby |
| 401 |
DBSystemDerby = DBSystemKey.String("derby") |
| 402 |
// FileMaker |
| 403 |
DBSystemFilemaker = DBSystemKey.String("filemaker") |
| 404 |
// Informix |
| 405 |
DBSystemInformix = DBSystemKey.String("informix") |
| 406 |
// InstantDB |
| 407 |
DBSystemInstantDB = DBSystemKey.String("instantdb") |
| 408 |
// InterBase |
| 409 |
DBSystemInterbase = DBSystemKey.String("interbase") |
| 410 |
// MariaDB |
| 411 |
DBSystemMariaDB = DBSystemKey.String("mariadb") |
| 412 |
// Netezza |
| 413 |
DBSystemNetezza = DBSystemKey.String("netezza") |
| 414 |
// Pervasive PSQL |
| 415 |
DBSystemPervasive = DBSystemKey.String("pervasive") |
| 416 |
// PointBase |
| 417 |
DBSystemPointbase = DBSystemKey.String("pointbase") |
| 418 |
// SQLite |
| 419 |
DBSystemSqlite = DBSystemKey.String("sqlite") |
| 420 |
// Sybase |
| 421 |
DBSystemSybase = DBSystemKey.String("sybase") |
| 422 |
// Teradata |
| 423 |
DBSystemTeradata = DBSystemKey.String("teradata") |
| 424 |
// Vertica |
| 425 |
DBSystemVertica = DBSystemKey.String("vertica") |
| 426 |
// H2 |
| 427 |
DBSystemH2 = DBSystemKey.String("h2") |
| 428 |
// ColdFusion IMQ |
| 429 |
DBSystemColdfusion = DBSystemKey.String("coldfusion") |
| 430 |
// Apache Cassandra |
| 431 |
DBSystemCassandra = DBSystemKey.String("cassandra") |
| 432 |
// Apache HBase |
| 433 |
DBSystemHBase = DBSystemKey.String("hbase") |
| 434 |
// MongoDB |
| 435 |
DBSystemMongoDB = DBSystemKey.String("mongodb") |
| 436 |
// Redis |
| 437 |
DBSystemRedis = DBSystemKey.String("redis") |
| 438 |
// Couchbase |
| 439 |
DBSystemCouchbase = DBSystemKey.String("couchbase") |
| 440 |
// CouchDB |
| 441 |
DBSystemCouchDB = DBSystemKey.String("couchdb") |
| 442 |
// Microsoft Azure Cosmos DB |
| 443 |
DBSystemCosmosDB = DBSystemKey.String("cosmosdb") |
| 444 |
// Amazon DynamoDB |
| 445 |
DBSystemDynamoDB = DBSystemKey.String("dynamodb") |
| 446 |
// Neo4j |
| 447 |
DBSystemNeo4j = DBSystemKey.String("neo4j") |
| 448 |
// Apache Geode |
| 449 |
DBSystemGeode = DBSystemKey.String("geode") |
| 450 |
// Elasticsearch |
| 451 |
DBSystemElasticsearch = DBSystemKey.String("elasticsearch") |
| 452 |
// Memcached |
| 453 |
DBSystemMemcached = DBSystemKey.String("memcached") |
| 454 |
// CockroachDB |
| 455 |
DBSystemCockroachdb = DBSystemKey.String("cockroachdb") |
| 456 |
// OpenSearch |
| 457 |
DBSystemOpensearch = DBSystemKey.String("opensearch") |
| 458 |
// ClickHouse |
| 459 |
DBSystemClickhouse = DBSystemKey.String("clickhouse") |
| 460 |
) |
| 461 |
|
| 462 |
// DBConnectionString returns an attribute KeyValue conforming to the |
| 463 |
// "db.connection_string" semantic conventions. It represents the connection |
| 464 |
// string used to connect to the database. It is recommended to remove embedded |
| 465 |
// credentials. |
| 466 |
func DBConnectionString(val string) attribute.KeyValue { |
| 467 |
return DBConnectionStringKey.String(val) |
| 468 |
} |
| 469 |
|
| 470 |
// DBUser returns an attribute KeyValue conforming to the "db.user" semantic |
| 471 |
// conventions. It represents the username for accessing the database. |
| 472 |
func DBUser(val string) attribute.KeyValue { |
| 473 |
return DBUserKey.String(val) |
| 474 |
} |
| 475 |
|
| 476 |
// DBJDBCDriverClassname returns an attribute KeyValue conforming to the |
| 477 |
// "db.jdbc.driver_classname" semantic conventions. It represents the |
| 478 |
// fully-qualified class name of the [Java Database Connectivity |
| 479 |
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver |
| 480 |
// used to connect. |
| 481 |
func DBJDBCDriverClassname(val string) attribute.KeyValue { |
| 482 |
return DBJDBCDriverClassnameKey.String(val) |
| 483 |
} |
| 484 |
|
| 485 |
// DBName returns an attribute KeyValue conforming to the "db.name" semantic |
| 486 |
// conventions. It represents the this attribute is used to report the name of |
| 487 |
// the database being accessed. For commands that switch the database, this |
| 488 |
// should be set to the target database (even if the command fails). |
| 489 |
func DBName(val string) attribute.KeyValue { |
| 490 |
return DBNameKey.String(val) |
| 491 |
} |
| 492 |
|
| 493 |
// DBStatement returns an attribute KeyValue conforming to the |
| 494 |
// "db.statement" semantic conventions. It represents the database statement |
| 495 |
// being executed. |
| 496 |
func DBStatement(val string) attribute.KeyValue { |
| 497 |
return DBStatementKey.String(val) |
| 498 |
} |
| 499 |
|
| 500 |
// DBOperation returns an attribute KeyValue conforming to the |
| 501 |
// "db.operation" semantic conventions. It represents the name of the operation |
| 502 |
// being executed, e.g. the [MongoDB command |
| 503 |
// name](https://docs.mongodb.com/manual/reference/command/#database-operations) |
| 504 |
// such as `findAndModify`, or the SQL keyword. |
| 505 |
func DBOperation(val string) attribute.KeyValue { |
| 506 |
return DBOperationKey.String(val) |
| 507 |
} |
| 508 |
|
| 509 |
// Connection-level attributes for Microsoft SQL Server |
| 510 |
const ( |
| 511 |
// DBMSSQLInstanceNameKey is the attribute Key conforming to the |
| 512 |
// "db.mssql.instance_name" semantic conventions. It represents the |
| 513 |
// Microsoft SQL Server [instance |
| 514 |
// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) |
| 515 |
// connecting to. This name is used to determine the port of a named |
| 516 |
// instance. |
| 517 |
// |
| 518 |
// Type: string |
| 519 |
// RequirementLevel: Optional |
| 520 |
// Stability: stable |
| 521 |
// Examples: 'MSSQLSERVER' |
| 522 |
// Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no |
| 523 |
// longer required (but still recommended if non-standard). |
| 524 |
DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") |
| 525 |
) |
| 526 |
|
| 527 |
// DBMSSQLInstanceName returns an attribute KeyValue conforming to the |
| 528 |
// "db.mssql.instance_name" semantic conventions. It represents the Microsoft |
| 529 |
// SQL Server [instance |
| 530 |
// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) |
| 531 |
// connecting to. This name is used to determine the port of a named instance. |
| 532 |
func DBMSSQLInstanceName(val string) attribute.KeyValue { |
| 533 |
return DBMSSQLInstanceNameKey.String(val) |
| 534 |
} |
| 535 |
|
| 536 |
// Call-level attributes for Cassandra |
| 537 |
const ( |
| 538 |
// DBCassandraPageSizeKey is the attribute Key conforming to the |
| 539 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch |
| 540 |
// size used for paging, i.e. how many rows will be returned at once. |
| 541 |
// |
| 542 |
// Type: int |
| 543 |
// RequirementLevel: Optional |
| 544 |
// Stability: stable |
| 545 |
// Examples: 5000 |
| 546 |
DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") |
| 547 |
|
| 548 |
// DBCassandraConsistencyLevelKey is the attribute Key conforming to the |
| 549 |
// "db.cassandra.consistency_level" semantic conventions. It represents the |
| 550 |
// consistency level of the query. Based on consistency values from |
| 551 |
// [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). |
| 552 |
// |
| 553 |
// Type: Enum |
| 554 |
// RequirementLevel: Optional |
| 555 |
// Stability: stable |
| 556 |
DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") |
| 557 |
|
| 558 |
// DBCassandraTableKey is the attribute Key conforming to the |
| 559 |
// "db.cassandra.table" semantic conventions. It represents the name of the |
| 560 |
// primary table that the operation is acting upon, including the keyspace |
| 561 |
// name (if applicable). |
| 562 |
// |
| 563 |
// Type: string |
| 564 |
// RequirementLevel: Recommended |
| 565 |
// Stability: stable |
| 566 |
// Examples: 'mytable' |
| 567 |
// Note: This mirrors the db.sql.table attribute but references cassandra |
| 568 |
// rather than sql. It is not recommended to attempt any client-side |
| 569 |
// parsing of `db.statement` just to get this property, but it should be |
| 570 |
// set if it is provided by the library being instrumented. If the |
| 571 |
// operation is acting upon an anonymous table, or more than one table, |
| 572 |
// this value MUST NOT be set. |
| 573 |
DBCassandraTableKey = attribute.Key("db.cassandra.table") |
| 574 |
|
| 575 |
// DBCassandraIdempotenceKey is the attribute Key conforming to the |
| 576 |
// "db.cassandra.idempotence" semantic conventions. It represents the |
| 577 |
// whether or not the query is idempotent. |
| 578 |
// |
| 579 |
// Type: boolean |
| 580 |
// RequirementLevel: Optional |
| 581 |
// Stability: stable |
| 582 |
DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") |
| 583 |
|
| 584 |
// DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming |
| 585 |
// to the "db.cassandra.speculative_execution_count" semantic conventions. |
| 586 |
// It represents the number of times a query was speculatively executed. |
| 587 |
// Not set or `0` if the query was not executed speculatively. |
| 588 |
// |
| 589 |
// Type: int |
| 590 |
// RequirementLevel: Optional |
| 591 |
// Stability: stable |
| 592 |
// Examples: 0, 2 |
| 593 |
DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") |
| 594 |
|
| 595 |
// DBCassandraCoordinatorIDKey is the attribute Key conforming to the |
| 596 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID |
| 597 |
// of the coordinating node for a query. |
| 598 |
// |
| 599 |
// Type: string |
| 600 |
// RequirementLevel: Optional |
| 601 |
// Stability: stable |
| 602 |
// Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' |
| 603 |
DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") |
| 604 |
|
| 605 |
// DBCassandraCoordinatorDCKey is the attribute Key conforming to the |
| 606 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the |
| 607 |
// data center of the coordinating node for a query. |
| 608 |
// |
| 609 |
// Type: string |
| 610 |
// RequirementLevel: Optional |
| 611 |
// Stability: stable |
| 612 |
// Examples: 'us-west-2' |
| 613 |
DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") |
| 614 |
) |
| 615 |
|
| 616 |
var ( |
| 617 |
// all |
| 618 |
DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") |
| 619 |
// each_quorum |
| 620 |
DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") |
| 621 |
// quorum |
| 622 |
DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") |
| 623 |
// local_quorum |
| 624 |
DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") |
| 625 |
// one |
| 626 |
DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") |
| 627 |
// two |
| 628 |
DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") |
| 629 |
// three |
| 630 |
DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") |
| 631 |
// local_one |
| 632 |
DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") |
| 633 |
// any |
| 634 |
DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") |
| 635 |
// serial |
| 636 |
DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") |
| 637 |
// local_serial |
| 638 |
DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") |
| 639 |
) |
| 640 |
|
| 641 |
// DBCassandraPageSize returns an attribute KeyValue conforming to the |
| 642 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch size |
| 643 |
// used for paging, i.e. how many rows will be returned at once. |
| 644 |
func DBCassandraPageSize(val int) attribute.KeyValue { |
| 645 |
return DBCassandraPageSizeKey.Int(val) |
| 646 |
} |
| 647 |
|
| 648 |
// DBCassandraTable returns an attribute KeyValue conforming to the |
| 649 |
// "db.cassandra.table" semantic conventions. It represents the name of the |
| 650 |
// primary table that the operation is acting upon, including the keyspace name |
| 651 |
// (if applicable). |
| 652 |
func DBCassandraTable(val string) attribute.KeyValue { |
| 653 |
return DBCassandraTableKey.String(val) |
| 654 |
} |
| 655 |
|
| 656 |
// DBCassandraIdempotence returns an attribute KeyValue conforming to the |
| 657 |
// "db.cassandra.idempotence" semantic conventions. It represents the whether |
| 658 |
// or not the query is idempotent. |
| 659 |
func DBCassandraIdempotence(val bool) attribute.KeyValue { |
| 660 |
return DBCassandraIdempotenceKey.Bool(val) |
| 661 |
} |
| 662 |
|
| 663 |
// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue |
| 664 |
// conforming to the "db.cassandra.speculative_execution_count" semantic |
| 665 |
// conventions. It represents the number of times a query was speculatively |
| 666 |
// executed. Not set or `0` if the query was not executed speculatively. |
| 667 |
func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { |
| 668 |
return DBCassandraSpeculativeExecutionCountKey.Int(val) |
| 669 |
} |
| 670 |
|
| 671 |
// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the |
| 672 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of |
| 673 |
// the coordinating node for a query. |
| 674 |
func DBCassandraCoordinatorID(val string) attribute.KeyValue { |
| 675 |
return DBCassandraCoordinatorIDKey.String(val) |
| 676 |
} |
| 677 |
|
| 678 |
// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the |
| 679 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the data |
| 680 |
// center of the coordinating node for a query. |
| 681 |
func DBCassandraCoordinatorDC(val string) attribute.KeyValue { |
| 682 |
return DBCassandraCoordinatorDCKey.String(val) |
| 683 |
} |
| 684 |
|
| 685 |
// Call-level attributes for Redis |
| 686 |
const ( |
| 687 |
// DBRedisDBIndexKey is the attribute Key conforming to the |
| 688 |
// "db.redis.database_index" semantic conventions. It represents the index |
| 689 |
// of the database being accessed as used in the [`SELECT` |
| 690 |
// command](https://redis.io/commands/select), provided as an integer. To |
| 691 |
// be used instead of the generic `db.name` attribute. |
| 692 |
// |
| 693 |
// Type: int |
| 694 |
// RequirementLevel: ConditionallyRequired (If other than the default |
| 695 |
// database (`0`).) |
| 696 |
// Stability: stable |
| 697 |
// Examples: 0, 1, 15 |
| 698 |
DBRedisDBIndexKey = attribute.Key("db.redis.database_index") |
| 699 |
) |
| 700 |
|
| 701 |
// DBRedisDBIndex returns an attribute KeyValue conforming to the |
| 702 |
// "db.redis.database_index" semantic conventions. It represents the index of |
| 703 |
// the database being accessed as used in the [`SELECT` |
| 704 |
// command](https://redis.io/commands/select), provided as an integer. To be |
| 705 |
// used instead of the generic `db.name` attribute. |
| 706 |
func DBRedisDBIndex(val int) attribute.KeyValue { |
| 707 |
return DBRedisDBIndexKey.Int(val) |
| 708 |
} |
| 709 |
|
| 710 |
// Call-level attributes for MongoDB |
| 711 |
const ( |
| 712 |
// DBMongoDBCollectionKey is the attribute Key conforming to the |
| 713 |
// "db.mongodb.collection" semantic conventions. It represents the |
| 714 |
// collection being accessed within the database stated in `db.name`. |
| 715 |
// |
| 716 |
// Type: string |
| 717 |
// RequirementLevel: Required |
| 718 |
// Stability: stable |
| 719 |
// Examples: 'customers', 'products' |
| 720 |
DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") |
| 721 |
) |
| 722 |
|
| 723 |
// DBMongoDBCollection returns an attribute KeyValue conforming to the |
| 724 |
// "db.mongodb.collection" semantic conventions. It represents the collection |
| 725 |
// being accessed within the database stated in `db.name`. |
| 726 |
func DBMongoDBCollection(val string) attribute.KeyValue { |
| 727 |
return DBMongoDBCollectionKey.String(val) |
| 728 |
} |
| 729 |
|
| 730 |
// Call-level attributes for SQL databases |
| 731 |
const ( |
| 732 |
// DBSQLTableKey is the attribute Key conforming to the "db.sql.table" |
| 733 |
// semantic conventions. It represents the name of the primary table that |
| 734 |
// the operation is acting upon, including the database name (if |
| 735 |
// applicable). |
| 736 |
// |
| 737 |
// Type: string |
| 738 |
// RequirementLevel: Recommended |
| 739 |
// Stability: stable |
| 740 |
// Examples: 'public.users', 'customers' |
| 741 |
// Note: It is not recommended to attempt any client-side parsing of |
| 742 |
// `db.statement` just to get this property, but it should be set if it is |
| 743 |
// provided by the library being instrumented. If the operation is acting |
| 744 |
// upon an anonymous table, or more than one table, this value MUST NOT be |
| 745 |
// set. |
| 746 |
DBSQLTableKey = attribute.Key("db.sql.table") |
| 747 |
) |
| 748 |
|
| 749 |
// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" |
| 750 |
// semantic conventions. It represents the name of the primary table that the |
| 751 |
// operation is acting upon, including the database name (if applicable). |
| 752 |
func DBSQLTable(val string) attribute.KeyValue { |
| 753 |
return DBSQLTableKey.String(val) |
| 754 |
} |
| 755 |
|
| 756 |
// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's |
| 757 |
// concepts. |
| 758 |
const ( |
| 759 |
// OtelStatusCodeKey is the attribute Key conforming to the |
| 760 |
// "otel.status_code" semantic conventions. It represents the name of the |
| 761 |
// code, either "OK" or "ERROR". MUST NOT be set if the status code is |
| 762 |
// UNSET. |
| 763 |
// |
| 764 |
// Type: Enum |
| 765 |
// RequirementLevel: Optional |
| 766 |
// Stability: stable |
| 767 |
OtelStatusCodeKey = attribute.Key("otel.status_code") |
| 768 |
|
| 769 |
// OtelStatusDescriptionKey is the attribute Key conforming to the |
| 770 |
// "otel.status_description" semantic conventions. It represents the |
| 771 |
// description of the Status if it has a value, otherwise not set. |
| 772 |
// |
| 773 |
// Type: string |
| 774 |
// RequirementLevel: Optional |
| 775 |
// Stability: stable |
| 776 |
// Examples: 'resource not found' |
| 777 |
OtelStatusDescriptionKey = attribute.Key("otel.status_description") |
| 778 |
) |
| 779 |
|
| 780 |
var ( |
| 781 |
// The operation has been validated by an Application developer or Operator to have completed successfully |
| 782 |
OtelStatusCodeOk = OtelStatusCodeKey.String("OK") |
| 783 |
// The operation contains an error |
| 784 |
OtelStatusCodeError = OtelStatusCodeKey.String("ERROR") |
| 785 |
) |
| 786 |
|
| 787 |
// OtelStatusDescription returns an attribute KeyValue conforming to the |
| 788 |
// "otel.status_description" semantic conventions. It represents the |
| 789 |
// description of the Status if it has a value, otherwise not set. |
| 790 |
func OtelStatusDescription(val string) attribute.KeyValue { |
| 791 |
return OtelStatusDescriptionKey.String(val) |
| 792 |
} |
| 793 |
|
| 794 |
// This semantic convention describes an instance of a function that runs |
| 795 |
// without provisioning or managing of servers (also known as serverless |
| 796 |
// functions or Function as a Service (FaaS)) with spans. |
| 797 |
const ( |
| 798 |
// FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" |
| 799 |
// semantic conventions. It represents the type of the trigger which caused |
| 800 |
// this function execution. |
| 801 |
// |
| 802 |
// Type: Enum |
| 803 |
// RequirementLevel: Optional |
| 804 |
// Stability: stable |
| 805 |
// Note: For the server/consumer span on the incoming side, |
| 806 |
// `faas.trigger` MUST be set. |
| 807 |
// |
| 808 |
// Clients invoking FaaS instances usually cannot set `faas.trigger`, |
| 809 |
// since they would typically need to look in the payload to determine |
| 810 |
// the event type. If clients set it, it should be the same as the |
| 811 |
// trigger that corresponding incoming would have (i.e., this has |
| 812 |
// nothing to do with the underlying transport used to make the API |
| 813 |
// call to invoke the lambda, which is often HTTP). |
| 814 |
FaaSTriggerKey = attribute.Key("faas.trigger") |
| 815 |
|
| 816 |
// FaaSExecutionKey is the attribute Key conforming to the "faas.execution" |
| 817 |
// semantic conventions. It represents the execution ID of the current |
| 818 |
// function execution. |
| 819 |
// |
| 820 |
// Type: string |
| 821 |
// RequirementLevel: Optional |
| 822 |
// Stability: stable |
| 823 |
// Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' |
| 824 |
FaaSExecutionKey = attribute.Key("faas.execution") |
| 825 |
) |
| 826 |
|
| 827 |
var ( |
| 828 |
// A response to some data source operation such as a database or filesystem read/write |
| 829 |
FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") |
| 830 |
// To provide an answer to an inbound HTTP request |
| 831 |
FaaSTriggerHTTP = FaaSTriggerKey.String("http") |
| 832 |
// A function is set to be executed when messages are sent to a messaging system |
| 833 |
FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") |
| 834 |
// A function is scheduled to be executed regularly |
| 835 |
FaaSTriggerTimer = FaaSTriggerKey.String("timer") |
| 836 |
// If none of the others apply |
| 837 |
FaaSTriggerOther = FaaSTriggerKey.String("other") |
| 838 |
) |
| 839 |
|
| 840 |
// FaaSExecution returns an attribute KeyValue conforming to the |
| 841 |
// "faas.execution" semantic conventions. It represents the execution ID of the |
| 842 |
// current function execution. |
| 843 |
func FaaSExecution(val string) attribute.KeyValue { |
| 844 |
return FaaSExecutionKey.String(val) |
| 845 |
} |
| 846 |
|
| 847 |
// Semantic Convention for FaaS triggered as a response to some data source |
| 848 |
// operation such as a database or filesystem read/write. |
| 849 |
const ( |
| 850 |
// FaaSDocumentCollectionKey is the attribute Key conforming to the |
| 851 |
// "faas.document.collection" semantic conventions. It represents the name |
| 852 |
// of the source on which the triggering operation was performed. For |
| 853 |
// example, in Cloud Storage or S3 corresponds to the bucket name, and in |
| 854 |
// Cosmos DB to the database name. |
| 855 |
// |
| 856 |
// Type: string |
| 857 |
// RequirementLevel: Required |
| 858 |
// Stability: stable |
| 859 |
// Examples: 'myBucketName', 'myDBName' |
| 860 |
FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") |
| 861 |
|
| 862 |
// FaaSDocumentOperationKey is the attribute Key conforming to the |
| 863 |
// "faas.document.operation" semantic conventions. It represents the |
| 864 |
// describes the type of the operation that was performed on the data. |
| 865 |
// |
| 866 |
// Type: Enum |
| 867 |
// RequirementLevel: Required |
| 868 |
// Stability: stable |
| 869 |
FaaSDocumentOperationKey = attribute.Key("faas.document.operation") |
| 870 |
|
| 871 |
// FaaSDocumentTimeKey is the attribute Key conforming to the |
| 872 |
// "faas.document.time" semantic conventions. It represents a string |
| 873 |
// containing the time when the data was accessed in the [ISO |
| 874 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 875 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 876 |
// |
| 877 |
// Type: string |
| 878 |
// RequirementLevel: Optional |
| 879 |
// Stability: stable |
| 880 |
// Examples: '2020-01-23T13:47:06Z' |
| 881 |
FaaSDocumentTimeKey = attribute.Key("faas.document.time") |
| 882 |
|
| 883 |
// FaaSDocumentNameKey is the attribute Key conforming to the |
| 884 |
// "faas.document.name" semantic conventions. It represents the document |
| 885 |
// name/table subjected to the operation. For example, in Cloud Storage or |
| 886 |
// S3 is the name of the file, and in Cosmos DB the table name. |
| 887 |
// |
| 888 |
// Type: string |
| 889 |
// RequirementLevel: Optional |
| 890 |
// Stability: stable |
| 891 |
// Examples: 'myFile.txt', 'myTableName' |
| 892 |
FaaSDocumentNameKey = attribute.Key("faas.document.name") |
| 893 |
) |
| 894 |
|
| 895 |
var ( |
| 896 |
// When a new object is created |
| 897 |
FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") |
| 898 |
// When an object is modified |
| 899 |
FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") |
| 900 |
// When an object is deleted |
| 901 |
FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") |
| 902 |
) |
| 903 |
|
| 904 |
// FaaSDocumentCollection returns an attribute KeyValue conforming to the |
| 905 |
// "faas.document.collection" semantic conventions. It represents the name of |
| 906 |
// the source on which the triggering operation was performed. For example, in |
| 907 |
// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the |
| 908 |
// database name. |
| 909 |
func FaaSDocumentCollection(val string) attribute.KeyValue { |
| 910 |
return FaaSDocumentCollectionKey.String(val) |
| 911 |
} |
| 912 |
|
| 913 |
// FaaSDocumentTime returns an attribute KeyValue conforming to the |
| 914 |
// "faas.document.time" semantic conventions. It represents a string containing |
| 915 |
// the time when the data was accessed in the [ISO |
| 916 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 917 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 918 |
func FaaSDocumentTime(val string) attribute.KeyValue { |
| 919 |
return FaaSDocumentTimeKey.String(val) |
| 920 |
} |
| 921 |
|
| 922 |
// FaaSDocumentName returns an attribute KeyValue conforming to the |
| 923 |
// "faas.document.name" semantic conventions. It represents the document |
| 924 |
// name/table subjected to the operation. For example, in Cloud Storage or S3 |
| 925 |
// is the name of the file, and in Cosmos DB the table name. |
| 926 |
func FaaSDocumentName(val string) attribute.KeyValue { |
| 927 |
return FaaSDocumentNameKey.String(val) |
| 928 |
} |
| 929 |
|
| 930 |
// Semantic Convention for FaaS scheduled to be executed regularly. |
| 931 |
const ( |
| 932 |
// FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic |
| 933 |
// conventions. It represents a string containing the function invocation |
| 934 |
// time in the [ISO |
| 935 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 936 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 937 |
// |
| 938 |
// Type: string |
| 939 |
// RequirementLevel: Optional |
| 940 |
// Stability: stable |
| 941 |
// Examples: '2020-01-23T13:47:06Z' |
| 942 |
FaaSTimeKey = attribute.Key("faas.time") |
| 943 |
|
| 944 |
// FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic |
| 945 |
// conventions. It represents a string containing the schedule period as |
| 946 |
// [Cron |
| 947 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 948 |
// |
| 949 |
// Type: string |
| 950 |
// RequirementLevel: Optional |
| 951 |
// Stability: stable |
| 952 |
// Examples: '0/5 * * * ? *' |
| 953 |
FaaSCronKey = attribute.Key("faas.cron") |
| 954 |
) |
| 955 |
|
| 956 |
// FaaSTime returns an attribute KeyValue conforming to the "faas.time" |
| 957 |
// semantic conventions. It represents a string containing the function |
| 958 |
// invocation time in the [ISO |
| 959 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 960 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 961 |
func FaaSTime(val string) attribute.KeyValue { |
| 962 |
return FaaSTimeKey.String(val) |
| 963 |
} |
| 964 |
|
| 965 |
// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" |
| 966 |
// semantic conventions. It represents a string containing the schedule period |
| 967 |
// as [Cron |
| 968 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 969 |
func FaaSCron(val string) attribute.KeyValue { |
| 970 |
return FaaSCronKey.String(val) |
| 971 |
} |
| 972 |
|
| 973 |
// Contains additional attributes for incoming FaaS spans. |
| 974 |
const ( |
| 975 |
// FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" |
| 976 |
// semantic conventions. It represents a boolean that is true if the |
| 977 |
// serverless function is executed for the first time (aka cold-start). |
| 978 |
// |
| 979 |
// Type: boolean |
| 980 |
// RequirementLevel: Optional |
| 981 |
// Stability: stable |
| 982 |
FaaSColdstartKey = attribute.Key("faas.coldstart") |
| 983 |
) |
| 984 |
|
| 985 |
// FaaSColdstart returns an attribute KeyValue conforming to the |
| 986 |
// "faas.coldstart" semantic conventions. It represents a boolean that is true |
| 987 |
// if the serverless function is executed for the first time (aka cold-start). |
| 988 |
func FaaSColdstart(val bool) attribute.KeyValue { |
| 989 |
return FaaSColdstartKey.Bool(val) |
| 990 |
} |
| 991 |
|
| 992 |
// Contains additional attributes for outgoing FaaS spans. |
| 993 |
const ( |
| 994 |
// FaaSInvokedNameKey is the attribute Key conforming to the |
| 995 |
// "faas.invoked_name" semantic conventions. It represents the name of the |
| 996 |
// invoked function. |
| 997 |
// |
| 998 |
// Type: string |
| 999 |
// RequirementLevel: Required |
| 1000 |
// Stability: stable |
| 1001 |
// Examples: 'my-function' |
| 1002 |
// Note: SHOULD be equal to the `faas.name` resource attribute of the |
| 1003 |
// invoked function. |
| 1004 |
FaaSInvokedNameKey = attribute.Key("faas.invoked_name") |
| 1005 |
|
| 1006 |
// FaaSInvokedProviderKey is the attribute Key conforming to the |
| 1007 |
// "faas.invoked_provider" semantic conventions. It represents the cloud |
| 1008 |
// provider of the invoked function. |
| 1009 |
// |
| 1010 |
// Type: Enum |
| 1011 |
// RequirementLevel: Required |
| 1012 |
// Stability: stable |
| 1013 |
// Note: SHOULD be equal to the `cloud.provider` resource attribute of the |
| 1014 |
// invoked function. |
| 1015 |
FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") |
| 1016 |
|
| 1017 |
// FaaSInvokedRegionKey is the attribute Key conforming to the |
| 1018 |
// "faas.invoked_region" semantic conventions. It represents the cloud |
| 1019 |
// region of the invoked function. |
| 1020 |
// |
| 1021 |
// Type: string |
| 1022 |
// RequirementLevel: ConditionallyRequired (For some cloud providers, like |
| 1023 |
// AWS or GCP, the region in which a function is hosted is essential to |
| 1024 |
// uniquely identify the function and also part of its endpoint. Since it's |
| 1025 |
// part of the endpoint being called, the region is always known to |
| 1026 |
// clients. In these cases, `faas.invoked_region` MUST be set accordingly. |
| 1027 |
// If the region is unknown to the client or not required for identifying |
| 1028 |
// the invoked function, setting `faas.invoked_region` is optional.) |
| 1029 |
// Stability: stable |
| 1030 |
// Examples: 'eu-central-1' |
| 1031 |
// Note: SHOULD be equal to the `cloud.region` resource attribute of the |
| 1032 |
// invoked function. |
| 1033 |
FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") |
| 1034 |
) |
| 1035 |
|
| 1036 |
var ( |
| 1037 |
// Alibaba Cloud |
| 1038 |
FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") |
| 1039 |
// Amazon Web Services |
| 1040 |
FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") |
| 1041 |
// Microsoft Azure |
| 1042 |
FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") |
| 1043 |
// Google Cloud Platform |
| 1044 |
FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") |
| 1045 |
// Tencent Cloud |
| 1046 |
FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") |
| 1047 |
) |
| 1048 |
|
| 1049 |
// FaaSInvokedName returns an attribute KeyValue conforming to the |
| 1050 |
// "faas.invoked_name" semantic conventions. It represents the name of the |
| 1051 |
// invoked function. |
| 1052 |
func FaaSInvokedName(val string) attribute.KeyValue { |
| 1053 |
return FaaSInvokedNameKey.String(val) |
| 1054 |
} |
| 1055 |
|
| 1056 |
// FaaSInvokedRegion returns an attribute KeyValue conforming to the |
| 1057 |
// "faas.invoked_region" semantic conventions. It represents the cloud region |
| 1058 |
// of the invoked function. |
| 1059 |
func FaaSInvokedRegion(val string) attribute.KeyValue { |
| 1060 |
return FaaSInvokedRegionKey.String(val) |
| 1061 |
} |
| 1062 |
|
| 1063 |
// These attributes may be used for any network related operation. |
| 1064 |
const ( |
| 1065 |
// NetTransportKey is the attribute Key conforming to the "net.transport" |
| 1066 |
// semantic conventions. It represents the transport protocol used. See |
| 1067 |
// note below. |
| 1068 |
// |
| 1069 |
// Type: Enum |
| 1070 |
// RequirementLevel: Optional |
| 1071 |
// Stability: stable |
| 1072 |
NetTransportKey = attribute.Key("net.transport") |
| 1073 |
|
| 1074 |
// NetAppProtocolNameKey is the attribute Key conforming to the |
| 1075 |
// "net.app.protocol.name" semantic conventions. It represents the |
| 1076 |
// application layer protocol used. The value SHOULD be normalized to |
| 1077 |
// lowercase. |
| 1078 |
// |
| 1079 |
// Type: string |
| 1080 |
// RequirementLevel: Optional |
| 1081 |
// Stability: stable |
| 1082 |
// Examples: 'amqp', 'http', 'mqtt' |
| 1083 |
NetAppProtocolNameKey = attribute.Key("net.app.protocol.name") |
| 1084 |
|
| 1085 |
// NetAppProtocolVersionKey is the attribute Key conforming to the |
| 1086 |
// "net.app.protocol.version" semantic conventions. It represents the |
| 1087 |
// version of the application layer protocol used. See note below. |
| 1088 |
// |
| 1089 |
// Type: string |
| 1090 |
// RequirementLevel: Optional |
| 1091 |
// Stability: stable |
| 1092 |
// Examples: '3.1.1' |
| 1093 |
// Note: `net.app.protocol.version` refers to the version of the protocol |
| 1094 |
// used and might be different from the protocol client's version. If the |
| 1095 |
// HTTP client used has a version of `0.27.2`, but sends HTTP version |
| 1096 |
// `1.1`, this attribute should be set to `1.1`. |
| 1097 |
NetAppProtocolVersionKey = attribute.Key("net.app.protocol.version") |
| 1098 |
|
| 1099 |
// NetSockPeerNameKey is the attribute Key conforming to the |
| 1100 |
// "net.sock.peer.name" semantic conventions. It represents the remote |
| 1101 |
// socket peer name. |
| 1102 |
// |
| 1103 |
// Type: string |
| 1104 |
// RequirementLevel: Recommended (If available and different from |
| 1105 |
// `net.peer.name` and if `net.sock.peer.addr` is set.) |
| 1106 |
// Stability: stable |
| 1107 |
// Examples: 'proxy.example.com' |
| 1108 |
NetSockPeerNameKey = attribute.Key("net.sock.peer.name") |
| 1109 |
|
| 1110 |
// NetSockPeerAddrKey is the attribute Key conforming to the |
| 1111 |
// "net.sock.peer.addr" semantic conventions. It represents the remote |
| 1112 |
// socket peer address: IPv4 or IPv6 for internet protocols, path for local |
| 1113 |
// communication, |
| 1114 |
// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). |
| 1115 |
// |
| 1116 |
// Type: string |
| 1117 |
// RequirementLevel: Optional |
| 1118 |
// Stability: stable |
| 1119 |
// Examples: '127.0.0.1', '/tmp/mysql.sock' |
| 1120 |
NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") |
| 1121 |
|
| 1122 |
// NetSockPeerPortKey is the attribute Key conforming to the |
| 1123 |
// "net.sock.peer.port" semantic conventions. It represents the remote |
| 1124 |
// socket peer port. |
| 1125 |
// |
| 1126 |
// Type: int |
| 1127 |
// RequirementLevel: Recommended (If defined for the address family and if |
| 1128 |
// different than `net.peer.port` and if `net.sock.peer.addr` is set.) |
| 1129 |
// Stability: stable |
| 1130 |
// Examples: 16456 |
| 1131 |
NetSockPeerPortKey = attribute.Key("net.sock.peer.port") |
| 1132 |
|
| 1133 |
// NetSockFamilyKey is the attribute Key conforming to the |
| 1134 |
// "net.sock.family" semantic conventions. It represents the protocol |
| 1135 |
// [address |
| 1136 |
// family](https://man7.org/linux/man-pages/man7/address_families.7.html) |
| 1137 |
// which is used for communication. |
| 1138 |
// |
| 1139 |
// Type: Enum |
| 1140 |
// RequirementLevel: ConditionallyRequired (If different than `inet` and if |
| 1141 |
// any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers |
| 1142 |
// of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in |
| 1143 |
// `net.sock.peer.addr` if `net.sock.family` is not set. This is to support |
| 1144 |
// instrumentations that follow previous versions of this document.) |
| 1145 |
// Stability: stable |
| 1146 |
// Examples: 'inet6', 'bluetooth' |
| 1147 |
NetSockFamilyKey = attribute.Key("net.sock.family") |
| 1148 |
|
| 1149 |
// NetPeerNameKey is the attribute Key conforming to the "net.peer.name" |
| 1150 |
// semantic conventions. It represents the logical remote hostname, see |
| 1151 |
// note below. |
| 1152 |
// |
| 1153 |
// Type: string |
| 1154 |
// RequirementLevel: Optional |
| 1155 |
// Stability: stable |
| 1156 |
// Examples: 'example.com' |
| 1157 |
// Note: `net.peer.name` SHOULD NOT be set if capturing it would require an |
| 1158 |
// extra DNS lookup. |
| 1159 |
NetPeerNameKey = attribute.Key("net.peer.name") |
| 1160 |
|
| 1161 |
// NetPeerPortKey is the attribute Key conforming to the "net.peer.port" |
| 1162 |
// semantic conventions. It represents the logical remote port number |
| 1163 |
// |
| 1164 |
// Type: int |
| 1165 |
// RequirementLevel: Optional |
| 1166 |
// Stability: stable |
| 1167 |
// Examples: 80, 8080, 443 |
| 1168 |
NetPeerPortKey = attribute.Key("net.peer.port") |
| 1169 |
|
| 1170 |
// NetHostNameKey is the attribute Key conforming to the "net.host.name" |
| 1171 |
// semantic conventions. It represents the logical local hostname or |
| 1172 |
// similar, see note below. |
| 1173 |
// |
| 1174 |
// Type: string |
| 1175 |
// RequirementLevel: Optional |
| 1176 |
// Stability: stable |
| 1177 |
// Examples: 'localhost' |
| 1178 |
NetHostNameKey = attribute.Key("net.host.name") |
| 1179 |
|
| 1180 |
// NetHostPortKey is the attribute Key conforming to the "net.host.port" |
| 1181 |
// semantic conventions. It represents the logical local port number, |
| 1182 |
// preferably the one that the peer used to connect |
| 1183 |
// |
| 1184 |
// Type: int |
| 1185 |
// RequirementLevel: Optional |
| 1186 |
// Stability: stable |
| 1187 |
// Examples: 8080 |
| 1188 |
NetHostPortKey = attribute.Key("net.host.port") |
| 1189 |
|
| 1190 |
// NetSockHostAddrKey is the attribute Key conforming to the |
| 1191 |
// "net.sock.host.addr" semantic conventions. It represents the local |
| 1192 |
// socket address. Useful in case of a multi-IP host. |
| 1193 |
// |
| 1194 |
// Type: string |
| 1195 |
// RequirementLevel: Optional |
| 1196 |
// Stability: stable |
| 1197 |
// Examples: '192.168.0.1' |
| 1198 |
NetSockHostAddrKey = attribute.Key("net.sock.host.addr") |
| 1199 |
|
| 1200 |
// NetSockHostPortKey is the attribute Key conforming to the |
| 1201 |
// "net.sock.host.port" semantic conventions. It represents the local |
| 1202 |
// socket port number. |
| 1203 |
// |
| 1204 |
// Type: int |
| 1205 |
// RequirementLevel: Recommended (If defined for the address family and if |
| 1206 |
// different than `net.host.port` and if `net.sock.host.addr` is set.) |
| 1207 |
// Stability: stable |
| 1208 |
// Examples: 35555 |
| 1209 |
NetSockHostPortKey = attribute.Key("net.sock.host.port") |
| 1210 |
|
| 1211 |
// NetHostConnectionTypeKey is the attribute Key conforming to the |
| 1212 |
// "net.host.connection.type" semantic conventions. It represents the |
| 1213 |
// internet connection type currently being used by the host. |
| 1214 |
// |
| 1215 |
// Type: Enum |
| 1216 |
// RequirementLevel: Optional |
| 1217 |
// Stability: stable |
| 1218 |
// Examples: 'wifi' |
| 1219 |
NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") |
| 1220 |
|
| 1221 |
// NetHostConnectionSubtypeKey is the attribute Key conforming to the |
| 1222 |
// "net.host.connection.subtype" semantic conventions. It represents the |
| 1223 |
// this describes more details regarding the connection.type. It may be the |
| 1224 |
// type of cell technology connection, but it could be used for describing |
| 1225 |
// details about a wifi connection. |
| 1226 |
// |
| 1227 |
// Type: Enum |
| 1228 |
// RequirementLevel: Optional |
| 1229 |
// Stability: stable |
| 1230 |
// Examples: 'LTE' |
| 1231 |
NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") |
| 1232 |
|
| 1233 |
// NetHostCarrierNameKey is the attribute Key conforming to the |
| 1234 |
// "net.host.carrier.name" semantic conventions. It represents the name of |
| 1235 |
// the mobile carrier. |
| 1236 |
// |
| 1237 |
// Type: string |
| 1238 |
// RequirementLevel: Optional |
| 1239 |
// Stability: stable |
| 1240 |
// Examples: 'sprint' |
| 1241 |
NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") |
| 1242 |
|
| 1243 |
// NetHostCarrierMccKey is the attribute Key conforming to the |
| 1244 |
// "net.host.carrier.mcc" semantic conventions. It represents the mobile |
| 1245 |
// carrier country code. |
| 1246 |
// |
| 1247 |
// Type: string |
| 1248 |
// RequirementLevel: Optional |
| 1249 |
// Stability: stable |
| 1250 |
// Examples: '310' |
| 1251 |
NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") |
| 1252 |
|
| 1253 |
// NetHostCarrierMncKey is the attribute Key conforming to the |
| 1254 |
// "net.host.carrier.mnc" semantic conventions. It represents the mobile |
| 1255 |
// carrier network code. |
| 1256 |
// |
| 1257 |
// Type: string |
| 1258 |
// RequirementLevel: Optional |
| 1259 |
// Stability: stable |
| 1260 |
// Examples: '001' |
| 1261 |
NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") |
| 1262 |
|
| 1263 |
// NetHostCarrierIccKey is the attribute Key conforming to the |
| 1264 |
// "net.host.carrier.icc" semantic conventions. It represents the ISO |
| 1265 |
// 3166-1 alpha-2 2-character country code associated with the mobile |
| 1266 |
// carrier network. |
| 1267 |
// |
| 1268 |
// Type: string |
| 1269 |
// RequirementLevel: Optional |
| 1270 |
// Stability: stable |
| 1271 |
// Examples: 'DE' |
| 1272 |
NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") |
| 1273 |
) |
| 1274 |
|
| 1275 |
var ( |
| 1276 |
// ip_tcp |
| 1277 |
NetTransportTCP = NetTransportKey.String("ip_tcp") |
| 1278 |
// ip_udp |
| 1279 |
NetTransportUDP = NetTransportKey.String("ip_udp") |
| 1280 |
// Named or anonymous pipe. See note below |
| 1281 |
NetTransportPipe = NetTransportKey.String("pipe") |
| 1282 |
// In-process communication |
| 1283 |
NetTransportInProc = NetTransportKey.String("inproc") |
| 1284 |
// Something else (non IP-based) |
| 1285 |
NetTransportOther = NetTransportKey.String("other") |
| 1286 |
) |
| 1287 |
|
| 1288 |
var ( |
| 1289 |
// IPv4 address |
| 1290 |
NetSockFamilyInet = NetSockFamilyKey.String("inet") |
| 1291 |
// IPv6 address |
| 1292 |
NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") |
| 1293 |
// Unix domain socket path |
| 1294 |
NetSockFamilyUnix = NetSockFamilyKey.String("unix") |
| 1295 |
) |
| 1296 |
|
| 1297 |
var ( |
| 1298 |
// wifi |
| 1299 |
NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") |
| 1300 |
// wired |
| 1301 |
NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") |
| 1302 |
// cell |
| 1303 |
NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") |
| 1304 |
// unavailable |
| 1305 |
NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") |
| 1306 |
// unknown |
| 1307 |
NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") |
| 1308 |
) |
| 1309 |
|
| 1310 |
var ( |
| 1311 |
// GPRS |
| 1312 |
NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") |
| 1313 |
// EDGE |
| 1314 |
NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") |
| 1315 |
// UMTS |
| 1316 |
NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") |
| 1317 |
// CDMA |
| 1318 |
NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") |
| 1319 |
// EVDO Rel. 0 |
| 1320 |
NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") |
| 1321 |
// EVDO Rev. A |
| 1322 |
NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") |
| 1323 |
// CDMA2000 1XRTT |
| 1324 |
NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") |
| 1325 |
// HSDPA |
| 1326 |
NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") |
| 1327 |
// HSUPA |
| 1328 |
NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") |
| 1329 |
// HSPA |
| 1330 |
NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") |
| 1331 |
// IDEN |
| 1332 |
NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") |
| 1333 |
// EVDO Rev. B |
| 1334 |
NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") |
| 1335 |
// LTE |
| 1336 |
NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") |
| 1337 |
// EHRPD |
| 1338 |
NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") |
| 1339 |
// HSPAP |
| 1340 |
NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") |
| 1341 |
// GSM |
| 1342 |
NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") |
| 1343 |
// TD-SCDMA |
| 1344 |
NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") |
| 1345 |
// IWLAN |
| 1346 |
NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") |
| 1347 |
// 5G NR (New Radio) |
| 1348 |
NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") |
| 1349 |
// 5G NRNSA (New Radio Non-Standalone) |
| 1350 |
NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") |
| 1351 |
// LTE CA |
| 1352 |
NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") |
| 1353 |
) |
| 1354 |
|
| 1355 |
// NetAppProtocolName returns an attribute KeyValue conforming to the |
| 1356 |
// "net.app.protocol.name" semantic conventions. It represents the application |
| 1357 |
// layer protocol used. The value SHOULD be normalized to lowercase. |
| 1358 |
func NetAppProtocolName(val string) attribute.KeyValue { |
| 1359 |
return NetAppProtocolNameKey.String(val) |
| 1360 |
} |
| 1361 |
|
| 1362 |
// NetAppProtocolVersion returns an attribute KeyValue conforming to the |
| 1363 |
// "net.app.protocol.version" semantic conventions. It represents the version |
| 1364 |
// of the application layer protocol used. See note below. |
| 1365 |
func NetAppProtocolVersion(val string) attribute.KeyValue { |
| 1366 |
return NetAppProtocolVersionKey.String(val) |
| 1367 |
} |
| 1368 |
|
| 1369 |
// NetSockPeerName returns an attribute KeyValue conforming to the |
| 1370 |
// "net.sock.peer.name" semantic conventions. It represents the remote socket |
| 1371 |
// peer name. |
| 1372 |
func NetSockPeerName(val string) attribute.KeyValue { |
| 1373 |
return NetSockPeerNameKey.String(val) |
| 1374 |
} |
| 1375 |
|
| 1376 |
// NetSockPeerAddr returns an attribute KeyValue conforming to the |
| 1377 |
// "net.sock.peer.addr" semantic conventions. It represents the remote socket |
| 1378 |
// peer address: IPv4 or IPv6 for internet protocols, path for local |
| 1379 |
// communication, |
| 1380 |
// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). |
| 1381 |
func NetSockPeerAddr(val string) attribute.KeyValue { |
| 1382 |
return NetSockPeerAddrKey.String(val) |
| 1383 |
} |
| 1384 |
|
| 1385 |
// NetSockPeerPort returns an attribute KeyValue conforming to the |
| 1386 |
// "net.sock.peer.port" semantic conventions. It represents the remote socket |
| 1387 |
// peer port. |
| 1388 |
func NetSockPeerPort(val int) attribute.KeyValue { |
| 1389 |
return NetSockPeerPortKey.Int(val) |
| 1390 |
} |
| 1391 |
|
| 1392 |
// NetPeerName returns an attribute KeyValue conforming to the |
| 1393 |
// "net.peer.name" semantic conventions. It represents the logical remote |
| 1394 |
// hostname, see note below. |
| 1395 |
func NetPeerName(val string) attribute.KeyValue { |
| 1396 |
return NetPeerNameKey.String(val) |
| 1397 |
} |
| 1398 |
|
| 1399 |
// NetPeerPort returns an attribute KeyValue conforming to the |
| 1400 |
// "net.peer.port" semantic conventions. It represents the logical remote port |
| 1401 |
// number |
| 1402 |
func NetPeerPort(val int) attribute.KeyValue { |
| 1403 |
return NetPeerPortKey.Int(val) |
| 1404 |
} |
| 1405 |
|
| 1406 |
// NetHostName returns an attribute KeyValue conforming to the |
| 1407 |
// "net.host.name" semantic conventions. It represents the logical local |
| 1408 |
// hostname or similar, see note below. |
| 1409 |
func NetHostName(val string) attribute.KeyValue { |
| 1410 |
return NetHostNameKey.String(val) |
| 1411 |
} |
| 1412 |
|
| 1413 |
// NetHostPort returns an attribute KeyValue conforming to the |
| 1414 |
// "net.host.port" semantic conventions. It represents the logical local port |
| 1415 |
// number, preferably the one that the peer used to connect |
| 1416 |
func NetHostPort(val int) attribute.KeyValue { |
| 1417 |
return NetHostPortKey.Int(val) |
| 1418 |
} |
| 1419 |
|
| 1420 |
// NetSockHostAddr returns an attribute KeyValue conforming to the |
| 1421 |
// "net.sock.host.addr" semantic conventions. It represents the local socket |
| 1422 |
// address. Useful in case of a multi-IP host. |
| 1423 |
func NetSockHostAddr(val string) attribute.KeyValue { |
| 1424 |
return NetSockHostAddrKey.String(val) |
| 1425 |
} |
| 1426 |
|
| 1427 |
// NetSockHostPort returns an attribute KeyValue conforming to the |
| 1428 |
// "net.sock.host.port" semantic conventions. It represents the local socket |
| 1429 |
// port number. |
| 1430 |
func NetSockHostPort(val int) attribute.KeyValue { |
| 1431 |
return NetSockHostPortKey.Int(val) |
| 1432 |
} |
| 1433 |
|
| 1434 |
// NetHostCarrierName returns an attribute KeyValue conforming to the |
| 1435 |
// "net.host.carrier.name" semantic conventions. It represents the name of the |
| 1436 |
// mobile carrier. |
| 1437 |
func NetHostCarrierName(val string) attribute.KeyValue { |
| 1438 |
return NetHostCarrierNameKey.String(val) |
| 1439 |
} |
| 1440 |
|
| 1441 |
// NetHostCarrierMcc returns an attribute KeyValue conforming to the |
| 1442 |
// "net.host.carrier.mcc" semantic conventions. It represents the mobile |
| 1443 |
// carrier country code. |
| 1444 |
func NetHostCarrierMcc(val string) attribute.KeyValue { |
| 1445 |
return NetHostCarrierMccKey.String(val) |
| 1446 |
} |
| 1447 |
|
| 1448 |
// NetHostCarrierMnc returns an attribute KeyValue conforming to the |
| 1449 |
// "net.host.carrier.mnc" semantic conventions. It represents the mobile |
| 1450 |
// carrier network code. |
| 1451 |
func NetHostCarrierMnc(val string) attribute.KeyValue { |
| 1452 |
return NetHostCarrierMncKey.String(val) |
| 1453 |
} |
| 1454 |
|
| 1455 |
// NetHostCarrierIcc returns an attribute KeyValue conforming to the |
| 1456 |
// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1 |
| 1457 |
// alpha-2 2-character country code associated with the mobile carrier network. |
| 1458 |
func NetHostCarrierIcc(val string) attribute.KeyValue { |
| 1459 |
return NetHostCarrierIccKey.String(val) |
| 1460 |
} |
| 1461 |
|
| 1462 |
// Operations that access some remote service. |
| 1463 |
const ( |
| 1464 |
// PeerServiceKey is the attribute Key conforming to the "peer.service" |
| 1465 |
// semantic conventions. It represents the |
| 1466 |
// [`service.name`](../../resource/semantic_conventions/README.md#service) |
| 1467 |
// of the remote service. SHOULD be equal to the actual `service.name` |
| 1468 |
// resource attribute of the remote service if any. |
| 1469 |
// |
| 1470 |
// Type: string |
| 1471 |
// RequirementLevel: Optional |
| 1472 |
// Stability: stable |
| 1473 |
// Examples: 'AuthTokenCache' |
| 1474 |
PeerServiceKey = attribute.Key("peer.service") |
| 1475 |
) |
| 1476 |
|
| 1477 |
// PeerService returns an attribute KeyValue conforming to the |
| 1478 |
// "peer.service" semantic conventions. It represents the |
| 1479 |
// [`service.name`](../../resource/semantic_conventions/README.md#service) of |
| 1480 |
// the remote service. SHOULD be equal to the actual `service.name` resource |
| 1481 |
// attribute of the remote service if any. |
| 1482 |
func PeerService(val string) attribute.KeyValue { |
| 1483 |
return PeerServiceKey.String(val) |
| 1484 |
} |
| 1485 |
|
| 1486 |
// These attributes may be used for any operation with an authenticated and/or |
| 1487 |
// authorized enduser. |
| 1488 |
const ( |
| 1489 |
// EnduserIDKey is the attribute Key conforming to the "enduser.id" |
| 1490 |
// semantic conventions. It represents the username or client_id extracted |
| 1491 |
// from the access token or |
| 1492 |
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header |
| 1493 |
// in the inbound request from outside the system. |
| 1494 |
// |
| 1495 |
// Type: string |
| 1496 |
// RequirementLevel: Optional |
| 1497 |
// Stability: stable |
| 1498 |
// Examples: 'username' |
| 1499 |
EnduserIDKey = attribute.Key("enduser.id") |
| 1500 |
|
| 1501 |
// EnduserRoleKey is the attribute Key conforming to the "enduser.role" |
| 1502 |
// semantic conventions. It represents the actual/assumed role the client |
| 1503 |
// is making the request under extracted from token or application security |
| 1504 |
// context. |
| 1505 |
// |
| 1506 |
// Type: string |
| 1507 |
// RequirementLevel: Optional |
| 1508 |
// Stability: stable |
| 1509 |
// Examples: 'admin' |
| 1510 |
EnduserRoleKey = attribute.Key("enduser.role") |
| 1511 |
|
| 1512 |
// EnduserScopeKey is the attribute Key conforming to the "enduser.scope" |
| 1513 |
// semantic conventions. It represents the scopes or granted authorities |
| 1514 |
// the client currently possesses extracted from token or application |
| 1515 |
// security context. The value would come from the scope associated with an |
| 1516 |
// [OAuth 2.0 Access |
| 1517 |
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute |
| 1518 |
// value in a [SAML 2.0 |
| 1519 |
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). |
| 1520 |
// |
| 1521 |
// Type: string |
| 1522 |
// RequirementLevel: Optional |
| 1523 |
// Stability: stable |
| 1524 |
// Examples: 'read:message, write:files' |
| 1525 |
EnduserScopeKey = attribute.Key("enduser.scope") |
| 1526 |
) |
| 1527 |
|
| 1528 |
// EnduserID returns an attribute KeyValue conforming to the "enduser.id" |
| 1529 |
// semantic conventions. It represents the username or client_id extracted from |
| 1530 |
// the access token or |
| 1531 |
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in |
| 1532 |
// the inbound request from outside the system. |
| 1533 |
func EnduserID(val string) attribute.KeyValue { |
| 1534 |
return EnduserIDKey.String(val) |
| 1535 |
} |
| 1536 |
|
| 1537 |
// EnduserRole returns an attribute KeyValue conforming to the |
| 1538 |
// "enduser.role" semantic conventions. It represents the actual/assumed role |
| 1539 |
// the client is making the request under extracted from token or application |
| 1540 |
// security context. |
| 1541 |
func EnduserRole(val string) attribute.KeyValue { |
| 1542 |
return EnduserRoleKey.String(val) |
| 1543 |
} |
| 1544 |
|
| 1545 |
// EnduserScope returns an attribute KeyValue conforming to the |
| 1546 |
// "enduser.scope" semantic conventions. It represents the scopes or granted |
| 1547 |
// authorities the client currently possesses extracted from token or |
| 1548 |
// application security context. The value would come from the scope associated |
| 1549 |
// with an [OAuth 2.0 Access |
| 1550 |
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute |
| 1551 |
// value in a [SAML 2.0 |
| 1552 |
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). |
| 1553 |
func EnduserScope(val string) attribute.KeyValue { |
| 1554 |
return EnduserScopeKey.String(val) |
| 1555 |
} |
| 1556 |
|
| 1557 |
// These attributes may be used for any operation to store information about a |
| 1558 |
// thread that started a span. |
| 1559 |
const ( |
| 1560 |
// ThreadIDKey is the attribute Key conforming to the "thread.id" semantic |
| 1561 |
// conventions. It represents the current "managed" thread ID (as opposed |
| 1562 |
// to OS thread ID). |
| 1563 |
// |
| 1564 |
// Type: int |
| 1565 |
// RequirementLevel: Optional |
| 1566 |
// Stability: stable |
| 1567 |
// Examples: 42 |
| 1568 |
ThreadIDKey = attribute.Key("thread.id") |
| 1569 |
|
| 1570 |
// ThreadNameKey is the attribute Key conforming to the "thread.name" |
| 1571 |
// semantic conventions. It represents the current thread name. |
| 1572 |
// |
| 1573 |
// Type: string |
| 1574 |
// RequirementLevel: Optional |
| 1575 |
// Stability: stable |
| 1576 |
// Examples: 'main' |
| 1577 |
ThreadNameKey = attribute.Key("thread.name") |
| 1578 |
) |
| 1579 |
|
| 1580 |
// ThreadID returns an attribute KeyValue conforming to the "thread.id" |
| 1581 |
// semantic conventions. It represents the current "managed" thread ID (as |
| 1582 |
// opposed to OS thread ID). |
| 1583 |
func ThreadID(val int) attribute.KeyValue { |
| 1584 |
return ThreadIDKey.Int(val) |
| 1585 |
} |
| 1586 |
|
| 1587 |
// ThreadName returns an attribute KeyValue conforming to the "thread.name" |
| 1588 |
// semantic conventions. It represents the current thread name. |
| 1589 |
func ThreadName(val string) attribute.KeyValue { |
| 1590 |
return ThreadNameKey.String(val) |
| 1591 |
} |
| 1592 |
|
| 1593 |
// These attributes allow to report this unit of code and therefore to provide |
| 1594 |
// more context about the span. |
| 1595 |
const ( |
| 1596 |
// CodeFunctionKey is the attribute Key conforming to the "code.function" |
| 1597 |
// semantic conventions. It represents the method or function name, or |
| 1598 |
// equivalent (usually rightmost part of the code unit's name). |
| 1599 |
// |
| 1600 |
// Type: string |
| 1601 |
// RequirementLevel: Optional |
| 1602 |
// Stability: stable |
| 1603 |
// Examples: 'serveRequest' |
| 1604 |
CodeFunctionKey = attribute.Key("code.function") |
| 1605 |
|
| 1606 |
// CodeNamespaceKey is the attribute Key conforming to the "code.namespace" |
| 1607 |
// semantic conventions. It represents the "namespace" within which |
| 1608 |
// `code.function` is defined. Usually the qualified class or module name, |
| 1609 |
// such that `code.namespace` + some separator + `code.function` form a |
| 1610 |
// unique identifier for the code unit. |
| 1611 |
// |
| 1612 |
// Type: string |
| 1613 |
// RequirementLevel: Optional |
| 1614 |
// Stability: stable |
| 1615 |
// Examples: 'com.example.MyHTTPService' |
| 1616 |
CodeNamespaceKey = attribute.Key("code.namespace") |
| 1617 |
|
| 1618 |
// CodeFilepathKey is the attribute Key conforming to the "code.filepath" |
| 1619 |
// semantic conventions. It represents the source code file name that |
| 1620 |
// identifies the code unit as uniquely as possible (preferably an absolute |
| 1621 |
// file path). |
| 1622 |
// |
| 1623 |
// Type: string |
| 1624 |
// RequirementLevel: Optional |
| 1625 |
// Stability: stable |
| 1626 |
// Examples: '/usr/local/MyApplication/content_root/app/index.php' |
| 1627 |
CodeFilepathKey = attribute.Key("code.filepath") |
| 1628 |
|
| 1629 |
// CodeLineNumberKey is the attribute Key conforming to the "code.lineno" |
| 1630 |
// semantic conventions. It represents the line number in `code.filepath` |
| 1631 |
// best representing the operation. It SHOULD point within the code unit |
| 1632 |
// named in `code.function`. |
| 1633 |
// |
| 1634 |
// Type: int |
| 1635 |
// RequirementLevel: Optional |
| 1636 |
// Stability: stable |
| 1637 |
// Examples: 42 |
| 1638 |
CodeLineNumberKey = attribute.Key("code.lineno") |
| 1639 |
|
| 1640 |
// CodeColumnKey is the attribute Key conforming to the "code.column" |
| 1641 |
// semantic conventions. It represents the column number in `code.filepath` |
| 1642 |
// best representing the operation. It SHOULD point within the code unit |
| 1643 |
// named in `code.function`. |
| 1644 |
// |
| 1645 |
// Type: int |
| 1646 |
// RequirementLevel: Optional |
| 1647 |
// Stability: stable |
| 1648 |
// Examples: 16 |
| 1649 |
CodeColumnKey = attribute.Key("code.column") |
| 1650 |
) |
| 1651 |
|
| 1652 |
// CodeFunction returns an attribute KeyValue conforming to the |
| 1653 |
// "code.function" semantic conventions. It represents the method or function |
| 1654 |
// name, or equivalent (usually rightmost part of the code unit's name). |
| 1655 |
func CodeFunction(val string) attribute.KeyValue { |
| 1656 |
return CodeFunctionKey.String(val) |
| 1657 |
} |
| 1658 |
|
| 1659 |
// CodeNamespace returns an attribute KeyValue conforming to the |
| 1660 |
// "code.namespace" semantic conventions. It represents the "namespace" within |
| 1661 |
// which `code.function` is defined. Usually the qualified class or module |
| 1662 |
// name, such that `code.namespace` + some separator + `code.function` form a |
| 1663 |
// unique identifier for the code unit. |
| 1664 |
func CodeNamespace(val string) attribute.KeyValue { |
| 1665 |
return CodeNamespaceKey.String(val) |
| 1666 |
} |
| 1667 |
|
| 1668 |
// CodeFilepath returns an attribute KeyValue conforming to the |
| 1669 |
// "code.filepath" semantic conventions. It represents the source code file |
| 1670 |
// name that identifies the code unit as uniquely as possible (preferably an |
| 1671 |
// absolute file path). |
| 1672 |
func CodeFilepath(val string) attribute.KeyValue { |
| 1673 |
return CodeFilepathKey.String(val) |
| 1674 |
} |
| 1675 |
|
| 1676 |
// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" |
| 1677 |
// semantic conventions. It represents the line number in `code.filepath` best |
| 1678 |
// representing the operation. It SHOULD point within the code unit named in |
| 1679 |
// `code.function`. |
| 1680 |
func CodeLineNumber(val int) attribute.KeyValue { |
| 1681 |
return CodeLineNumberKey.Int(val) |
| 1682 |
} |
| 1683 |
|
| 1684 |
// CodeColumn returns an attribute KeyValue conforming to the "code.column" |
| 1685 |
// semantic conventions. It represents the column number in `code.filepath` |
| 1686 |
// best representing the operation. It SHOULD point within the code unit named |
| 1687 |
// in `code.function`. |
| 1688 |
func CodeColumn(val int) attribute.KeyValue { |
| 1689 |
return CodeColumnKey.Int(val) |
| 1690 |
} |
| 1691 |
|
| 1692 |
// Semantic conventions for HTTP client and server Spans. |
| 1693 |
const ( |
| 1694 |
// HTTPMethodKey is the attribute Key conforming to the "http.method" |
| 1695 |
// semantic conventions. It represents the hTTP request method. |
| 1696 |
// |
| 1697 |
// Type: string |
| 1698 |
// RequirementLevel: Required |
| 1699 |
// Stability: stable |
| 1700 |
// Examples: 'GET', 'POST', 'HEAD' |
| 1701 |
HTTPMethodKey = attribute.Key("http.method") |
| 1702 |
|
| 1703 |
// HTTPStatusCodeKey is the attribute Key conforming to the |
| 1704 |
// "http.status_code" semantic conventions. It represents the [HTTP |
| 1705 |
// response status code](https://tools.ietf.org/html/rfc7231#section-6). |
| 1706 |
// |
| 1707 |
// Type: int |
| 1708 |
// RequirementLevel: ConditionallyRequired (If and only if one was |
| 1709 |
// received/sent.) |
| 1710 |
// Stability: stable |
| 1711 |
// Examples: 200 |
| 1712 |
HTTPStatusCodeKey = attribute.Key("http.status_code") |
| 1713 |
|
| 1714 |
// HTTPFlavorKey is the attribute Key conforming to the "http.flavor" |
| 1715 |
// semantic conventions. It represents the kind of HTTP protocol used. |
| 1716 |
// |
| 1717 |
// Type: Enum |
| 1718 |
// RequirementLevel: Optional |
| 1719 |
// Stability: stable |
| 1720 |
// Note: If `net.transport` is not specified, it can be assumed to be |
| 1721 |
// `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is |
| 1722 |
// assumed. |
| 1723 |
HTTPFlavorKey = attribute.Key("http.flavor") |
| 1724 |
|
| 1725 |
// HTTPUserAgentKey is the attribute Key conforming to the |
| 1726 |
// "http.user_agent" semantic conventions. It represents the value of the |
| 1727 |
// [HTTP |
| 1728 |
// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) |
| 1729 |
// header sent by the client. |
| 1730 |
// |
| 1731 |
// Type: string |
| 1732 |
// RequirementLevel: Optional |
| 1733 |
// Stability: stable |
| 1734 |
// Examples: 'CERN-LineMode/2.15 libwww/2.17b3' |
| 1735 |
HTTPUserAgentKey = attribute.Key("http.user_agent") |
| 1736 |
|
| 1737 |
// HTTPRequestContentLengthKey is the attribute Key conforming to the |
| 1738 |
// "http.request_content_length" semantic conventions. It represents the |
| 1739 |
// size of the request payload body in bytes. This is the number of bytes |
| 1740 |
// transferred excluding headers and is often, but not always, present as |
| 1741 |
// the |
| 1742 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 1743 |
// header. For requests using transport encoding, this should be the |
| 1744 |
// compressed size. |
| 1745 |
// |
| 1746 |
// Type: int |
| 1747 |
// RequirementLevel: Optional |
| 1748 |
// Stability: stable |
| 1749 |
// Examples: 3495 |
| 1750 |
HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") |
| 1751 |
|
| 1752 |
// HTTPResponseContentLengthKey is the attribute Key conforming to the |
| 1753 |
// "http.response_content_length" semantic conventions. It represents the |
| 1754 |
// size of the response payload body in bytes. This is the number of bytes |
| 1755 |
// transferred excluding headers and is often, but not always, present as |
| 1756 |
// the |
| 1757 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 1758 |
// header. For requests using transport encoding, this should be the |
| 1759 |
// compressed size. |
| 1760 |
// |
| 1761 |
// Type: int |
| 1762 |
// RequirementLevel: Optional |
| 1763 |
// Stability: stable |
| 1764 |
// Examples: 3495 |
| 1765 |
HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") |
| 1766 |
) |
| 1767 |
|
| 1768 |
var ( |
| 1769 |
// HTTP/1.0 |
| 1770 |
HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") |
| 1771 |
// HTTP/1.1 |
| 1772 |
HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") |
| 1773 |
// HTTP/2 |
| 1774 |
HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") |
| 1775 |
// HTTP/3 |
| 1776 |
HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") |
| 1777 |
// SPDY protocol |
| 1778 |
HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") |
| 1779 |
// QUIC protocol |
| 1780 |
HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") |
| 1781 |
) |
| 1782 |
|
| 1783 |
// HTTPMethod returns an attribute KeyValue conforming to the "http.method" |
| 1784 |
// semantic conventions. It represents the hTTP request method. |
| 1785 |
func HTTPMethod(val string) attribute.KeyValue { |
| 1786 |
return HTTPMethodKey.String(val) |
| 1787 |
} |
| 1788 |
|
| 1789 |
// HTTPStatusCode returns an attribute KeyValue conforming to the |
| 1790 |
// "http.status_code" semantic conventions. It represents the [HTTP response |
| 1791 |
// status code](https://tools.ietf.org/html/rfc7231#section-6). |
| 1792 |
func HTTPStatusCode(val int) attribute.KeyValue { |
| 1793 |
return HTTPStatusCodeKey.Int(val) |
| 1794 |
} |
| 1795 |
|
| 1796 |
// HTTPUserAgent returns an attribute KeyValue conforming to the |
| 1797 |
// "http.user_agent" semantic conventions. It represents the value of the [HTTP |
| 1798 |
// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) |
| 1799 |
// header sent by the client. |
| 1800 |
func HTTPUserAgent(val string) attribute.KeyValue { |
| 1801 |
return HTTPUserAgentKey.String(val) |
| 1802 |
} |
| 1803 |
|
| 1804 |
// HTTPRequestContentLength returns an attribute KeyValue conforming to the |
| 1805 |
// "http.request_content_length" semantic conventions. It represents the size |
| 1806 |
// of the request payload body in bytes. This is the number of bytes |
| 1807 |
// transferred excluding headers and is often, but not always, present as the |
| 1808 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 1809 |
// header. For requests using transport encoding, this should be the compressed |
| 1810 |
// size. |
| 1811 |
func HTTPRequestContentLength(val int) attribute.KeyValue { |
| 1812 |
return HTTPRequestContentLengthKey.Int(val) |
| 1813 |
} |
| 1814 |
|
| 1815 |
// HTTPResponseContentLength returns an attribute KeyValue conforming to the |
| 1816 |
// "http.response_content_length" semantic conventions. It represents the size |
| 1817 |
// of the response payload body in bytes. This is the number of bytes |
| 1818 |
// transferred excluding headers and is often, but not always, present as the |
| 1819 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 1820 |
// header. For requests using transport encoding, this should be the compressed |
| 1821 |
// size. |
| 1822 |
func HTTPResponseContentLength(val int) attribute.KeyValue { |
| 1823 |
return HTTPResponseContentLengthKey.Int(val) |
| 1824 |
} |
| 1825 |
|
| 1826 |
// Semantic Convention for HTTP Client |
| 1827 |
const ( |
| 1828 |
// HTTPURLKey is the attribute Key conforming to the "http.url" semantic |
| 1829 |
// conventions. It represents the full HTTP request URL in the form |
| 1830 |
// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is |
| 1831 |
// not transmitted over HTTP, but if it is known, it should be included |
| 1832 |
// nevertheless. |
| 1833 |
// |
| 1834 |
// Type: string |
| 1835 |
// RequirementLevel: Required |
| 1836 |
// Stability: stable |
| 1837 |
// Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' |
| 1838 |
// Note: `http.url` MUST NOT contain credentials passed via URL in form of |
| 1839 |
// `https://username:[email protected]/`. In such case the |
| 1840 |
// attribute's value should be `https://www.example.com/`. |
| 1841 |
HTTPURLKey = attribute.Key("http.url") |
| 1842 |
|
| 1843 |
// HTTPResendCountKey is the attribute Key conforming to the |
| 1844 |
// "http.resend_count" semantic conventions. It represents the ordinal |
| 1845 |
// number of request resending attempt (for any reason, including |
| 1846 |
// redirects). |
| 1847 |
// |
| 1848 |
// Type: int |
| 1849 |
// RequirementLevel: Recommended (if and only if request was retried.) |
| 1850 |
// Stability: stable |
| 1851 |
// Examples: 3 |
| 1852 |
// Note: The resend count SHOULD be updated each time an HTTP request gets |
| 1853 |
// resent by the client, regardless of what was the cause of the resending |
| 1854 |
// (e.g. redirection, authorization failure, 503 Server Unavailable, |
| 1855 |
// network issues, or any other). |
| 1856 |
HTTPResendCountKey = attribute.Key("http.resend_count") |
| 1857 |
) |
| 1858 |
|
| 1859 |
// HTTPURL returns an attribute KeyValue conforming to the "http.url" |
| 1860 |
// semantic conventions. It represents the full HTTP request URL in the form |
| 1861 |
// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not |
| 1862 |
// transmitted over HTTP, but if it is known, it should be included |
| 1863 |
// nevertheless. |
| 1864 |
func HTTPURL(val string) attribute.KeyValue { |
| 1865 |
return HTTPURLKey.String(val) |
| 1866 |
} |
| 1867 |
|
| 1868 |
// HTTPResendCount returns an attribute KeyValue conforming to the |
| 1869 |
// "http.resend_count" semantic conventions. It represents the ordinal number |
| 1870 |
// of request resending attempt (for any reason, including redirects). |
| 1871 |
func HTTPResendCount(val int) attribute.KeyValue { |
| 1872 |
return HTTPResendCountKey.Int(val) |
| 1873 |
} |
| 1874 |
|
| 1875 |
// Semantic Convention for HTTP Server |
| 1876 |
const ( |
| 1877 |
// HTTPSchemeKey is the attribute Key conforming to the "http.scheme" |
| 1878 |
// semantic conventions. It represents the URI scheme identifying the used |
| 1879 |
// protocol. |
| 1880 |
// |
| 1881 |
// Type: string |
| 1882 |
// RequirementLevel: Required |
| 1883 |
// Stability: stable |
| 1884 |
// Examples: 'http', 'https' |
| 1885 |
HTTPSchemeKey = attribute.Key("http.scheme") |
| 1886 |
|
| 1887 |
// HTTPTargetKey is the attribute Key conforming to the "http.target" |
| 1888 |
// semantic conventions. It represents the full request target as passed in |
| 1889 |
// a HTTP request line or equivalent. |
| 1890 |
// |
| 1891 |
// Type: string |
| 1892 |
// RequirementLevel: Required |
| 1893 |
// Stability: stable |
| 1894 |
// Examples: '/path/12314/?q=ddds' |
| 1895 |
HTTPTargetKey = attribute.Key("http.target") |
| 1896 |
|
| 1897 |
// HTTPRouteKey is the attribute Key conforming to the "http.route" |
| 1898 |
// semantic conventions. It represents the matched route (path template in |
| 1899 |
// the format used by the respective server framework). See note below |
| 1900 |
// |
| 1901 |
// Type: string |
| 1902 |
// RequirementLevel: ConditionallyRequired (If and only if it's available) |
| 1903 |
// Stability: stable |
| 1904 |
// Examples: '/users/:userID?', '{controller}/{action}/{id?}' |
| 1905 |
// Note: 'http.route' MUST NOT be populated when this is not supported by |
| 1906 |
// the HTTP server framework as the route attribute should have |
| 1907 |
// low-cardinality and the URI path can NOT substitute it. |
| 1908 |
HTTPRouteKey = attribute.Key("http.route") |
| 1909 |
|
| 1910 |
// HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" |
| 1911 |
// semantic conventions. It represents the IP address of the original |
| 1912 |
// client behind all proxies, if known (e.g. from |
| 1913 |
// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). |
| 1914 |
// |
| 1915 |
// Type: string |
| 1916 |
// RequirementLevel: Optional |
| 1917 |
// Stability: stable |
| 1918 |
// Examples: '83.164.160.102' |
| 1919 |
// Note: This is not necessarily the same as `net.sock.peer.addr`, which |
| 1920 |
// would |
| 1921 |
// identify the network-level peer, which may be a proxy. |
| 1922 |
// |
| 1923 |
// This attribute should be set when a source of information different |
| 1924 |
// from the one used for `net.sock.peer.addr`, is available even if that |
| 1925 |
// other |
| 1926 |
// source just confirms the same value as `net.sock.peer.addr`. |
| 1927 |
// Rationale: For `net.sock.peer.addr`, one typically does not know if it |
| 1928 |
// comes from a proxy, reverse proxy, or the actual client. Setting |
| 1929 |
// `http.client_ip` when it's the same as `net.sock.peer.addr` means that |
| 1930 |
// one is at least somewhat confident that the address is not that of |
| 1931 |
// the closest proxy. |
| 1932 |
HTTPClientIPKey = attribute.Key("http.client_ip") |
| 1933 |
) |
| 1934 |
|
| 1935 |
// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" |
| 1936 |
// semantic conventions. It represents the URI scheme identifying the used |
| 1937 |
// protocol. |
| 1938 |
func HTTPScheme(val string) attribute.KeyValue { |
| 1939 |
return HTTPSchemeKey.String(val) |
| 1940 |
} |
| 1941 |
|
| 1942 |
// HTTPTarget returns an attribute KeyValue conforming to the "http.target" |
| 1943 |
// semantic conventions. It represents the full request target as passed in a |
| 1944 |
// HTTP request line or equivalent. |
| 1945 |
func HTTPTarget(val string) attribute.KeyValue { |
| 1946 |
return HTTPTargetKey.String(val) |
| 1947 |
} |
| 1948 |
|
| 1949 |
// HTTPRoute returns an attribute KeyValue conforming to the "http.route" |
| 1950 |
// semantic conventions. It represents the matched route (path template in the |
| 1951 |
// format used by the respective server framework). See note below |
| 1952 |
func HTTPRoute(val string) attribute.KeyValue { |
| 1953 |
return HTTPRouteKey.String(val) |
| 1954 |
} |
| 1955 |
|
| 1956 |
// HTTPClientIP returns an attribute KeyValue conforming to the |
| 1957 |
// "http.client_ip" semantic conventions. It represents the IP address of the |
| 1958 |
// original client behind all proxies, if known (e.g. from |
| 1959 |
// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). |
| 1960 |
func HTTPClientIP(val string) attribute.KeyValue { |
| 1961 |
return HTTPClientIPKey.String(val) |
| 1962 |
} |
| 1963 |
|
| 1964 |
// Attributes that exist for multiple DynamoDB request types. |
| 1965 |
const ( |
| 1966 |
// AWSDynamoDBTableNamesKey is the attribute Key conforming to the |
| 1967 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys |
| 1968 |
// in the `RequestItems` object field. |
| 1969 |
// |
| 1970 |
// Type: string[] |
| 1971 |
// RequirementLevel: Optional |
| 1972 |
// Stability: stable |
| 1973 |
// Examples: 'Users', 'Cats' |
| 1974 |
AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") |
| 1975 |
|
| 1976 |
// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the |
| 1977 |
// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 1978 |
// JSON-serialized value of each item in the `ConsumedCapacity` response |
| 1979 |
// field. |
| 1980 |
// |
| 1981 |
// Type: string[] |
| 1982 |
// RequirementLevel: Optional |
| 1983 |
// Stability: stable |
| 1984 |
// Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { |
| 1985 |
// "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1986 |
// "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : |
| 1987 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1988 |
// "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": |
| 1989 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1990 |
// "WriteCapacityUnits": number }, "TableName": "string", |
| 1991 |
// "WriteCapacityUnits": number }' |
| 1992 |
AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") |
| 1993 |
|
| 1994 |
// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to |
| 1995 |
// the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 1996 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` |
| 1997 |
// response field. |
| 1998 |
// |
| 1999 |
// Type: string |
| 2000 |
// RequirementLevel: Optional |
| 2001 |
// Stability: stable |
| 2002 |
// Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": |
| 2003 |
// blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { |
| 2004 |
// "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], |
| 2005 |
// "NULL": boolean, "S": "string", "SS": [ "string" ] } }, |
| 2006 |
// "SizeEstimateRangeGB": [ number ] } ] }' |
| 2007 |
AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") |
| 2008 |
|
| 2009 |
// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to |
| 2010 |
// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It |
| 2011 |
// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` |
| 2012 |
// request parameter. |
| 2013 |
// |
| 2014 |
// Type: double |
| 2015 |
// RequirementLevel: Optional |
| 2016 |
// Stability: stable |
| 2017 |
// Examples: 1.0, 2.0 |
| 2018 |
AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") |
| 2019 |
|
| 2020 |
// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming |
| 2021 |
// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. |
| 2022 |
// It represents the value of the |
| 2023 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 2024 |
// |
| 2025 |
// Type: double |
| 2026 |
// RequirementLevel: Optional |
| 2027 |
// Stability: stable |
| 2028 |
// Examples: 1.0, 2.0 |
| 2029 |
AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") |
| 2030 |
|
| 2031 |
// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the |
| 2032 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the |
| 2033 |
// value of the `ConsistentRead` request parameter. |
| 2034 |
// |
| 2035 |
// Type: boolean |
| 2036 |
// RequirementLevel: Optional |
| 2037 |
// Stability: stable |
| 2038 |
AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") |
| 2039 |
|
| 2040 |
// AWSDynamoDBProjectionKey is the attribute Key conforming to the |
| 2041 |
// "aws.dynamodb.projection" semantic conventions. It represents the value |
| 2042 |
// of the `ProjectionExpression` request parameter. |
| 2043 |
// |
| 2044 |
// Type: string |
| 2045 |
// RequirementLevel: Optional |
| 2046 |
// Stability: stable |
| 2047 |
// Examples: 'Title', 'Title, Price, Color', 'Title, Description, |
| 2048 |
// RelatedItems, ProductReviews' |
| 2049 |
AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") |
| 2050 |
|
| 2051 |
// AWSDynamoDBLimitKey is the attribute Key conforming to the |
| 2052 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of |
| 2053 |
// the `Limit` request parameter. |
| 2054 |
// |
| 2055 |
// Type: int |
| 2056 |
// RequirementLevel: Optional |
| 2057 |
// Stability: stable |
| 2058 |
// Examples: 10 |
| 2059 |
AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") |
| 2060 |
|
| 2061 |
// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the |
| 2062 |
// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 2063 |
// value of the `AttributesToGet` request parameter. |
| 2064 |
// |
| 2065 |
// Type: string[] |
| 2066 |
// RequirementLevel: Optional |
| 2067 |
// Stability: stable |
| 2068 |
// Examples: 'lives', 'id' |
| 2069 |
AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") |
| 2070 |
|
| 2071 |
// AWSDynamoDBIndexNameKey is the attribute Key conforming to the |
| 2072 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value |
| 2073 |
// of the `IndexName` request parameter. |
| 2074 |
// |
| 2075 |
// Type: string |
| 2076 |
// RequirementLevel: Optional |
| 2077 |
// Stability: stable |
| 2078 |
// Examples: 'name_to_group' |
| 2079 |
AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") |
| 2080 |
|
| 2081 |
// AWSDynamoDBSelectKey is the attribute Key conforming to the |
| 2082 |
// "aws.dynamodb.select" semantic conventions. It represents the value of |
| 2083 |
// the `Select` request parameter. |
| 2084 |
// |
| 2085 |
// Type: string |
| 2086 |
// RequirementLevel: Optional |
| 2087 |
// Stability: stable |
| 2088 |
// Examples: 'ALL_ATTRIBUTES', 'COUNT' |
| 2089 |
AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") |
| 2090 |
) |
| 2091 |
|
| 2092 |
// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the |
| 2093 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys in |
| 2094 |
// the `RequestItems` object field. |
| 2095 |
func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { |
| 2096 |
return AWSDynamoDBTableNamesKey.StringSlice(val) |
| 2097 |
} |
| 2098 |
|
| 2099 |
// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to |
| 2100 |
// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 2101 |
// JSON-serialized value of each item in the `ConsumedCapacity` response field. |
| 2102 |
func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { |
| 2103 |
return AWSDynamoDBConsumedCapacityKey.StringSlice(val) |
| 2104 |
} |
| 2105 |
|
| 2106 |
// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming |
| 2107 |
// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 2108 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` response |
| 2109 |
// field. |
| 2110 |
func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { |
| 2111 |
return AWSDynamoDBItemCollectionMetricsKey.String(val) |
| 2112 |
} |
| 2113 |
|
| 2114 |
// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue |
| 2115 |
// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic |
| 2116 |
// conventions. It represents the value of the |
| 2117 |
// `ProvisionedThroughput.ReadCapacityUnits` request parameter. |
| 2118 |
func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { |
| 2119 |
return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) |
| 2120 |
} |
| 2121 |
|
| 2122 |
// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue |
| 2123 |
// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic |
| 2124 |
// conventions. It represents the value of the |
| 2125 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 2126 |
func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { |
| 2127 |
return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) |
| 2128 |
} |
| 2129 |
|
| 2130 |
// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the |
| 2131 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the value |
| 2132 |
// of the `ConsistentRead` request parameter. |
| 2133 |
func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { |
| 2134 |
return AWSDynamoDBConsistentReadKey.Bool(val) |
| 2135 |
} |
| 2136 |
|
| 2137 |
// AWSDynamoDBProjection returns an attribute KeyValue conforming to the |
| 2138 |
// "aws.dynamodb.projection" semantic conventions. It represents the value of |
| 2139 |
// the `ProjectionExpression` request parameter. |
| 2140 |
func AWSDynamoDBProjection(val string) attribute.KeyValue { |
| 2141 |
return AWSDynamoDBProjectionKey.String(val) |
| 2142 |
} |
| 2143 |
|
| 2144 |
// AWSDynamoDBLimit returns an attribute KeyValue conforming to the |
| 2145 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of the |
| 2146 |
// `Limit` request parameter. |
| 2147 |
func AWSDynamoDBLimit(val int) attribute.KeyValue { |
| 2148 |
return AWSDynamoDBLimitKey.Int(val) |
| 2149 |
} |
| 2150 |
|
| 2151 |
// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to |
| 2152 |
// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 2153 |
// value of the `AttributesToGet` request parameter. |
| 2154 |
func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { |
| 2155 |
return AWSDynamoDBAttributesToGetKey.StringSlice(val) |
| 2156 |
} |
| 2157 |
|
| 2158 |
// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the |
| 2159 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value of |
| 2160 |
// the `IndexName` request parameter. |
| 2161 |
func AWSDynamoDBIndexName(val string) attribute.KeyValue { |
| 2162 |
return AWSDynamoDBIndexNameKey.String(val) |
| 2163 |
} |
| 2164 |
|
| 2165 |
// AWSDynamoDBSelect returns an attribute KeyValue conforming to the |
| 2166 |
// "aws.dynamodb.select" semantic conventions. It represents the value of the |
| 2167 |
// `Select` request parameter. |
| 2168 |
func AWSDynamoDBSelect(val string) attribute.KeyValue { |
| 2169 |
return AWSDynamoDBSelectKey.String(val) |
| 2170 |
} |
| 2171 |
|
| 2172 |
// DynamoDB.CreateTable |
| 2173 |
const ( |
| 2174 |
// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to |
| 2175 |
// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It |
| 2176 |
// represents the JSON-serialized value of each item of the |
| 2177 |
// `GlobalSecondaryIndexes` request field |
| 2178 |
// |
| 2179 |
// Type: string[] |
| 2180 |
// RequirementLevel: Optional |
| 2181 |
// Stability: stable |
| 2182 |
// Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": |
| 2183 |
// "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ |
| 2184 |
// "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { |
| 2185 |
// "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' |
| 2186 |
AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") |
| 2187 |
|
| 2188 |
// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to |
| 2189 |
// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 2190 |
// represents the JSON-serialized value of each item of the |
| 2191 |
// `LocalSecondaryIndexes` request field. |
| 2192 |
// |
| 2193 |
// Type: string[] |
| 2194 |
// RequirementLevel: Optional |
| 2195 |
// Stability: stable |
| 2196 |
// Examples: '{ "IndexARN": "string", "IndexName": "string", |
| 2197 |
// "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { |
| 2198 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 2199 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' |
| 2200 |
AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") |
| 2201 |
) |
| 2202 |
|
| 2203 |
// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue |
| 2204 |
// conforming to the "aws.dynamodb.global_secondary_indexes" semantic |
| 2205 |
// conventions. It represents the JSON-serialized value of each item of the |
| 2206 |
// `GlobalSecondaryIndexes` request field |
| 2207 |
func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 2208 |
return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) |
| 2209 |
} |
| 2210 |
|
| 2211 |
// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming |
| 2212 |
// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 2213 |
// represents the JSON-serialized value of each item of the |
| 2214 |
// `LocalSecondaryIndexes` request field. |
| 2215 |
func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 2216 |
return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) |
| 2217 |
} |
| 2218 |
|
| 2219 |
// DynamoDB.ListTables |
| 2220 |
const ( |
| 2221 |
// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the |
| 2222 |
// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents |
| 2223 |
// the value of the `ExclusiveStartTableName` request parameter. |
| 2224 |
// |
| 2225 |
// Type: string |
| 2226 |
// RequirementLevel: Optional |
| 2227 |
// Stability: stable |
| 2228 |
// Examples: 'Users', 'CatsTable' |
| 2229 |
AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") |
| 2230 |
|
| 2231 |
// AWSDynamoDBTableCountKey is the attribute Key conforming to the |
| 2232 |
// "aws.dynamodb.table_count" semantic conventions. It represents the the |
| 2233 |
// number of items in the `TableNames` response parameter. |
| 2234 |
// |
| 2235 |
// Type: int |
| 2236 |
// RequirementLevel: Optional |
| 2237 |
// Stability: stable |
| 2238 |
// Examples: 20 |
| 2239 |
AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") |
| 2240 |
) |
| 2241 |
|
| 2242 |
// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming |
| 2243 |
// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It |
| 2244 |
// represents the value of the `ExclusiveStartTableName` request parameter. |
| 2245 |
func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { |
| 2246 |
return AWSDynamoDBExclusiveStartTableKey.String(val) |
| 2247 |
} |
| 2248 |
|
| 2249 |
// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the |
| 2250 |
// "aws.dynamodb.table_count" semantic conventions. It represents the the |
| 2251 |
// number of items in the `TableNames` response parameter. |
| 2252 |
func AWSDynamoDBTableCount(val int) attribute.KeyValue { |
| 2253 |
return AWSDynamoDBTableCountKey.Int(val) |
| 2254 |
} |
| 2255 |
|
| 2256 |
// DynamoDB.Query |
| 2257 |
const ( |
| 2258 |
// AWSDynamoDBScanForwardKey is the attribute Key conforming to the |
| 2259 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the |
| 2260 |
// value of the `ScanIndexForward` request parameter. |
| 2261 |
// |
| 2262 |
// Type: boolean |
| 2263 |
// RequirementLevel: Optional |
| 2264 |
// Stability: stable |
| 2265 |
AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") |
| 2266 |
) |
| 2267 |
|
| 2268 |
// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the |
| 2269 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of |
| 2270 |
// the `ScanIndexForward` request parameter. |
| 2271 |
func AWSDynamoDBScanForward(val bool) attribute.KeyValue { |
| 2272 |
return AWSDynamoDBScanForwardKey.Bool(val) |
| 2273 |
} |
| 2274 |
|
| 2275 |
// DynamoDB.Scan |
| 2276 |
const ( |
| 2277 |
// AWSDynamoDBSegmentKey is the attribute Key conforming to the |
| 2278 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of |
| 2279 |
// the `Segment` request parameter. |
| 2280 |
// |
| 2281 |
// Type: int |
| 2282 |
// RequirementLevel: Optional |
| 2283 |
// Stability: stable |
| 2284 |
// Examples: 10 |
| 2285 |
AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") |
| 2286 |
|
| 2287 |
// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the |
| 2288 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the |
| 2289 |
// value of the `TotalSegments` request parameter. |
| 2290 |
// |
| 2291 |
// Type: int |
| 2292 |
// RequirementLevel: Optional |
| 2293 |
// Stability: stable |
| 2294 |
// Examples: 100 |
| 2295 |
AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") |
| 2296 |
|
| 2297 |
// AWSDynamoDBCountKey is the attribute Key conforming to the |
| 2298 |
// "aws.dynamodb.count" semantic conventions. It represents the value of |
| 2299 |
// the `Count` response parameter. |
| 2300 |
// |
| 2301 |
// Type: int |
| 2302 |
// RequirementLevel: Optional |
| 2303 |
// Stability: stable |
| 2304 |
// Examples: 10 |
| 2305 |
AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") |
| 2306 |
|
| 2307 |
// AWSDynamoDBScannedCountKey is the attribute Key conforming to the |
| 2308 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the |
| 2309 |
// value of the `ScannedCount` response parameter. |
| 2310 |
// |
| 2311 |
// Type: int |
| 2312 |
// RequirementLevel: Optional |
| 2313 |
// Stability: stable |
| 2314 |
// Examples: 50 |
| 2315 |
AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") |
| 2316 |
) |
| 2317 |
|
| 2318 |
// AWSDynamoDBSegment returns an attribute KeyValue conforming to the |
| 2319 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of the |
| 2320 |
// `Segment` request parameter. |
| 2321 |
func AWSDynamoDBSegment(val int) attribute.KeyValue { |
| 2322 |
return AWSDynamoDBSegmentKey.Int(val) |
| 2323 |
} |
| 2324 |
|
| 2325 |
// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the |
| 2326 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the value |
| 2327 |
// of the `TotalSegments` request parameter. |
| 2328 |
func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { |
| 2329 |
return AWSDynamoDBTotalSegmentsKey.Int(val) |
| 2330 |
} |
| 2331 |
|
| 2332 |
// AWSDynamoDBCount returns an attribute KeyValue conforming to the |
| 2333 |
// "aws.dynamodb.count" semantic conventions. It represents the value of the |
| 2334 |
// `Count` response parameter. |
| 2335 |
func AWSDynamoDBCount(val int) attribute.KeyValue { |
| 2336 |
return AWSDynamoDBCountKey.Int(val) |
| 2337 |
} |
| 2338 |
|
| 2339 |
// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the |
| 2340 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the value |
| 2341 |
// of the `ScannedCount` response parameter. |
| 2342 |
func AWSDynamoDBScannedCount(val int) attribute.KeyValue { |
| 2343 |
return AWSDynamoDBScannedCountKey.Int(val) |
| 2344 |
} |
| 2345 |
|
| 2346 |
// DynamoDB.UpdateTable |
| 2347 |
const ( |
| 2348 |
// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to |
| 2349 |
// the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 2350 |
// represents the JSON-serialized value of each item in the |
| 2351 |
// `AttributeDefinitions` request field. |
| 2352 |
// |
| 2353 |
// Type: string[] |
| 2354 |
// RequirementLevel: Optional |
| 2355 |
// Stability: stable |
| 2356 |
// Examples: '{ "AttributeName": "string", "AttributeType": "string" }' |
| 2357 |
AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") |
| 2358 |
|
| 2359 |
// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key |
| 2360 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 2361 |
// conventions. It represents the JSON-serialized value of each item in the |
| 2362 |
// the `GlobalSecondaryIndexUpdates` request field. |
| 2363 |
// |
| 2364 |
// Type: string[] |
| 2365 |
// RequirementLevel: Optional |
| 2366 |
// Stability: stable |
| 2367 |
// Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { |
| 2368 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 2369 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, |
| 2370 |
// "ProvisionedThroughput": { "ReadCapacityUnits": number, |
| 2371 |
// "WriteCapacityUnits": number } }' |
| 2372 |
AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") |
| 2373 |
) |
| 2374 |
|
| 2375 |
// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming |
| 2376 |
// to the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 2377 |
// represents the JSON-serialized value of each item in the |
| 2378 |
// `AttributeDefinitions` request field. |
| 2379 |
func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { |
| 2380 |
return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) |
| 2381 |
} |
| 2382 |
|
| 2383 |
// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue |
| 2384 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 2385 |
// conventions. It represents the JSON-serialized value of each item in the the |
| 2386 |
// `GlobalSecondaryIndexUpdates` request field. |
| 2387 |
func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { |
| 2388 |
return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) |
| 2389 |
} |
| 2390 |
|
| 2391 |
// Semantic conventions to apply when instrumenting the GraphQL implementation. |
| 2392 |
// They map GraphQL operations to attributes on a Span. |
| 2393 |
const ( |
| 2394 |
// GraphqlOperationNameKey is the attribute Key conforming to the |
| 2395 |
// "graphql.operation.name" semantic conventions. It represents the name of |
| 2396 |
// the operation being executed. |
| 2397 |
// |
| 2398 |
// Type: string |
| 2399 |
// RequirementLevel: Optional |
| 2400 |
// Stability: stable |
| 2401 |
// Examples: 'findBookByID' |
| 2402 |
GraphqlOperationNameKey = attribute.Key("graphql.operation.name") |
| 2403 |
|
| 2404 |
// GraphqlOperationTypeKey is the attribute Key conforming to the |
| 2405 |
// "graphql.operation.type" semantic conventions. It represents the type of |
| 2406 |
// the operation being executed. |
| 2407 |
// |
| 2408 |
// Type: Enum |
| 2409 |
// RequirementLevel: Optional |
| 2410 |
// Stability: stable |
| 2411 |
// Examples: 'query', 'mutation', 'subscription' |
| 2412 |
GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") |
| 2413 |
|
| 2414 |
// GraphqlDocumentKey is the attribute Key conforming to the |
| 2415 |
// "graphql.document" semantic conventions. It represents the GraphQL |
| 2416 |
// document being executed. |
| 2417 |
// |
| 2418 |
// Type: string |
| 2419 |
// RequirementLevel: Optional |
| 2420 |
// Stability: stable |
| 2421 |
// Examples: 'query findBookByID { bookByID(id: ?) { name } }' |
| 2422 |
// Note: The value may be sanitized to exclude sensitive information. |
| 2423 |
GraphqlDocumentKey = attribute.Key("graphql.document") |
| 2424 |
) |
| 2425 |
|
| 2426 |
var ( |
| 2427 |
// GraphQL query |
| 2428 |
GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") |
| 2429 |
// GraphQL mutation |
| 2430 |
GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") |
| 2431 |
// GraphQL subscription |
| 2432 |
GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") |
| 2433 |
) |
| 2434 |
|
| 2435 |
// GraphqlOperationName returns an attribute KeyValue conforming to the |
| 2436 |
// "graphql.operation.name" semantic conventions. It represents the name of the |
| 2437 |
// operation being executed. |
| 2438 |
func GraphqlOperationName(val string) attribute.KeyValue { |
| 2439 |
return GraphqlOperationNameKey.String(val) |
| 2440 |
} |
| 2441 |
|
| 2442 |
// GraphqlDocument returns an attribute KeyValue conforming to the |
| 2443 |
// "graphql.document" semantic conventions. It represents the GraphQL document |
| 2444 |
// being executed. |
| 2445 |
func GraphqlDocument(val string) attribute.KeyValue { |
| 2446 |
return GraphqlDocumentKey.String(val) |
| 2447 |
} |
| 2448 |
|
| 2449 |
// Semantic convention describing per-message attributes populated on messaging |
| 2450 |
// spans or links. |
| 2451 |
const ( |
| 2452 |
// MessagingMessageIDKey is the attribute Key conforming to the |
| 2453 |
// "messaging.message.id" semantic conventions. It represents a value used |
| 2454 |
// by the messaging system as an identifier for the message, represented as |
| 2455 |
// a string. |
| 2456 |
// |
| 2457 |
// Type: string |
| 2458 |
// RequirementLevel: Optional |
| 2459 |
// Stability: stable |
| 2460 |
// Examples: '452a7c7c7c7048c2f887f61572b18fc2' |
| 2461 |
MessagingMessageIDKey = attribute.Key("messaging.message.id") |
| 2462 |
|
| 2463 |
// MessagingMessageConversationIDKey is the attribute Key conforming to the |
| 2464 |
// "messaging.message.conversation_id" semantic conventions. It represents |
| 2465 |
// the [conversation ID](#conversations) identifying the conversation to |
| 2466 |
// which the message belongs, represented as a string. Sometimes called |
| 2467 |
// "Correlation ID". |
| 2468 |
// |
| 2469 |
// Type: string |
| 2470 |
// RequirementLevel: Optional |
| 2471 |
// Stability: stable |
| 2472 |
// Examples: 'MyConversationID' |
| 2473 |
MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") |
| 2474 |
|
| 2475 |
// MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to |
| 2476 |
// the "messaging.message.payload_size_bytes" semantic conventions. It |
| 2477 |
// represents the (uncompressed) size of the message payload in bytes. Also |
| 2478 |
// use this attribute if it is unknown whether the compressed or |
| 2479 |
// uncompressed payload size is reported. |
| 2480 |
// |
| 2481 |
// Type: int |
| 2482 |
// RequirementLevel: Optional |
| 2483 |
// Stability: stable |
| 2484 |
// Examples: 2738 |
| 2485 |
MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") |
| 2486 |
|
| 2487 |
// MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key |
| 2488 |
// conforming to the "messaging.message.payload_compressed_size_bytes" |
| 2489 |
// semantic conventions. It represents the compressed size of the message |
| 2490 |
// payload in bytes. |
| 2491 |
// |
| 2492 |
// Type: int |
| 2493 |
// RequirementLevel: Optional |
| 2494 |
// Stability: stable |
| 2495 |
// Examples: 2048 |
| 2496 |
MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") |
| 2497 |
) |
| 2498 |
|
| 2499 |
// MessagingMessageID returns an attribute KeyValue conforming to the |
| 2500 |
// "messaging.message.id" semantic conventions. It represents a value used by |
| 2501 |
// the messaging system as an identifier for the message, represented as a |
| 2502 |
// string. |
| 2503 |
func MessagingMessageID(val string) attribute.KeyValue { |
| 2504 |
return MessagingMessageIDKey.String(val) |
| 2505 |
} |
| 2506 |
|
| 2507 |
// MessagingMessageConversationID returns an attribute KeyValue conforming |
| 2508 |
// to the "messaging.message.conversation_id" semantic conventions. It |
| 2509 |
// represents the [conversation ID](#conversations) identifying the |
| 2510 |
// conversation to which the message belongs, represented as a string. |
| 2511 |
// Sometimes called "Correlation ID". |
| 2512 |
func MessagingMessageConversationID(val string) attribute.KeyValue { |
| 2513 |
return MessagingMessageConversationIDKey.String(val) |
| 2514 |
} |
| 2515 |
|
| 2516 |
// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming |
| 2517 |
// to the "messaging.message.payload_size_bytes" semantic conventions. It |
| 2518 |
// represents the (uncompressed) size of the message payload in bytes. Also use |
| 2519 |
// this attribute if it is unknown whether the compressed or uncompressed |
| 2520 |
// payload size is reported. |
| 2521 |
func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { |
| 2522 |
return MessagingMessagePayloadSizeBytesKey.Int(val) |
| 2523 |
} |
| 2524 |
|
| 2525 |
// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue |
| 2526 |
// conforming to the "messaging.message.payload_compressed_size_bytes" semantic |
| 2527 |
// conventions. It represents the compressed size of the message payload in |
| 2528 |
// bytes. |
| 2529 |
func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { |
| 2530 |
return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) |
| 2531 |
} |
| 2532 |
|
| 2533 |
// Semantic convention for attributes that describe messaging destination on |
| 2534 |
// broker |
| 2535 |
const ( |
| 2536 |
// MessagingDestinationNameKey is the attribute Key conforming to the |
| 2537 |
// "messaging.destination.name" semantic conventions. It represents the |
| 2538 |
// message destination name |
| 2539 |
// |
| 2540 |
// Type: string |
| 2541 |
// RequirementLevel: Optional |
| 2542 |
// Stability: stable |
| 2543 |
// Examples: 'MyQueue', 'MyTopic' |
| 2544 |
// Note: Destination name SHOULD uniquely identify a specific queue, topic |
| 2545 |
// or other entity within the broker. If |
| 2546 |
// the broker does not have such notion, the destination name SHOULD |
| 2547 |
// uniquely identify the broker. |
| 2548 |
MessagingDestinationNameKey = attribute.Key("messaging.destination.name") |
| 2549 |
|
| 2550 |
// MessagingDestinationKindKey is the attribute Key conforming to the |
| 2551 |
// "messaging.destination.kind" semantic conventions. It represents the |
| 2552 |
// kind of message destination |
| 2553 |
// |
| 2554 |
// Type: Enum |
| 2555 |
// RequirementLevel: Optional |
| 2556 |
// Stability: stable |
| 2557 |
MessagingDestinationKindKey = attribute.Key("messaging.destination.kind") |
| 2558 |
|
| 2559 |
// MessagingDestinationTemplateKey is the attribute Key conforming to the |
| 2560 |
// "messaging.destination.template" semantic conventions. It represents the |
| 2561 |
// low cardinality representation of the messaging destination name |
| 2562 |
// |
| 2563 |
// Type: string |
| 2564 |
// RequirementLevel: Optional |
| 2565 |
// Stability: stable |
| 2566 |
// Examples: '/customers/{customerID}' |
| 2567 |
// Note: Destination names could be constructed from templates. An example |
| 2568 |
// would be a destination name involving a user name or product id. |
| 2569 |
// Although the destination name in this case is of high cardinality, the |
| 2570 |
// underlying template is of low cardinality and can be effectively used |
| 2571 |
// for grouping and aggregation. |
| 2572 |
MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") |
| 2573 |
|
| 2574 |
// MessagingDestinationTemporaryKey is the attribute Key conforming to the |
| 2575 |
// "messaging.destination.temporary" semantic conventions. It represents a |
| 2576 |
// boolean that is true if the message destination is temporary and might |
| 2577 |
// not exist anymore after messages are processed. |
| 2578 |
// |
| 2579 |
// Type: boolean |
| 2580 |
// RequirementLevel: Optional |
| 2581 |
// Stability: stable |
| 2582 |
MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") |
| 2583 |
|
| 2584 |
// MessagingDestinationAnonymousKey is the attribute Key conforming to the |
| 2585 |
// "messaging.destination.anonymous" semantic conventions. It represents a |
| 2586 |
// boolean that is true if the message destination is anonymous (could be |
| 2587 |
// unnamed or have auto-generated name). |
| 2588 |
// |
| 2589 |
// Type: boolean |
| 2590 |
// RequirementLevel: Optional |
| 2591 |
// Stability: stable |
| 2592 |
MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") |
| 2593 |
) |
| 2594 |
|
| 2595 |
var ( |
| 2596 |
// A message sent to a queue |
| 2597 |
MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue") |
| 2598 |
// A message sent to a topic |
| 2599 |
MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic") |
| 2600 |
) |
| 2601 |
|
| 2602 |
// MessagingDestinationName returns an attribute KeyValue conforming to the |
| 2603 |
// "messaging.destination.name" semantic conventions. It represents the message |
| 2604 |
// destination name |
| 2605 |
func MessagingDestinationName(val string) attribute.KeyValue { |
| 2606 |
return MessagingDestinationNameKey.String(val) |
| 2607 |
} |
| 2608 |
|
| 2609 |
// MessagingDestinationTemplate returns an attribute KeyValue conforming to |
| 2610 |
// the "messaging.destination.template" semantic conventions. It represents the |
| 2611 |
// low cardinality representation of the messaging destination name |
| 2612 |
func MessagingDestinationTemplate(val string) attribute.KeyValue { |
| 2613 |
return MessagingDestinationTemplateKey.String(val) |
| 2614 |
} |
| 2615 |
|
| 2616 |
// MessagingDestinationTemporary returns an attribute KeyValue conforming to |
| 2617 |
// the "messaging.destination.temporary" semantic conventions. It represents a |
| 2618 |
// boolean that is true if the message destination is temporary and might not |
| 2619 |
// exist anymore after messages are processed. |
| 2620 |
func MessagingDestinationTemporary(val bool) attribute.KeyValue { |
| 2621 |
return MessagingDestinationTemporaryKey.Bool(val) |
| 2622 |
} |
| 2623 |
|
| 2624 |
// MessagingDestinationAnonymous returns an attribute KeyValue conforming to |
| 2625 |
// the "messaging.destination.anonymous" semantic conventions. It represents a |
| 2626 |
// boolean that is true if the message destination is anonymous (could be |
| 2627 |
// unnamed or have auto-generated name). |
| 2628 |
func MessagingDestinationAnonymous(val bool) attribute.KeyValue { |
| 2629 |
return MessagingDestinationAnonymousKey.Bool(val) |
| 2630 |
} |
| 2631 |
|
| 2632 |
// Semantic convention for attributes that describe messaging source on broker |
| 2633 |
const ( |
| 2634 |
// MessagingSourceNameKey is the attribute Key conforming to the |
| 2635 |
// "messaging.source.name" semantic conventions. It represents the message |
| 2636 |
// source name |
| 2637 |
// |
| 2638 |
// Type: string |
| 2639 |
// RequirementLevel: Optional |
| 2640 |
// Stability: stable |
| 2641 |
// Examples: 'MyQueue', 'MyTopic' |
| 2642 |
// Note: Source name SHOULD uniquely identify a specific queue, topic, or |
| 2643 |
// other entity within the broker. If |
| 2644 |
// the broker does not have such notion, the source name SHOULD uniquely |
| 2645 |
// identify the broker. |
| 2646 |
MessagingSourceNameKey = attribute.Key("messaging.source.name") |
| 2647 |
|
| 2648 |
// MessagingSourceKindKey is the attribute Key conforming to the |
| 2649 |
// "messaging.source.kind" semantic conventions. It represents the kind of |
| 2650 |
// message source |
| 2651 |
// |
| 2652 |
// Type: Enum |
| 2653 |
// RequirementLevel: Optional |
| 2654 |
// Stability: stable |
| 2655 |
MessagingSourceKindKey = attribute.Key("messaging.source.kind") |
| 2656 |
|
| 2657 |
// MessagingSourceTemplateKey is the attribute Key conforming to the |
| 2658 |
// "messaging.source.template" semantic conventions. It represents the low |
| 2659 |
// cardinality representation of the messaging source name |
| 2660 |
// |
| 2661 |
// Type: string |
| 2662 |
// RequirementLevel: Optional |
| 2663 |
// Stability: stable |
| 2664 |
// Examples: '/customers/{customerID}' |
| 2665 |
// Note: Source names could be constructed from templates. An example would |
| 2666 |
// be a source name involving a user name or product id. Although the |
| 2667 |
// source name in this case is of high cardinality, the underlying template |
| 2668 |
// is of low cardinality and can be effectively used for grouping and |
| 2669 |
// aggregation. |
| 2670 |
MessagingSourceTemplateKey = attribute.Key("messaging.source.template") |
| 2671 |
|
| 2672 |
// MessagingSourceTemporaryKey is the attribute Key conforming to the |
| 2673 |
// "messaging.source.temporary" semantic conventions. It represents a |
| 2674 |
// boolean that is true if the message source is temporary and might not |
| 2675 |
// exist anymore after messages are processed. |
| 2676 |
// |
| 2677 |
// Type: boolean |
| 2678 |
// RequirementLevel: Optional |
| 2679 |
// Stability: stable |
| 2680 |
MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary") |
| 2681 |
|
| 2682 |
// MessagingSourceAnonymousKey is the attribute Key conforming to the |
| 2683 |
// "messaging.source.anonymous" semantic conventions. It represents a |
| 2684 |
// boolean that is true if the message source is anonymous (could be |
| 2685 |
// unnamed or have auto-generated name). |
| 2686 |
// |
| 2687 |
// Type: boolean |
| 2688 |
// RequirementLevel: Optional |
| 2689 |
// Stability: stable |
| 2690 |
MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous") |
| 2691 |
) |
| 2692 |
|
| 2693 |
var ( |
| 2694 |
// A message received from a queue |
| 2695 |
MessagingSourceKindQueue = MessagingSourceKindKey.String("queue") |
| 2696 |
// A message received from a topic |
| 2697 |
MessagingSourceKindTopic = MessagingSourceKindKey.String("topic") |
| 2698 |
) |
| 2699 |
|
| 2700 |
// MessagingSourceName returns an attribute KeyValue conforming to the |
| 2701 |
// "messaging.source.name" semantic conventions. It represents the message |
| 2702 |
// source name |
| 2703 |
func MessagingSourceName(val string) attribute.KeyValue { |
| 2704 |
return MessagingSourceNameKey.String(val) |
| 2705 |
} |
| 2706 |
|
| 2707 |
// MessagingSourceTemplate returns an attribute KeyValue conforming to the |
| 2708 |
// "messaging.source.template" semantic conventions. It represents the low |
| 2709 |
// cardinality representation of the messaging source name |
| 2710 |
func MessagingSourceTemplate(val string) attribute.KeyValue { |
| 2711 |
return MessagingSourceTemplateKey.String(val) |
| 2712 |
} |
| 2713 |
|
| 2714 |
// MessagingSourceTemporary returns an attribute KeyValue conforming to the |
| 2715 |
// "messaging.source.temporary" semantic conventions. It represents a boolean |
| 2716 |
// that is true if the message source is temporary and might not exist anymore |
| 2717 |
// after messages are processed. |
| 2718 |
func MessagingSourceTemporary(val bool) attribute.KeyValue { |
| 2719 |
return MessagingSourceTemporaryKey.Bool(val) |
| 2720 |
} |
| 2721 |
|
| 2722 |
// MessagingSourceAnonymous returns an attribute KeyValue conforming to the |
| 2723 |
// "messaging.source.anonymous" semantic conventions. It represents a boolean |
| 2724 |
// that is true if the message source is anonymous (could be unnamed or have |
| 2725 |
// auto-generated name). |
| 2726 |
func MessagingSourceAnonymous(val bool) attribute.KeyValue { |
| 2727 |
return MessagingSourceAnonymousKey.Bool(val) |
| 2728 |
} |
| 2729 |
|
| 2730 |
// General attributes used in messaging systems. |
| 2731 |
const ( |
| 2732 |
// MessagingSystemKey is the attribute Key conforming to the |
| 2733 |
// "messaging.system" semantic conventions. It represents a string |
| 2734 |
// identifying the messaging system. |
| 2735 |
// |
| 2736 |
// Type: string |
| 2737 |
// RequirementLevel: Required |
| 2738 |
// Stability: stable |
| 2739 |
// Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' |
| 2740 |
MessagingSystemKey = attribute.Key("messaging.system") |
| 2741 |
|
| 2742 |
// MessagingOperationKey is the attribute Key conforming to the |
| 2743 |
// "messaging.operation" semantic conventions. It represents a string |
| 2744 |
// identifying the kind of messaging operation as defined in the [Operation |
| 2745 |
// names](#operation-names) section above. |
| 2746 |
// |
| 2747 |
// Type: Enum |
| 2748 |
// RequirementLevel: Required |
| 2749 |
// Stability: stable |
| 2750 |
// Note: If a custom value is used, it MUST be of low cardinality. |
| 2751 |
MessagingOperationKey = attribute.Key("messaging.operation") |
| 2752 |
|
| 2753 |
// MessagingBatchMessageCountKey is the attribute Key conforming to the |
| 2754 |
// "messaging.batch.message_count" semantic conventions. It represents the |
| 2755 |
// number of messages sent, received, or processed in the scope of the |
| 2756 |
// batching operation. |
| 2757 |
// |
| 2758 |
// Type: int |
| 2759 |
// RequirementLevel: ConditionallyRequired (If the span describes an |
| 2760 |
// operation on a batch of messages.) |
| 2761 |
// Stability: stable |
| 2762 |
// Examples: 0, 1, 2 |
| 2763 |
// Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on |
| 2764 |
// spans that operate with a single message. When a messaging client |
| 2765 |
// library supports both batch and single-message API for the same |
| 2766 |
// operation, instrumentations SHOULD use `messaging.batch.message_count` |
| 2767 |
// for batching APIs and SHOULD NOT use it for single-message APIs. |
| 2768 |
MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") |
| 2769 |
) |
| 2770 |
|
| 2771 |
var ( |
| 2772 |
// publish |
| 2773 |
MessagingOperationPublish = MessagingOperationKey.String("publish") |
| 2774 |
// receive |
| 2775 |
MessagingOperationReceive = MessagingOperationKey.String("receive") |
| 2776 |
// process |
| 2777 |
MessagingOperationProcess = MessagingOperationKey.String("process") |
| 2778 |
) |
| 2779 |
|
| 2780 |
// MessagingSystem returns an attribute KeyValue conforming to the |
| 2781 |
// "messaging.system" semantic conventions. It represents a string identifying |
| 2782 |
// the messaging system. |
| 2783 |
func MessagingSystem(val string) attribute.KeyValue { |
| 2784 |
return MessagingSystemKey.String(val) |
| 2785 |
} |
| 2786 |
|
| 2787 |
// MessagingBatchMessageCount returns an attribute KeyValue conforming to |
| 2788 |
// the "messaging.batch.message_count" semantic conventions. It represents the |
| 2789 |
// number of messages sent, received, or processed in the scope of the batching |
| 2790 |
// operation. |
| 2791 |
func MessagingBatchMessageCount(val int) attribute.KeyValue { |
| 2792 |
return MessagingBatchMessageCountKey.Int(val) |
| 2793 |
} |
| 2794 |
|
| 2795 |
// Semantic convention for a consumer of messages received from a messaging |
| 2796 |
// system |
| 2797 |
const ( |
| 2798 |
// MessagingConsumerIDKey is the attribute Key conforming to the |
| 2799 |
// "messaging.consumer.id" semantic conventions. It represents the |
| 2800 |
// identifier for the consumer receiving a message. For Kafka, set it to |
| 2801 |
// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if |
| 2802 |
// both are present, or only `messaging.kafka.consumer.group`. For brokers, |
| 2803 |
// such as RabbitMQ and Artemis, set it to the `client_id` of the client |
| 2804 |
// consuming the message. |
| 2805 |
// |
| 2806 |
// Type: string |
| 2807 |
// RequirementLevel: Optional |
| 2808 |
// Stability: stable |
| 2809 |
// Examples: 'mygroup - client-6' |
| 2810 |
MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") |
| 2811 |
) |
| 2812 |
|
| 2813 |
// MessagingConsumerID returns an attribute KeyValue conforming to the |
| 2814 |
// "messaging.consumer.id" semantic conventions. It represents the identifier |
| 2815 |
// for the consumer receiving a message. For Kafka, set it to |
| 2816 |
// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both |
| 2817 |
// are present, or only `messaging.kafka.consumer.group`. For brokers, such as |
| 2818 |
// RabbitMQ and Artemis, set it to the `client_id` of the client consuming the |
| 2819 |
// message. |
| 2820 |
func MessagingConsumerID(val string) attribute.KeyValue { |
| 2821 |
return MessagingConsumerIDKey.String(val) |
| 2822 |
} |
| 2823 |
|
| 2824 |
// Attributes for RabbitMQ |
| 2825 |
const ( |
| 2826 |
// MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key |
| 2827 |
// conforming to the "messaging.rabbitmq.destination.routing_key" semantic |
| 2828 |
// conventions. It represents the rabbitMQ message routing key. |
| 2829 |
// |
| 2830 |
// Type: string |
| 2831 |
// RequirementLevel: ConditionallyRequired (If not empty.) |
| 2832 |
// Stability: stable |
| 2833 |
// Examples: 'myKey' |
| 2834 |
MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") |
| 2835 |
) |
| 2836 |
|
| 2837 |
// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue |
| 2838 |
// conforming to the "messaging.rabbitmq.destination.routing_key" semantic |
| 2839 |
// conventions. It represents the rabbitMQ message routing key. |
| 2840 |
func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { |
| 2841 |
return MessagingRabbitmqDestinationRoutingKeyKey.String(val) |
| 2842 |
} |
| 2843 |
|
| 2844 |
// Attributes for Apache Kafka |
| 2845 |
const ( |
| 2846 |
// MessagingKafkaMessageKeyKey is the attribute Key conforming to the |
| 2847 |
// "messaging.kafka.message.key" semantic conventions. It represents the |
| 2848 |
// message keys in Kafka are used for grouping alike messages to ensure |
| 2849 |
// they're processed on the same partition. They differ from |
| 2850 |
// `messaging.message.id` in that they're not unique. If the key is `null`, |
| 2851 |
// the attribute MUST NOT be set. |
| 2852 |
// |
| 2853 |
// Type: string |
| 2854 |
// RequirementLevel: Optional |
| 2855 |
// Stability: stable |
| 2856 |
// Examples: 'myKey' |
| 2857 |
// Note: If the key type is not string, it's string representation has to |
| 2858 |
// be supplied for the attribute. If the key has no unambiguous, canonical |
| 2859 |
// string form, don't include its value. |
| 2860 |
MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") |
| 2861 |
|
| 2862 |
// MessagingKafkaConsumerGroupKey is the attribute Key conforming to the |
| 2863 |
// "messaging.kafka.consumer.group" semantic conventions. It represents the |
| 2864 |
// name of the Kafka Consumer Group that is handling the message. Only |
| 2865 |
// applies to consumers, not producers. |
| 2866 |
// |
| 2867 |
// Type: string |
| 2868 |
// RequirementLevel: Optional |
| 2869 |
// Stability: stable |
| 2870 |
// Examples: 'my-group' |
| 2871 |
MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") |
| 2872 |
|
| 2873 |
// MessagingKafkaClientIDKey is the attribute Key conforming to the |
| 2874 |
// "messaging.kafka.client_id" semantic conventions. It represents the |
| 2875 |
// client ID for the Consumer or Producer that is handling the message. |
| 2876 |
// |
| 2877 |
// Type: string |
| 2878 |
// RequirementLevel: Optional |
| 2879 |
// Stability: stable |
| 2880 |
// Examples: 'client-5' |
| 2881 |
MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") |
| 2882 |
|
| 2883 |
// MessagingKafkaDestinationPartitionKey is the attribute Key conforming to |
| 2884 |
// the "messaging.kafka.destination.partition" semantic conventions. It |
| 2885 |
// represents the partition the message is sent to. |
| 2886 |
// |
| 2887 |
// Type: int |
| 2888 |
// RequirementLevel: Optional |
| 2889 |
// Stability: stable |
| 2890 |
// Examples: 2 |
| 2891 |
MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") |
| 2892 |
|
| 2893 |
// MessagingKafkaSourcePartitionKey is the attribute Key conforming to the |
| 2894 |
// "messaging.kafka.source.partition" semantic conventions. It represents |
| 2895 |
// the partition the message is received from. |
| 2896 |
// |
| 2897 |
// Type: int |
| 2898 |
// RequirementLevel: Optional |
| 2899 |
// Stability: stable |
| 2900 |
// Examples: 2 |
| 2901 |
MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition") |
| 2902 |
|
| 2903 |
// MessagingKafkaMessageOffsetKey is the attribute Key conforming to the |
| 2904 |
// "messaging.kafka.message.offset" semantic conventions. It represents the |
| 2905 |
// offset of a record in the corresponding Kafka partition. |
| 2906 |
// |
| 2907 |
// Type: int |
| 2908 |
// RequirementLevel: Optional |
| 2909 |
// Stability: stable |
| 2910 |
// Examples: 42 |
| 2911 |
MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") |
| 2912 |
|
| 2913 |
// MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the |
| 2914 |
// "messaging.kafka.message.tombstone" semantic conventions. It represents |
| 2915 |
// a boolean that is true if the message is a tombstone. |
| 2916 |
// |
| 2917 |
// Type: boolean |
| 2918 |
// RequirementLevel: ConditionallyRequired (If value is `true`. When |
| 2919 |
// missing, the value is assumed to be `false`.) |
| 2920 |
// Stability: stable |
| 2921 |
MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") |
| 2922 |
) |
| 2923 |
|
| 2924 |
// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the |
| 2925 |
// "messaging.kafka.message.key" semantic conventions. It represents the |
| 2926 |
// message keys in Kafka are used for grouping alike messages to ensure they're |
| 2927 |
// processed on the same partition. They differ from `messaging.message.id` in |
| 2928 |
// that they're not unique. If the key is `null`, the attribute MUST NOT be |
| 2929 |
// set. |
| 2930 |
func MessagingKafkaMessageKey(val string) attribute.KeyValue { |
| 2931 |
return MessagingKafkaMessageKeyKey.String(val) |
| 2932 |
} |
| 2933 |
|
| 2934 |
// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to |
| 2935 |
// the "messaging.kafka.consumer.group" semantic conventions. It represents the |
| 2936 |
// name of the Kafka Consumer Group that is handling the message. Only applies |
| 2937 |
// to consumers, not producers. |
| 2938 |
func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { |
| 2939 |
return MessagingKafkaConsumerGroupKey.String(val) |
| 2940 |
} |
| 2941 |
|
| 2942 |
// MessagingKafkaClientID returns an attribute KeyValue conforming to the |
| 2943 |
// "messaging.kafka.client_id" semantic conventions. It represents the client |
| 2944 |
// ID for the Consumer or Producer that is handling the message. |
| 2945 |
func MessagingKafkaClientID(val string) attribute.KeyValue { |
| 2946 |
return MessagingKafkaClientIDKey.String(val) |
| 2947 |
} |
| 2948 |
|
| 2949 |
// MessagingKafkaDestinationPartition returns an attribute KeyValue |
| 2950 |
// conforming to the "messaging.kafka.destination.partition" semantic |
| 2951 |
// conventions. It represents the partition the message is sent to. |
| 2952 |
func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { |
| 2953 |
return MessagingKafkaDestinationPartitionKey.Int(val) |
| 2954 |
} |
| 2955 |
|
| 2956 |
// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to |
| 2957 |
// the "messaging.kafka.source.partition" semantic conventions. It represents |
| 2958 |
// the partition the message is received from. |
| 2959 |
func MessagingKafkaSourcePartition(val int) attribute.KeyValue { |
| 2960 |
return MessagingKafkaSourcePartitionKey.Int(val) |
| 2961 |
} |
| 2962 |
|
| 2963 |
// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to |
| 2964 |
// the "messaging.kafka.message.offset" semantic conventions. It represents the |
| 2965 |
// offset of a record in the corresponding Kafka partition. |
| 2966 |
func MessagingKafkaMessageOffset(val int) attribute.KeyValue { |
| 2967 |
return MessagingKafkaMessageOffsetKey.Int(val) |
| 2968 |
} |
| 2969 |
|
| 2970 |
// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming |
| 2971 |
// to the "messaging.kafka.message.tombstone" semantic conventions. It |
| 2972 |
// represents a boolean that is true if the message is a tombstone. |
| 2973 |
func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { |
| 2974 |
return MessagingKafkaMessageTombstoneKey.Bool(val) |
| 2975 |
} |
| 2976 |
|
| 2977 |
// Attributes for Apache RocketMQ |
| 2978 |
const ( |
| 2979 |
// MessagingRocketmqNamespaceKey is the attribute Key conforming to the |
| 2980 |
// "messaging.rocketmq.namespace" semantic conventions. It represents the |
| 2981 |
// namespace of RocketMQ resources, resources in different namespaces are |
| 2982 |
// individual. |
| 2983 |
// |
| 2984 |
// Type: string |
| 2985 |
// RequirementLevel: Required |
| 2986 |
// Stability: stable |
| 2987 |
// Examples: 'myNamespace' |
| 2988 |
MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") |
| 2989 |
|
| 2990 |
// MessagingRocketmqClientGroupKey is the attribute Key conforming to the |
| 2991 |
// "messaging.rocketmq.client_group" semantic conventions. It represents |
| 2992 |
// the name of the RocketMQ producer/consumer group that is handling the |
| 2993 |
// message. The client type is identified by the SpanKind. |
| 2994 |
// |
| 2995 |
// Type: string |
| 2996 |
// RequirementLevel: Required |
| 2997 |
// Stability: stable |
| 2998 |
// Examples: 'myConsumerGroup' |
| 2999 |
MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") |
| 3000 |
|
| 3001 |
// MessagingRocketmqClientIDKey is the attribute Key conforming to the |
| 3002 |
// "messaging.rocketmq.client_id" semantic conventions. It represents the |
| 3003 |
// unique identifier for each client. |
| 3004 |
// |
| 3005 |
// Type: string |
| 3006 |
// RequirementLevel: Required |
| 3007 |
// Stability: stable |
| 3008 |
// Examples: 'myhost@8742@s8083jm' |
| 3009 |
MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") |
| 3010 |
|
| 3011 |
// MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key |
| 3012 |
// conforming to the "messaging.rocketmq.message.delivery_timestamp" |
| 3013 |
// semantic conventions. It represents the timestamp in milliseconds that |
| 3014 |
// the delay message is expected to be delivered to consumer. |
| 3015 |
// |
| 3016 |
// Type: int |
| 3017 |
// RequirementLevel: ConditionallyRequired (If the message type is delay |
| 3018 |
// and delay time level is not specified.) |
| 3019 |
// Stability: stable |
| 3020 |
// Examples: 1665987217045 |
| 3021 |
MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") |
| 3022 |
|
| 3023 |
// MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key |
| 3024 |
// conforming to the "messaging.rocketmq.message.delay_time_level" semantic |
| 3025 |
// conventions. It represents the delay time level for delay message, which |
| 3026 |
// determines the message delay time. |
| 3027 |
// |
| 3028 |
// Type: int |
| 3029 |
// RequirementLevel: ConditionallyRequired (If the message type is delay |
| 3030 |
// and delivery timestamp is not specified.) |
| 3031 |
// Stability: stable |
| 3032 |
// Examples: 3 |
| 3033 |
MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") |
| 3034 |
|
| 3035 |
// MessagingRocketmqMessageGroupKey is the attribute Key conforming to the |
| 3036 |
// "messaging.rocketmq.message.group" semantic conventions. It represents |
| 3037 |
// the it is essential for FIFO message. Messages that belong to the same |
| 3038 |
// message group are always processed one by one within the same consumer |
| 3039 |
// group. |
| 3040 |
// |
| 3041 |
// Type: string |
| 3042 |
// RequirementLevel: ConditionallyRequired (If the message type is FIFO.) |
| 3043 |
// Stability: stable |
| 3044 |
// Examples: 'myMessageGroup' |
| 3045 |
MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") |
| 3046 |
|
| 3047 |
// MessagingRocketmqMessageTypeKey is the attribute Key conforming to the |
| 3048 |
// "messaging.rocketmq.message.type" semantic conventions. It represents |
| 3049 |
// the type of message. |
| 3050 |
// |
| 3051 |
// Type: Enum |
| 3052 |
// RequirementLevel: Optional |
| 3053 |
// Stability: stable |
| 3054 |
MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") |
| 3055 |
|
| 3056 |
// MessagingRocketmqMessageTagKey is the attribute Key conforming to the |
| 3057 |
// "messaging.rocketmq.message.tag" semantic conventions. It represents the |
| 3058 |
// secondary classifier of message besides topic. |
| 3059 |
// |
| 3060 |
// Type: string |
| 3061 |
// RequirementLevel: Optional |
| 3062 |
// Stability: stable |
| 3063 |
// Examples: 'tagA' |
| 3064 |
MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") |
| 3065 |
|
| 3066 |
// MessagingRocketmqMessageKeysKey is the attribute Key conforming to the |
| 3067 |
// "messaging.rocketmq.message.keys" semantic conventions. It represents |
| 3068 |
// the key(s) of message, another way to mark message besides message id. |
| 3069 |
// |
| 3070 |
// Type: string[] |
| 3071 |
// RequirementLevel: Optional |
| 3072 |
// Stability: stable |
| 3073 |
// Examples: 'keyA', 'keyB' |
| 3074 |
MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") |
| 3075 |
|
| 3076 |
// MessagingRocketmqConsumptionModelKey is the attribute Key conforming to |
| 3077 |
// the "messaging.rocketmq.consumption_model" semantic conventions. It |
| 3078 |
// represents the model of message consumption. This only applies to |
| 3079 |
// consumer spans. |
| 3080 |
// |
| 3081 |
// Type: Enum |
| 3082 |
// RequirementLevel: Optional |
| 3083 |
// Stability: stable |
| 3084 |
MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") |
| 3085 |
) |
| 3086 |
|
| 3087 |
var ( |
| 3088 |
// Normal message |
| 3089 |
MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") |
| 3090 |
// FIFO message |
| 3091 |
MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") |
| 3092 |
// Delay message |
| 3093 |
MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") |
| 3094 |
// Transaction message |
| 3095 |
MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") |
| 3096 |
) |
| 3097 |
|
| 3098 |
var ( |
| 3099 |
// Clustering consumption model |
| 3100 |
MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") |
| 3101 |
// Broadcasting consumption model |
| 3102 |
MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") |
| 3103 |
) |
| 3104 |
|
| 3105 |
// MessagingRocketmqNamespace returns an attribute KeyValue conforming to |
| 3106 |
// the "messaging.rocketmq.namespace" semantic conventions. It represents the |
| 3107 |
// namespace of RocketMQ resources, resources in different namespaces are |
| 3108 |
// individual. |
| 3109 |
func MessagingRocketmqNamespace(val string) attribute.KeyValue { |
| 3110 |
return MessagingRocketmqNamespaceKey.String(val) |
| 3111 |
} |
| 3112 |
|
| 3113 |
// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to |
| 3114 |
// the "messaging.rocketmq.client_group" semantic conventions. It represents |
| 3115 |
// the name of the RocketMQ producer/consumer group that is handling the |
| 3116 |
// message. The client type is identified by the SpanKind. |
| 3117 |
func MessagingRocketmqClientGroup(val string) attribute.KeyValue { |
| 3118 |
return MessagingRocketmqClientGroupKey.String(val) |
| 3119 |
} |
| 3120 |
|
| 3121 |
// MessagingRocketmqClientID returns an attribute KeyValue conforming to the |
| 3122 |
// "messaging.rocketmq.client_id" semantic conventions. It represents the |
| 3123 |
// unique identifier for each client. |
| 3124 |
func MessagingRocketmqClientID(val string) attribute.KeyValue { |
| 3125 |
return MessagingRocketmqClientIDKey.String(val) |
| 3126 |
} |
| 3127 |
|
| 3128 |
// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue |
| 3129 |
// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic |
| 3130 |
// conventions. It represents the timestamp in milliseconds that the delay |
| 3131 |
// message is expected to be delivered to consumer. |
| 3132 |
func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { |
| 3133 |
return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) |
| 3134 |
} |
| 3135 |
|
| 3136 |
// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue |
| 3137 |
// conforming to the "messaging.rocketmq.message.delay_time_level" semantic |
| 3138 |
// conventions. It represents the delay time level for delay message, which |
| 3139 |
// determines the message delay time. |
| 3140 |
func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { |
| 3141 |
return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) |
| 3142 |
} |
| 3143 |
|
| 3144 |
// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to |
| 3145 |
// the "messaging.rocketmq.message.group" semantic conventions. It represents |
| 3146 |
// the it is essential for FIFO message. Messages that belong to the same |
| 3147 |
// message group are always processed one by one within the same consumer |
| 3148 |
// group. |
| 3149 |
func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { |
| 3150 |
return MessagingRocketmqMessageGroupKey.String(val) |
| 3151 |
} |
| 3152 |
|
| 3153 |
// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to |
| 3154 |
// the "messaging.rocketmq.message.tag" semantic conventions. It represents the |
| 3155 |
// secondary classifier of message besides topic. |
| 3156 |
func MessagingRocketmqMessageTag(val string) attribute.KeyValue { |
| 3157 |
return MessagingRocketmqMessageTagKey.String(val) |
| 3158 |
} |
| 3159 |
|
| 3160 |
// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to |
| 3161 |
// the "messaging.rocketmq.message.keys" semantic conventions. It represents |
| 3162 |
// the key(s) of message, another way to mark message besides message id. |
| 3163 |
func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { |
| 3164 |
return MessagingRocketmqMessageKeysKey.StringSlice(val) |
| 3165 |
} |
| 3166 |
|
| 3167 |
// Semantic conventions for remote procedure calls. |
| 3168 |
const ( |
| 3169 |
// RPCSystemKey is the attribute Key conforming to the "rpc.system" |
| 3170 |
// semantic conventions. It represents a string identifying the remoting |
| 3171 |
// system. See below for a list of well-known identifiers. |
| 3172 |
// |
| 3173 |
// Type: Enum |
| 3174 |
// RequirementLevel: Required |
| 3175 |
// Stability: stable |
| 3176 |
RPCSystemKey = attribute.Key("rpc.system") |
| 3177 |
|
| 3178 |
// RPCServiceKey is the attribute Key conforming to the "rpc.service" |
| 3179 |
// semantic conventions. It represents the full (logical) name of the |
| 3180 |
// service being called, including its package name, if applicable. |
| 3181 |
// |
| 3182 |
// Type: string |
| 3183 |
// RequirementLevel: Recommended |
| 3184 |
// Stability: stable |
| 3185 |
// Examples: 'myservice.EchoService' |
| 3186 |
// Note: This is the logical name of the service from the RPC interface |
| 3187 |
// perspective, which can be different from the name of any implementing |
| 3188 |
// class. The `code.namespace` attribute may be used to store the latter |
| 3189 |
// (despite the attribute name, it may include a class name; e.g., class |
| 3190 |
// with method actually executing the call on the server side, RPC client |
| 3191 |
// stub class on the client side). |
| 3192 |
RPCServiceKey = attribute.Key("rpc.service") |
| 3193 |
|
| 3194 |
// RPCMethodKey is the attribute Key conforming to the "rpc.method" |
| 3195 |
// semantic conventions. It represents the name of the (logical) method |
| 3196 |
// being called, must be equal to the $method part in the span name. |
| 3197 |
// |
| 3198 |
// Type: string |
| 3199 |
// RequirementLevel: Recommended |
| 3200 |
// Stability: stable |
| 3201 |
// Examples: 'exampleMethod' |
| 3202 |
// Note: This is the logical name of the method from the RPC interface |
| 3203 |
// perspective, which can be different from the name of any implementing |
| 3204 |
// method/function. The `code.function` attribute may be used to store the |
| 3205 |
// latter (e.g., method actually executing the call on the server side, RPC |
| 3206 |
// client stub method on the client side). |
| 3207 |
RPCMethodKey = attribute.Key("rpc.method") |
| 3208 |
) |
| 3209 |
|
| 3210 |
var ( |
| 3211 |
// gRPC |
| 3212 |
RPCSystemGRPC = RPCSystemKey.String("grpc") |
| 3213 |
// Java RMI |
| 3214 |
RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") |
| 3215 |
// .NET WCF |
| 3216 |
RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") |
| 3217 |
// Apache Dubbo |
| 3218 |
RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") |
| 3219 |
) |
| 3220 |
|
| 3221 |
// RPCService returns an attribute KeyValue conforming to the "rpc.service" |
| 3222 |
// semantic conventions. It represents the full (logical) name of the service |
| 3223 |
// being called, including its package name, if applicable. |
| 3224 |
func RPCService(val string) attribute.KeyValue { |
| 3225 |
return RPCServiceKey.String(val) |
| 3226 |
} |
| 3227 |
|
| 3228 |
// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" |
| 3229 |
// semantic conventions. It represents the name of the (logical) method being |
| 3230 |
// called, must be equal to the $method part in the span name. |
| 3231 |
func RPCMethod(val string) attribute.KeyValue { |
| 3232 |
return RPCMethodKey.String(val) |
| 3233 |
} |
| 3234 |
|
| 3235 |
// Tech-specific attributes for gRPC. |
| 3236 |
const ( |
| 3237 |
// RPCGRPCStatusCodeKey is the attribute Key conforming to the |
| 3238 |
// "rpc.grpc.status_code" semantic conventions. It represents the [numeric |
| 3239 |
// status |
| 3240 |
// code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of |
| 3241 |
// the gRPC request. |
| 3242 |
// |
| 3243 |
// Type: Enum |
| 3244 |
// RequirementLevel: Required |
| 3245 |
// Stability: stable |
| 3246 |
RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") |
| 3247 |
) |
| 3248 |
|
| 3249 |
var ( |
| 3250 |
// OK |
| 3251 |
RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) |
| 3252 |
// CANCELLED |
| 3253 |
RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) |
| 3254 |
// UNKNOWN |
| 3255 |
RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) |
| 3256 |
// INVALID_ARGUMENT |
| 3257 |
RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) |
| 3258 |
// DEADLINE_EXCEEDED |
| 3259 |
RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) |
| 3260 |
// NOT_FOUND |
| 3261 |
RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) |
| 3262 |
// ALREADY_EXISTS |
| 3263 |
RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) |
| 3264 |
// PERMISSION_DENIED |
| 3265 |
RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) |
| 3266 |
// RESOURCE_EXHAUSTED |
| 3267 |
RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) |
| 3268 |
// FAILED_PRECONDITION |
| 3269 |
RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) |
| 3270 |
// ABORTED |
| 3271 |
RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) |
| 3272 |
// OUT_OF_RANGE |
| 3273 |
RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) |
| 3274 |
// UNIMPLEMENTED |
| 3275 |
RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) |
| 3276 |
// INTERNAL |
| 3277 |
RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) |
| 3278 |
// UNAVAILABLE |
| 3279 |
RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) |
| 3280 |
// DATA_LOSS |
| 3281 |
RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) |
| 3282 |
// UNAUTHENTICATED |
| 3283 |
RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) |
| 3284 |
) |
| 3285 |
|
| 3286 |
// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). |
| 3287 |
const ( |
| 3288 |
// RPCJsonrpcVersionKey is the attribute Key conforming to the |
| 3289 |
// "rpc.jsonrpc.version" semantic conventions. It represents the protocol |
| 3290 |
// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 |
| 3291 |
// does not specify this, the value can be omitted. |
| 3292 |
// |
| 3293 |
// Type: string |
| 3294 |
// RequirementLevel: ConditionallyRequired (If other than the default |
| 3295 |
// version (`1.0`)) |
| 3296 |
// Stability: stable |
| 3297 |
// Examples: '2.0', '1.0' |
| 3298 |
RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") |
| 3299 |
|
| 3300 |
// RPCJsonrpcRequestIDKey is the attribute Key conforming to the |
| 3301 |
// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` |
| 3302 |
// property of request or response. Since protocol allows id to be int, |
| 3303 |
// string, `null` or missing (for notifications), value is expected to be |
| 3304 |
// cast to string for simplicity. Use empty string in case of `null` value. |
| 3305 |
// Omit entirely if this is a notification. |
| 3306 |
// |
| 3307 |
// Type: string |
| 3308 |
// RequirementLevel: Optional |
| 3309 |
// Stability: stable |
| 3310 |
// Examples: '10', 'request-7', '' |
| 3311 |
RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") |
| 3312 |
|
| 3313 |
// RPCJsonrpcErrorCodeKey is the attribute Key conforming to the |
| 3314 |
// "rpc.jsonrpc.error_code" semantic conventions. It represents the |
| 3315 |
// `error.code` property of response if it is an error response. |
| 3316 |
// |
| 3317 |
// Type: int |
| 3318 |
// RequirementLevel: ConditionallyRequired (If response is not successful.) |
| 3319 |
// Stability: stable |
| 3320 |
// Examples: -32700, 100 |
| 3321 |
RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") |
| 3322 |
|
| 3323 |
// RPCJsonrpcErrorMessageKey is the attribute Key conforming to the |
| 3324 |
// "rpc.jsonrpc.error_message" semantic conventions. It represents the |
| 3325 |
// `error.message` property of response if it is an error response. |
| 3326 |
// |
| 3327 |
// Type: string |
| 3328 |
// RequirementLevel: Optional |
| 3329 |
// Stability: stable |
| 3330 |
// Examples: 'Parse error', 'User already exists' |
| 3331 |
RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") |
| 3332 |
) |
| 3333 |
|
| 3334 |
// RPCJsonrpcVersion returns an attribute KeyValue conforming to the |
| 3335 |
// "rpc.jsonrpc.version" semantic conventions. It represents the protocol |
| 3336 |
// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 |
| 3337 |
// does not specify this, the value can be omitted. |
| 3338 |
func RPCJsonrpcVersion(val string) attribute.KeyValue { |
| 3339 |
return RPCJsonrpcVersionKey.String(val) |
| 3340 |
} |
| 3341 |
|
| 3342 |
// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the |
| 3343 |
// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` |
| 3344 |
// property of request or response. Since protocol allows id to be int, string, |
| 3345 |
// `null` or missing (for notifications), value is expected to be cast to |
| 3346 |
// string for simplicity. Use empty string in case of `null` value. Omit |
| 3347 |
// entirely if this is a notification. |
| 3348 |
func RPCJsonrpcRequestID(val string) attribute.KeyValue { |
| 3349 |
return RPCJsonrpcRequestIDKey.String(val) |
| 3350 |
} |
| 3351 |
|
| 3352 |
// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the |
| 3353 |
// "rpc.jsonrpc.error_code" semantic conventions. It represents the |
| 3354 |
// `error.code` property of response if it is an error response. |
| 3355 |
func RPCJsonrpcErrorCode(val int) attribute.KeyValue { |
| 3356 |
return RPCJsonrpcErrorCodeKey.Int(val) |
| 3357 |
} |
| 3358 |
|
| 3359 |
// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the |
| 3360 |
// "rpc.jsonrpc.error_message" semantic conventions. It represents the |
| 3361 |
// `error.message` property of response if it is an error response. |
| 3362 |
func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { |
| 3363 |
return RPCJsonrpcErrorMessageKey.String(val) |
| 3364 |
} |