| 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.23.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 |
// ExceptionMessageKey is the attribute Key conforming to the |
| 14 |
// "exception.message" semantic conventions. It represents the exception |
| 15 |
// message. |
| 16 |
// |
| 17 |
// Type: string |
| 18 |
// RequirementLevel: Optional |
| 19 |
// Stability: experimental |
| 20 |
// Examples: 'Division by zero', "Can't convert 'int' object to str |
| 21 |
// implicitly" |
| 22 |
ExceptionMessageKey = attribute.Key("exception.message") |
| 23 |
|
| 24 |
// ExceptionStacktraceKey is the attribute Key conforming to the |
| 25 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace |
| 26 |
// as a string in the natural representation for the language runtime. The |
| 27 |
// representation is to be determined and documented by each language SIG. |
| 28 |
// |
| 29 |
// Type: string |
| 30 |
// RequirementLevel: Optional |
| 31 |
// Stability: experimental |
| 32 |
// Examples: 'Exception in thread "main" java.lang.RuntimeException: Test |
| 33 |
// exception\\n at ' |
| 34 |
// 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' |
| 35 |
// 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' |
| 36 |
// 'com.example.GenerateTrace.main(GenerateTrace.java:5)' |
| 37 |
ExceptionStacktraceKey = attribute.Key("exception.stacktrace") |
| 38 |
|
| 39 |
// ExceptionTypeKey is the attribute Key conforming to the "exception.type" |
| 40 |
// semantic conventions. It represents the type of the exception (its |
| 41 |
// fully-qualified class name, if applicable). The dynamic type of the |
| 42 |
// exception should be preferred over the static type in languages that |
| 43 |
// support it. |
| 44 |
// |
| 45 |
// Type: string |
| 46 |
// RequirementLevel: Optional |
| 47 |
// Stability: experimental |
| 48 |
// Examples: 'java.net.ConnectException', 'OSError' |
| 49 |
ExceptionTypeKey = attribute.Key("exception.type") |
| 50 |
) |
| 51 |
|
| 52 |
// ExceptionMessage returns an attribute KeyValue conforming to the |
| 53 |
// "exception.message" semantic conventions. It represents the exception |
| 54 |
// message. |
| 55 |
func ExceptionMessage(val string) attribute.KeyValue { |
| 56 |
return ExceptionMessageKey.String(val) |
| 57 |
} |
| 58 |
|
| 59 |
// ExceptionStacktrace returns an attribute KeyValue conforming to the |
| 60 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace as a |
| 61 |
// string in the natural representation for the language runtime. The |
| 62 |
// representation is to be determined and documented by each language SIG. |
| 63 |
func ExceptionStacktrace(val string) attribute.KeyValue { |
| 64 |
return ExceptionStacktraceKey.String(val) |
| 65 |
} |
| 66 |
|
| 67 |
// ExceptionType returns an attribute KeyValue conforming to the |
| 68 |
// "exception.type" semantic conventions. It represents the type of the |
| 69 |
// exception (its fully-qualified class name, if applicable). The dynamic type |
| 70 |
// of the exception should be preferred over the static type in languages that |
| 71 |
// support it. |
| 72 |
func ExceptionType(val string) attribute.KeyValue { |
| 73 |
return ExceptionTypeKey.String(val) |
| 74 |
} |
| 75 |
|
| 76 |
// Operations that access some remote service. |
| 77 |
const ( |
| 78 |
// PeerServiceKey is the attribute Key conforming to the "peer.service" |
| 79 |
// semantic conventions. It represents the |
| 80 |
// [`service.name`](/docs/resource/README.md#service) of the remote |
| 81 |
// service. SHOULD be equal to the actual `service.name` resource attribute |
| 82 |
// of the remote service if any. |
| 83 |
// |
| 84 |
// Type: string |
| 85 |
// RequirementLevel: Optional |
| 86 |
// Stability: experimental |
| 87 |
// Examples: 'AuthTokenCache' |
| 88 |
PeerServiceKey = attribute.Key("peer.service") |
| 89 |
) |
| 90 |
|
| 91 |
// PeerService returns an attribute KeyValue conforming to the |
| 92 |
// "peer.service" semantic conventions. It represents the |
| 93 |
// [`service.name`](/docs/resource/README.md#service) of the remote service. |
| 94 |
// SHOULD be equal to the actual `service.name` resource attribute of the |
| 95 |
// remote service if any. |
| 96 |
func PeerService(val string) attribute.KeyValue { |
| 97 |
return PeerServiceKey.String(val) |
| 98 |
} |
| 99 |
|
| 100 |
// These attributes may be used for any operation with an authenticated and/or |
| 101 |
// authorized enduser. |
| 102 |
const ( |
| 103 |
// EnduserIDKey is the attribute Key conforming to the "enduser.id" |
| 104 |
// semantic conventions. It represents the username or client_id extracted |
| 105 |
// from the access token or |
| 106 |
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header |
| 107 |
// in the inbound request from outside the system. |
| 108 |
// |
| 109 |
// Type: string |
| 110 |
// RequirementLevel: Optional |
| 111 |
// Stability: experimental |
| 112 |
// Examples: 'username' |
| 113 |
EnduserIDKey = attribute.Key("enduser.id") |
| 114 |
|
| 115 |
// EnduserRoleKey is the attribute Key conforming to the "enduser.role" |
| 116 |
// semantic conventions. It represents the actual/assumed role the client |
| 117 |
// is making the request under extracted from token or application security |
| 118 |
// context. |
| 119 |
// |
| 120 |
// Type: string |
| 121 |
// RequirementLevel: Optional |
| 122 |
// Stability: experimental |
| 123 |
// Examples: 'admin' |
| 124 |
EnduserRoleKey = attribute.Key("enduser.role") |
| 125 |
|
| 126 |
// EnduserScopeKey is the attribute Key conforming to the "enduser.scope" |
| 127 |
// semantic conventions. It represents the scopes or granted authorities |
| 128 |
// the client currently possesses extracted from token or application |
| 129 |
// security context. The value would come from the scope associated with an |
| 130 |
// [OAuth 2.0 Access |
| 131 |
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute |
| 132 |
// value in a [SAML 2.0 |
| 133 |
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). |
| 134 |
// |
| 135 |
// Type: string |
| 136 |
// RequirementLevel: Optional |
| 137 |
// Stability: experimental |
| 138 |
// Examples: 'read:message, write:files' |
| 139 |
EnduserScopeKey = attribute.Key("enduser.scope") |
| 140 |
) |
| 141 |
|
| 142 |
// EnduserID returns an attribute KeyValue conforming to the "enduser.id" |
| 143 |
// semantic conventions. It represents the username or client_id extracted from |
| 144 |
// the access token or |
| 145 |
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in |
| 146 |
// the inbound request from outside the system. |
| 147 |
func EnduserID(val string) attribute.KeyValue { |
| 148 |
return EnduserIDKey.String(val) |
| 149 |
} |
| 150 |
|
| 151 |
// EnduserRole returns an attribute KeyValue conforming to the |
| 152 |
// "enduser.role" semantic conventions. It represents the actual/assumed role |
| 153 |
// the client is making the request under extracted from token or application |
| 154 |
// security context. |
| 155 |
func EnduserRole(val string) attribute.KeyValue { |
| 156 |
return EnduserRoleKey.String(val) |
| 157 |
} |
| 158 |
|
| 159 |
// EnduserScope returns an attribute KeyValue conforming to the |
| 160 |
// "enduser.scope" semantic conventions. It represents the scopes or granted |
| 161 |
// authorities the client currently possesses extracted from token or |
| 162 |
// application security context. The value would come from the scope associated |
| 163 |
// with an [OAuth 2.0 Access |
| 164 |
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute |
| 165 |
// value in a [SAML 2.0 |
| 166 |
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). |
| 167 |
func EnduserScope(val string) attribute.KeyValue { |
| 168 |
return EnduserScopeKey.String(val) |
| 169 |
} |
| 170 |
|
| 171 |
// These attributes allow to report this unit of code and therefore to provide |
| 172 |
// more context about the span. |
| 173 |
const ( |
| 174 |
// CodeColumnKey is the attribute Key conforming to the "code.column" |
| 175 |
// semantic conventions. It represents the column number in `code.filepath` |
| 176 |
// best representing the operation. It SHOULD point within the code unit |
| 177 |
// named in `code.function`. |
| 178 |
// |
| 179 |
// Type: int |
| 180 |
// RequirementLevel: Optional |
| 181 |
// Stability: experimental |
| 182 |
// Examples: 16 |
| 183 |
CodeColumnKey = attribute.Key("code.column") |
| 184 |
|
| 185 |
// CodeFilepathKey is the attribute Key conforming to the "code.filepath" |
| 186 |
// semantic conventions. It represents the source code file name that |
| 187 |
// identifies the code unit as uniquely as possible (preferably an absolute |
| 188 |
// file path). |
| 189 |
// |
| 190 |
// Type: string |
| 191 |
// RequirementLevel: Optional |
| 192 |
// Stability: experimental |
| 193 |
// Examples: '/usr/local/MyApplication/content_root/app/index.php' |
| 194 |
CodeFilepathKey = attribute.Key("code.filepath") |
| 195 |
|
| 196 |
// CodeFunctionKey is the attribute Key conforming to the "code.function" |
| 197 |
// semantic conventions. It represents the method or function name, or |
| 198 |
// equivalent (usually rightmost part of the code unit's name). |
| 199 |
// |
| 200 |
// Type: string |
| 201 |
// RequirementLevel: Optional |
| 202 |
// Stability: experimental |
| 203 |
// Examples: 'serveRequest' |
| 204 |
CodeFunctionKey = attribute.Key("code.function") |
| 205 |
|
| 206 |
// CodeLineNumberKey is the attribute Key conforming to the "code.lineno" |
| 207 |
// semantic conventions. It represents the line number in `code.filepath` |
| 208 |
// best representing the operation. It SHOULD point within the code unit |
| 209 |
// named in `code.function`. |
| 210 |
// |
| 211 |
// Type: int |
| 212 |
// RequirementLevel: Optional |
| 213 |
// Stability: experimental |
| 214 |
// Examples: 42 |
| 215 |
CodeLineNumberKey = attribute.Key("code.lineno") |
| 216 |
|
| 217 |
// CodeNamespaceKey is the attribute Key conforming to the "code.namespace" |
| 218 |
// semantic conventions. It represents the "namespace" within which |
| 219 |
// `code.function` is defined. Usually the qualified class or module name, |
| 220 |
// such that `code.namespace` + some separator + `code.function` form a |
| 221 |
// unique identifier for the code unit. |
| 222 |
// |
| 223 |
// Type: string |
| 224 |
// RequirementLevel: Optional |
| 225 |
// Stability: experimental |
| 226 |
// Examples: 'com.example.MyHTTPService' |
| 227 |
CodeNamespaceKey = attribute.Key("code.namespace") |
| 228 |
) |
| 229 |
|
| 230 |
// CodeColumn returns an attribute KeyValue conforming to the "code.column" |
| 231 |
// semantic conventions. It represents the column number in `code.filepath` |
| 232 |
// best representing the operation. It SHOULD point within the code unit named |
| 233 |
// in `code.function`. |
| 234 |
func CodeColumn(val int) attribute.KeyValue { |
| 235 |
return CodeColumnKey.Int(val) |
| 236 |
} |
| 237 |
|
| 238 |
// CodeFilepath returns an attribute KeyValue conforming to the |
| 239 |
// "code.filepath" semantic conventions. It represents the source code file |
| 240 |
// name that identifies the code unit as uniquely as possible (preferably an |
| 241 |
// absolute file path). |
| 242 |
func CodeFilepath(val string) attribute.KeyValue { |
| 243 |
return CodeFilepathKey.String(val) |
| 244 |
} |
| 245 |
|
| 246 |
// CodeFunction returns an attribute KeyValue conforming to the |
| 247 |
// "code.function" semantic conventions. It represents the method or function |
| 248 |
// name, or equivalent (usually rightmost part of the code unit's name). |
| 249 |
func CodeFunction(val string) attribute.KeyValue { |
| 250 |
return CodeFunctionKey.String(val) |
| 251 |
} |
| 252 |
|
| 253 |
// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" |
| 254 |
// semantic conventions. It represents the line number in `code.filepath` best |
| 255 |
// representing the operation. It SHOULD point within the code unit named in |
| 256 |
// `code.function`. |
| 257 |
func CodeLineNumber(val int) attribute.KeyValue { |
| 258 |
return CodeLineNumberKey.Int(val) |
| 259 |
} |
| 260 |
|
| 261 |
// CodeNamespace returns an attribute KeyValue conforming to the |
| 262 |
// "code.namespace" semantic conventions. It represents the "namespace" within |
| 263 |
// which `code.function` is defined. Usually the qualified class or module |
| 264 |
// name, such that `code.namespace` + some separator + `code.function` form a |
| 265 |
// unique identifier for the code unit. |
| 266 |
func CodeNamespace(val string) attribute.KeyValue { |
| 267 |
return CodeNamespaceKey.String(val) |
| 268 |
} |
| 269 |
|
| 270 |
// These attributes may be used for any operation to store information about a |
| 271 |
// thread that started a span. |
| 272 |
const ( |
| 273 |
// ThreadIDKey is the attribute Key conforming to the "thread.id" semantic |
| 274 |
// conventions. It represents the current "managed" thread ID (as opposed |
| 275 |
// to OS thread ID). |
| 276 |
// |
| 277 |
// Type: int |
| 278 |
// RequirementLevel: Optional |
| 279 |
// Stability: experimental |
| 280 |
// Examples: 42 |
| 281 |
ThreadIDKey = attribute.Key("thread.id") |
| 282 |
|
| 283 |
// ThreadNameKey is the attribute Key conforming to the "thread.name" |
| 284 |
// semantic conventions. It represents the current thread name. |
| 285 |
// |
| 286 |
// Type: string |
| 287 |
// RequirementLevel: Optional |
| 288 |
// Stability: experimental |
| 289 |
// Examples: 'main' |
| 290 |
ThreadNameKey = attribute.Key("thread.name") |
| 291 |
) |
| 292 |
|
| 293 |
// ThreadID returns an attribute KeyValue conforming to the "thread.id" |
| 294 |
// semantic conventions. It represents the current "managed" thread ID (as |
| 295 |
// opposed to OS thread ID). |
| 296 |
func ThreadID(val int) attribute.KeyValue { |
| 297 |
return ThreadIDKey.Int(val) |
| 298 |
} |
| 299 |
|
| 300 |
// ThreadName returns an attribute KeyValue conforming to the "thread.name" |
| 301 |
// semantic conventions. It represents the current thread name. |
| 302 |
func ThreadName(val string) attribute.KeyValue { |
| 303 |
return ThreadNameKey.String(val) |
| 304 |
} |
| 305 |
|
| 306 |
// Span attributes used by AWS Lambda (in addition to general `faas` |
| 307 |
// attributes). |
| 308 |
const ( |
| 309 |
// AWSLambdaInvokedARNKey is the attribute Key conforming to the |
| 310 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 311 |
// invoked ARN as provided on the `Context` passed to the function |
| 312 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 313 |
// `/runtime/invocation/next` applicable). |
| 314 |
// |
| 315 |
// Type: string |
| 316 |
// RequirementLevel: Optional |
| 317 |
// Stability: experimental |
| 318 |
// Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' |
| 319 |
// Note: This may be different from `cloud.resource_id` if an alias is |
| 320 |
// involved. |
| 321 |
AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") |
| 322 |
) |
| 323 |
|
| 324 |
// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the |
| 325 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 326 |
// invoked ARN as provided on the `Context` passed to the function |
| 327 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 328 |
// `/runtime/invocation/next` applicable). |
| 329 |
func AWSLambdaInvokedARN(val string) attribute.KeyValue { |
| 330 |
return AWSLambdaInvokedARNKey.String(val) |
| 331 |
} |
| 332 |
|
| 333 |
// Attributes for CloudEvents. CloudEvents is a specification on how to define |
| 334 |
// event data in a standard way. These attributes can be attached to spans when |
| 335 |
// performing operations with CloudEvents, regardless of the protocol being |
| 336 |
// used. |
| 337 |
const ( |
| 338 |
// CloudeventsEventIDKey is the attribute Key conforming to the |
| 339 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 340 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 341 |
// uniquely identifies the event. |
| 342 |
// |
| 343 |
// Type: string |
| 344 |
// RequirementLevel: Required |
| 345 |
// Stability: experimental |
| 346 |
// Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' |
| 347 |
CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") |
| 348 |
|
| 349 |
// CloudeventsEventSourceKey is the attribute Key conforming to the |
| 350 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 351 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 352 |
// identifies the context in which an event happened. |
| 353 |
// |
| 354 |
// Type: string |
| 355 |
// RequirementLevel: Required |
| 356 |
// Stability: experimental |
| 357 |
// Examples: 'https://github.com/cloudevents', |
| 358 |
// '/cloudevents/spec/pull/123', 'my-service' |
| 359 |
CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") |
| 360 |
|
| 361 |
// CloudeventsEventSpecVersionKey is the attribute Key conforming to the |
| 362 |
// "cloudevents.event_spec_version" semantic conventions. It represents the |
| 363 |
// [version of the CloudEvents |
| 364 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 365 |
// which the event uses. |
| 366 |
// |
| 367 |
// Type: string |
| 368 |
// RequirementLevel: Optional |
| 369 |
// Stability: experimental |
| 370 |
// Examples: '1.0' |
| 371 |
CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") |
| 372 |
|
| 373 |
// CloudeventsEventSubjectKey is the attribute Key conforming to the |
| 374 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 375 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 376 |
// of the event in the context of the event producer (identified by |
| 377 |
// source). |
| 378 |
// |
| 379 |
// Type: string |
| 380 |
// RequirementLevel: Optional |
| 381 |
// Stability: experimental |
| 382 |
// Examples: 'mynewfile.jpg' |
| 383 |
CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") |
| 384 |
|
| 385 |
// CloudeventsEventTypeKey is the attribute Key conforming to the |
| 386 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 387 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 388 |
// contains a value describing the type of event related to the originating |
| 389 |
// occurrence. |
| 390 |
// |
| 391 |
// Type: string |
| 392 |
// RequirementLevel: Optional |
| 393 |
// Stability: experimental |
| 394 |
// Examples: 'com.github.pull_request.opened', |
| 395 |
// 'com.example.object.deleted.v2' |
| 396 |
CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") |
| 397 |
) |
| 398 |
|
| 399 |
// CloudeventsEventID returns an attribute KeyValue conforming to the |
| 400 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 401 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 402 |
// uniquely identifies the event. |
| 403 |
func CloudeventsEventID(val string) attribute.KeyValue { |
| 404 |
return CloudeventsEventIDKey.String(val) |
| 405 |
} |
| 406 |
|
| 407 |
// CloudeventsEventSource returns an attribute KeyValue conforming to the |
| 408 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 409 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 410 |
// identifies the context in which an event happened. |
| 411 |
func CloudeventsEventSource(val string) attribute.KeyValue { |
| 412 |
return CloudeventsEventSourceKey.String(val) |
| 413 |
} |
| 414 |
|
| 415 |
// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to |
| 416 |
// the "cloudevents.event_spec_version" semantic conventions. It represents the |
| 417 |
// [version of the CloudEvents |
| 418 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 419 |
// which the event uses. |
| 420 |
func CloudeventsEventSpecVersion(val string) attribute.KeyValue { |
| 421 |
return CloudeventsEventSpecVersionKey.String(val) |
| 422 |
} |
| 423 |
|
| 424 |
// CloudeventsEventSubject returns an attribute KeyValue conforming to the |
| 425 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 426 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 427 |
// of the event in the context of the event producer (identified by source). |
| 428 |
func CloudeventsEventSubject(val string) attribute.KeyValue { |
| 429 |
return CloudeventsEventSubjectKey.String(val) |
| 430 |
} |
| 431 |
|
| 432 |
// CloudeventsEventType returns an attribute KeyValue conforming to the |
| 433 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 434 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 435 |
// contains a value describing the type of event related to the originating |
| 436 |
// occurrence. |
| 437 |
func CloudeventsEventType(val string) attribute.KeyValue { |
| 438 |
return CloudeventsEventTypeKey.String(val) |
| 439 |
} |
| 440 |
|
| 441 |
// Semantic conventions for the OpenTracing Shim |
| 442 |
const ( |
| 443 |
// OpentracingRefTypeKey is the attribute Key conforming to the |
| 444 |
// "opentracing.ref_type" semantic conventions. It represents the |
| 445 |
// parent-child Reference type |
| 446 |
// |
| 447 |
// Type: Enum |
| 448 |
// RequirementLevel: Optional |
| 449 |
// Stability: experimental |
| 450 |
// Note: The causal relationship between a child Span and a parent Span. |
| 451 |
OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") |
| 452 |
) |
| 453 |
|
| 454 |
var ( |
| 455 |
// The parent Span depends on the child Span in some capacity |
| 456 |
OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") |
| 457 |
// The parent Span doesn't depend in any way on the result of the child Span |
| 458 |
OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") |
| 459 |
) |
| 460 |
|
| 461 |
// The attributes used to perform database client calls. |
| 462 |
const ( |
| 463 |
// DBConnectionStringKey is the attribute Key conforming to the |
| 464 |
// "db.connection_string" semantic conventions. It represents the |
| 465 |
// connection string used to connect to the database. It is recommended to |
| 466 |
// remove embedded credentials. |
| 467 |
// |
| 468 |
// Type: string |
| 469 |
// RequirementLevel: Optional |
| 470 |
// Stability: experimental |
| 471 |
// Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' |
| 472 |
DBConnectionStringKey = attribute.Key("db.connection_string") |
| 473 |
|
| 474 |
// DBJDBCDriverClassnameKey is the attribute Key conforming to the |
| 475 |
// "db.jdbc.driver_classname" semantic conventions. It represents the |
| 476 |
// fully-qualified class name of the [Java Database Connectivity |
| 477 |
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) |
| 478 |
// driver used to connect. |
| 479 |
// |
| 480 |
// Type: string |
| 481 |
// RequirementLevel: Optional |
| 482 |
// Stability: experimental |
| 483 |
// Examples: 'org.postgresql.Driver', |
| 484 |
// 'com.microsoft.sqlserver.jdbc.SQLServerDriver' |
| 485 |
DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") |
| 486 |
|
| 487 |
// DBNameKey is the attribute Key conforming to the "db.name" semantic |
| 488 |
// conventions. It represents the this attribute is used to report the name |
| 489 |
// of the database being accessed. For commands that switch the database, |
| 490 |
// this should be set to the target database (even if the command fails). |
| 491 |
// |
| 492 |
// Type: string |
| 493 |
// RequirementLevel: ConditionallyRequired (If applicable.) |
| 494 |
// Stability: experimental |
| 495 |
// Examples: 'customers', 'main' |
| 496 |
// Note: In some SQL databases, the database name to be used is called |
| 497 |
// "schema name". In case there are multiple layers that could be |
| 498 |
// considered for database name (e.g. Oracle instance name and schema |
| 499 |
// name), the database name to be used is the more specific layer (e.g. |
| 500 |
// Oracle schema name). |
| 501 |
DBNameKey = attribute.Key("db.name") |
| 502 |
|
| 503 |
// DBOperationKey is the attribute Key conforming to the "db.operation" |
| 504 |
// semantic conventions. It represents the name of the operation being |
| 505 |
// executed, e.g. the [MongoDB command |
| 506 |
// name](https://docs.mongodb.com/manual/reference/command/#database-operations) |
| 507 |
// such as `findAndModify`, or the SQL keyword. |
| 508 |
// |
| 509 |
// Type: string |
| 510 |
// RequirementLevel: ConditionallyRequired (If `db.statement` is not |
| 511 |
// applicable.) |
| 512 |
// Stability: experimental |
| 513 |
// Examples: 'findAndModify', 'HMSET', 'SELECT' |
| 514 |
// Note: When setting this to an SQL keyword, it is not recommended to |
| 515 |
// attempt any client-side parsing of `db.statement` just to get this |
| 516 |
// property, but it should be set if the operation name is provided by the |
| 517 |
// library being instrumented. If the SQL statement has an ambiguous |
| 518 |
// operation, or performs more than one operation, this value may be |
| 519 |
// omitted. |
| 520 |
DBOperationKey = attribute.Key("db.operation") |
| 521 |
|
| 522 |
// DBStatementKey is the attribute Key conforming to the "db.statement" |
| 523 |
// semantic conventions. It represents the database statement being |
| 524 |
// executed. |
| 525 |
// |
| 526 |
// Type: string |
| 527 |
// RequirementLevel: Recommended (Should be collected by default only if |
| 528 |
// there is sanitization that excludes sensitive information.) |
| 529 |
// Stability: experimental |
| 530 |
// Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' |
| 531 |
DBStatementKey = attribute.Key("db.statement") |
| 532 |
|
| 533 |
// DBSystemKey is the attribute Key conforming to the "db.system" semantic |
| 534 |
// conventions. It represents an identifier for the database management |
| 535 |
// system (DBMS) product being used. See below for a list of well-known |
| 536 |
// identifiers. |
| 537 |
// |
| 538 |
// Type: Enum |
| 539 |
// RequirementLevel: Required |
| 540 |
// Stability: experimental |
| 541 |
DBSystemKey = attribute.Key("db.system") |
| 542 |
|
| 543 |
// DBUserKey is the attribute Key conforming to the "db.user" semantic |
| 544 |
// conventions. It represents the username for accessing the database. |
| 545 |
// |
| 546 |
// Type: string |
| 547 |
// RequirementLevel: Optional |
| 548 |
// Stability: experimental |
| 549 |
// Examples: 'readonly_user', 'reporting_user' |
| 550 |
DBUserKey = attribute.Key("db.user") |
| 551 |
) |
| 552 |
|
| 553 |
var ( |
| 554 |
// Some other SQL database. Fallback only. See notes |
| 555 |
DBSystemOtherSQL = DBSystemKey.String("other_sql") |
| 556 |
// Microsoft SQL Server |
| 557 |
DBSystemMSSQL = DBSystemKey.String("mssql") |
| 558 |
// Microsoft SQL Server Compact |
| 559 |
DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") |
| 560 |
// MySQL |
| 561 |
DBSystemMySQL = DBSystemKey.String("mysql") |
| 562 |
// Oracle Database |
| 563 |
DBSystemOracle = DBSystemKey.String("oracle") |
| 564 |
// IBM DB2 |
| 565 |
DBSystemDB2 = DBSystemKey.String("db2") |
| 566 |
// PostgreSQL |
| 567 |
DBSystemPostgreSQL = DBSystemKey.String("postgresql") |
| 568 |
// Amazon Redshift |
| 569 |
DBSystemRedshift = DBSystemKey.String("redshift") |
| 570 |
// Apache Hive |
| 571 |
DBSystemHive = DBSystemKey.String("hive") |
| 572 |
// Cloudscape |
| 573 |
DBSystemCloudscape = DBSystemKey.String("cloudscape") |
| 574 |
// HyperSQL DataBase |
| 575 |
DBSystemHSQLDB = DBSystemKey.String("hsqldb") |
| 576 |
// Progress Database |
| 577 |
DBSystemProgress = DBSystemKey.String("progress") |
| 578 |
// SAP MaxDB |
| 579 |
DBSystemMaxDB = DBSystemKey.String("maxdb") |
| 580 |
// SAP HANA |
| 581 |
DBSystemHanaDB = DBSystemKey.String("hanadb") |
| 582 |
// Ingres |
| 583 |
DBSystemIngres = DBSystemKey.String("ingres") |
| 584 |
// FirstSQL |
| 585 |
DBSystemFirstSQL = DBSystemKey.String("firstsql") |
| 586 |
// EnterpriseDB |
| 587 |
DBSystemEDB = DBSystemKey.String("edb") |
| 588 |
// InterSystems Caché |
| 589 |
DBSystemCache = DBSystemKey.String("cache") |
| 590 |
// Adabas (Adaptable Database System) |
| 591 |
DBSystemAdabas = DBSystemKey.String("adabas") |
| 592 |
// Firebird |
| 593 |
DBSystemFirebird = DBSystemKey.String("firebird") |
| 594 |
// Apache Derby |
| 595 |
DBSystemDerby = DBSystemKey.String("derby") |
| 596 |
// FileMaker |
| 597 |
DBSystemFilemaker = DBSystemKey.String("filemaker") |
| 598 |
// Informix |
| 599 |
DBSystemInformix = DBSystemKey.String("informix") |
| 600 |
// InstantDB |
| 601 |
DBSystemInstantDB = DBSystemKey.String("instantdb") |
| 602 |
// InterBase |
| 603 |
DBSystemInterbase = DBSystemKey.String("interbase") |
| 604 |
// MariaDB |
| 605 |
DBSystemMariaDB = DBSystemKey.String("mariadb") |
| 606 |
// Netezza |
| 607 |
DBSystemNetezza = DBSystemKey.String("netezza") |
| 608 |
// Pervasive PSQL |
| 609 |
DBSystemPervasive = DBSystemKey.String("pervasive") |
| 610 |
// PointBase |
| 611 |
DBSystemPointbase = DBSystemKey.String("pointbase") |
| 612 |
// SQLite |
| 613 |
DBSystemSqlite = DBSystemKey.String("sqlite") |
| 614 |
// Sybase |
| 615 |
DBSystemSybase = DBSystemKey.String("sybase") |
| 616 |
// Teradata |
| 617 |
DBSystemTeradata = DBSystemKey.String("teradata") |
| 618 |
// Vertica |
| 619 |
DBSystemVertica = DBSystemKey.String("vertica") |
| 620 |
// H2 |
| 621 |
DBSystemH2 = DBSystemKey.String("h2") |
| 622 |
// ColdFusion IMQ |
| 623 |
DBSystemColdfusion = DBSystemKey.String("coldfusion") |
| 624 |
// Apache Cassandra |
| 625 |
DBSystemCassandra = DBSystemKey.String("cassandra") |
| 626 |
// Apache HBase |
| 627 |
DBSystemHBase = DBSystemKey.String("hbase") |
| 628 |
// MongoDB |
| 629 |
DBSystemMongoDB = DBSystemKey.String("mongodb") |
| 630 |
// Redis |
| 631 |
DBSystemRedis = DBSystemKey.String("redis") |
| 632 |
// Couchbase |
| 633 |
DBSystemCouchbase = DBSystemKey.String("couchbase") |
| 634 |
// CouchDB |
| 635 |
DBSystemCouchDB = DBSystemKey.String("couchdb") |
| 636 |
// Microsoft Azure Cosmos DB |
| 637 |
DBSystemCosmosDB = DBSystemKey.String("cosmosdb") |
| 638 |
// Amazon DynamoDB |
| 639 |
DBSystemDynamoDB = DBSystemKey.String("dynamodb") |
| 640 |
// Neo4j |
| 641 |
DBSystemNeo4j = DBSystemKey.String("neo4j") |
| 642 |
// Apache Geode |
| 643 |
DBSystemGeode = DBSystemKey.String("geode") |
| 644 |
// Elasticsearch |
| 645 |
DBSystemElasticsearch = DBSystemKey.String("elasticsearch") |
| 646 |
// Memcached |
| 647 |
DBSystemMemcached = DBSystemKey.String("memcached") |
| 648 |
// CockroachDB |
| 649 |
DBSystemCockroachdb = DBSystemKey.String("cockroachdb") |
| 650 |
// OpenSearch |
| 651 |
DBSystemOpensearch = DBSystemKey.String("opensearch") |
| 652 |
// ClickHouse |
| 653 |
DBSystemClickhouse = DBSystemKey.String("clickhouse") |
| 654 |
// Cloud Spanner |
| 655 |
DBSystemSpanner = DBSystemKey.String("spanner") |
| 656 |
// Trino |
| 657 |
DBSystemTrino = DBSystemKey.String("trino") |
| 658 |
) |
| 659 |
|
| 660 |
// DBConnectionString returns an attribute KeyValue conforming to the |
| 661 |
// "db.connection_string" semantic conventions. It represents the connection |
| 662 |
// string used to connect to the database. It is recommended to remove embedded |
| 663 |
// credentials. |
| 664 |
func DBConnectionString(val string) attribute.KeyValue { |
| 665 |
return DBConnectionStringKey.String(val) |
| 666 |
} |
| 667 |
|
| 668 |
// DBJDBCDriverClassname returns an attribute KeyValue conforming to the |
| 669 |
// "db.jdbc.driver_classname" semantic conventions. It represents the |
| 670 |
// fully-qualified class name of the [Java Database Connectivity |
| 671 |
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver |
| 672 |
// used to connect. |
| 673 |
func DBJDBCDriverClassname(val string) attribute.KeyValue { |
| 674 |
return DBJDBCDriverClassnameKey.String(val) |
| 675 |
} |
| 676 |
|
| 677 |
// DBName returns an attribute KeyValue conforming to the "db.name" semantic |
| 678 |
// conventions. It represents the this attribute is used to report the name of |
| 679 |
// the database being accessed. For commands that switch the database, this |
| 680 |
// should be set to the target database (even if the command fails). |
| 681 |
func DBName(val string) attribute.KeyValue { |
| 682 |
return DBNameKey.String(val) |
| 683 |
} |
| 684 |
|
| 685 |
// DBOperation returns an attribute KeyValue conforming to the |
| 686 |
// "db.operation" semantic conventions. It represents the name of the operation |
| 687 |
// being executed, e.g. the [MongoDB command |
| 688 |
// name](https://docs.mongodb.com/manual/reference/command/#database-operations) |
| 689 |
// such as `findAndModify`, or the SQL keyword. |
| 690 |
func DBOperation(val string) attribute.KeyValue { |
| 691 |
return DBOperationKey.String(val) |
| 692 |
} |
| 693 |
|
| 694 |
// DBStatement returns an attribute KeyValue conforming to the |
| 695 |
// "db.statement" semantic conventions. It represents the database statement |
| 696 |
// being executed. |
| 697 |
func DBStatement(val string) attribute.KeyValue { |
| 698 |
return DBStatementKey.String(val) |
| 699 |
} |
| 700 |
|
| 701 |
// DBUser returns an attribute KeyValue conforming to the "db.user" semantic |
| 702 |
// conventions. It represents the username for accessing the database. |
| 703 |
func DBUser(val string) attribute.KeyValue { |
| 704 |
return DBUserKey.String(val) |
| 705 |
} |
| 706 |
|
| 707 |
// Connection-level attributes for Microsoft SQL Server |
| 708 |
const ( |
| 709 |
// DBMSSQLInstanceNameKey is the attribute Key conforming to the |
| 710 |
// "db.mssql.instance_name" semantic conventions. It represents the |
| 711 |
// Microsoft SQL Server [instance |
| 712 |
// name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) |
| 713 |
// connecting to. This name is used to determine the port of a named |
| 714 |
// instance. |
| 715 |
// |
| 716 |
// Type: string |
| 717 |
// RequirementLevel: Optional |
| 718 |
// Stability: experimental |
| 719 |
// Examples: 'MSSQLSERVER' |
| 720 |
// Note: If setting a `db.mssql.instance_name`, `server.port` is no longer |
| 721 |
// required (but still recommended if non-standard). |
| 722 |
DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") |
| 723 |
) |
| 724 |
|
| 725 |
// DBMSSQLInstanceName returns an attribute KeyValue conforming to the |
| 726 |
// "db.mssql.instance_name" semantic conventions. It represents the Microsoft |
| 727 |
// SQL Server [instance |
| 728 |
// name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) |
| 729 |
// connecting to. This name is used to determine the port of a named instance. |
| 730 |
func DBMSSQLInstanceName(val string) attribute.KeyValue { |
| 731 |
return DBMSSQLInstanceNameKey.String(val) |
| 732 |
} |
| 733 |
|
| 734 |
// Call-level attributes for Cassandra |
| 735 |
const ( |
| 736 |
// DBCassandraConsistencyLevelKey is the attribute Key conforming to the |
| 737 |
// "db.cassandra.consistency_level" semantic conventions. It represents the |
| 738 |
// consistency level of the query. Based on consistency values from |
| 739 |
// [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). |
| 740 |
// |
| 741 |
// Type: Enum |
| 742 |
// RequirementLevel: Optional |
| 743 |
// Stability: experimental |
| 744 |
DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") |
| 745 |
|
| 746 |
// DBCassandraCoordinatorDCKey is the attribute Key conforming to the |
| 747 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the |
| 748 |
// data center of the coordinating node for a query. |
| 749 |
// |
| 750 |
// Type: string |
| 751 |
// RequirementLevel: Optional |
| 752 |
// Stability: experimental |
| 753 |
// Examples: 'us-west-2' |
| 754 |
DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") |
| 755 |
|
| 756 |
// DBCassandraCoordinatorIDKey is the attribute Key conforming to the |
| 757 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID |
| 758 |
// of the coordinating node for a query. |
| 759 |
// |
| 760 |
// Type: string |
| 761 |
// RequirementLevel: Optional |
| 762 |
// Stability: experimental |
| 763 |
// Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' |
| 764 |
DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") |
| 765 |
|
| 766 |
// DBCassandraIdempotenceKey is the attribute Key conforming to the |
| 767 |
// "db.cassandra.idempotence" semantic conventions. It represents the |
| 768 |
// whether or not the query is idempotent. |
| 769 |
// |
| 770 |
// Type: boolean |
| 771 |
// RequirementLevel: Optional |
| 772 |
// Stability: experimental |
| 773 |
DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") |
| 774 |
|
| 775 |
// DBCassandraPageSizeKey is the attribute Key conforming to the |
| 776 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch |
| 777 |
// size used for paging, i.e. how many rows will be returned at once. |
| 778 |
// |
| 779 |
// Type: int |
| 780 |
// RequirementLevel: Optional |
| 781 |
// Stability: experimental |
| 782 |
// Examples: 5000 |
| 783 |
DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") |
| 784 |
|
| 785 |
// DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming |
| 786 |
// to the "db.cassandra.speculative_execution_count" semantic conventions. |
| 787 |
// It represents the number of times a query was speculatively executed. |
| 788 |
// Not set or `0` if the query was not executed speculatively. |
| 789 |
// |
| 790 |
// Type: int |
| 791 |
// RequirementLevel: Optional |
| 792 |
// Stability: experimental |
| 793 |
// Examples: 0, 2 |
| 794 |
DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") |
| 795 |
|
| 796 |
// DBCassandraTableKey is the attribute Key conforming to the |
| 797 |
// "db.cassandra.table" semantic conventions. It represents the name of the |
| 798 |
// primary table that the operation is acting upon, including the keyspace |
| 799 |
// name (if applicable). |
| 800 |
// |
| 801 |
// Type: string |
| 802 |
// RequirementLevel: Recommended |
| 803 |
// Stability: experimental |
| 804 |
// Examples: 'mytable' |
| 805 |
// Note: This mirrors the db.sql.table attribute but references cassandra |
| 806 |
// rather than sql. It is not recommended to attempt any client-side |
| 807 |
// parsing of `db.statement` just to get this property, but it should be |
| 808 |
// set if it is provided by the library being instrumented. If the |
| 809 |
// operation is acting upon an anonymous table, or more than one table, |
| 810 |
// this value MUST NOT be set. |
| 811 |
DBCassandraTableKey = attribute.Key("db.cassandra.table") |
| 812 |
) |
| 813 |
|
| 814 |
var ( |
| 815 |
// all |
| 816 |
DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") |
| 817 |
// each_quorum |
| 818 |
DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") |
| 819 |
// quorum |
| 820 |
DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") |
| 821 |
// local_quorum |
| 822 |
DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") |
| 823 |
// one |
| 824 |
DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") |
| 825 |
// two |
| 826 |
DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") |
| 827 |
// three |
| 828 |
DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") |
| 829 |
// local_one |
| 830 |
DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") |
| 831 |
// any |
| 832 |
DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") |
| 833 |
// serial |
| 834 |
DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") |
| 835 |
// local_serial |
| 836 |
DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") |
| 837 |
) |
| 838 |
|
| 839 |
// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the |
| 840 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the data |
| 841 |
// center of the coordinating node for a query. |
| 842 |
func DBCassandraCoordinatorDC(val string) attribute.KeyValue { |
| 843 |
return DBCassandraCoordinatorDCKey.String(val) |
| 844 |
} |
| 845 |
|
| 846 |
// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the |
| 847 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of |
| 848 |
// the coordinating node for a query. |
| 849 |
func DBCassandraCoordinatorID(val string) attribute.KeyValue { |
| 850 |
return DBCassandraCoordinatorIDKey.String(val) |
| 851 |
} |
| 852 |
|
| 853 |
// DBCassandraIdempotence returns an attribute KeyValue conforming to the |
| 854 |
// "db.cassandra.idempotence" semantic conventions. It represents the whether |
| 855 |
// or not the query is idempotent. |
| 856 |
func DBCassandraIdempotence(val bool) attribute.KeyValue { |
| 857 |
return DBCassandraIdempotenceKey.Bool(val) |
| 858 |
} |
| 859 |
|
| 860 |
// DBCassandraPageSize returns an attribute KeyValue conforming to the |
| 861 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch size |
| 862 |
// used for paging, i.e. how many rows will be returned at once. |
| 863 |
func DBCassandraPageSize(val int) attribute.KeyValue { |
| 864 |
return DBCassandraPageSizeKey.Int(val) |
| 865 |
} |
| 866 |
|
| 867 |
// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue |
| 868 |
// conforming to the "db.cassandra.speculative_execution_count" semantic |
| 869 |
// conventions. It represents the number of times a query was speculatively |
| 870 |
// executed. Not set or `0` if the query was not executed speculatively. |
| 871 |
func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { |
| 872 |
return DBCassandraSpeculativeExecutionCountKey.Int(val) |
| 873 |
} |
| 874 |
|
| 875 |
// DBCassandraTable returns an attribute KeyValue conforming to the |
| 876 |
// "db.cassandra.table" semantic conventions. It represents the name of the |
| 877 |
// primary table that the operation is acting upon, including the keyspace name |
| 878 |
// (if applicable). |
| 879 |
func DBCassandraTable(val string) attribute.KeyValue { |
| 880 |
return DBCassandraTableKey.String(val) |
| 881 |
} |
| 882 |
|
| 883 |
// Call-level attributes for Redis |
| 884 |
const ( |
| 885 |
// DBRedisDBIndexKey is the attribute Key conforming to the |
| 886 |
// "db.redis.database_index" semantic conventions. It represents the index |
| 887 |
// of the database being accessed as used in the [`SELECT` |
| 888 |
// command](https://redis.io/commands/select), provided as an integer. To |
| 889 |
// be used instead of the generic `db.name` attribute. |
| 890 |
// |
| 891 |
// Type: int |
| 892 |
// RequirementLevel: ConditionallyRequired (If other than the default |
| 893 |
// database (`0`).) |
| 894 |
// Stability: experimental |
| 895 |
// Examples: 0, 1, 15 |
| 896 |
DBRedisDBIndexKey = attribute.Key("db.redis.database_index") |
| 897 |
) |
| 898 |
|
| 899 |
// DBRedisDBIndex returns an attribute KeyValue conforming to the |
| 900 |
// "db.redis.database_index" semantic conventions. It represents the index of |
| 901 |
// the database being accessed as used in the [`SELECT` |
| 902 |
// command](https://redis.io/commands/select), provided as an integer. To be |
| 903 |
// used instead of the generic `db.name` attribute. |
| 904 |
func DBRedisDBIndex(val int) attribute.KeyValue { |
| 905 |
return DBRedisDBIndexKey.Int(val) |
| 906 |
} |
| 907 |
|
| 908 |
// Call-level attributes for MongoDB |
| 909 |
const ( |
| 910 |
// DBMongoDBCollectionKey is the attribute Key conforming to the |
| 911 |
// "db.mongodb.collection" semantic conventions. It represents the |
| 912 |
// collection being accessed within the database stated in `db.name`. |
| 913 |
// |
| 914 |
// Type: string |
| 915 |
// RequirementLevel: Required |
| 916 |
// Stability: experimental |
| 917 |
// Examples: 'customers', 'products' |
| 918 |
DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") |
| 919 |
) |
| 920 |
|
| 921 |
// DBMongoDBCollection returns an attribute KeyValue conforming to the |
| 922 |
// "db.mongodb.collection" semantic conventions. It represents the collection |
| 923 |
// being accessed within the database stated in `db.name`. |
| 924 |
func DBMongoDBCollection(val string) attribute.KeyValue { |
| 925 |
return DBMongoDBCollectionKey.String(val) |
| 926 |
} |
| 927 |
|
| 928 |
// Call-level attributes for Elasticsearch |
| 929 |
const ( |
| 930 |
// DBElasticsearchClusterNameKey is the attribute Key conforming to the |
| 931 |
// "db.elasticsearch.cluster.name" semantic conventions. It represents the |
| 932 |
// represents the identifier of an Elasticsearch cluster. |
| 933 |
// |
| 934 |
// Type: string |
| 935 |
// RequirementLevel: Recommended (When communicating with an Elastic Cloud |
| 936 |
// deployment, this should be collected from the "X-Found-Handling-Cluster" |
| 937 |
// HTTP response header.) |
| 938 |
// Stability: experimental |
| 939 |
// Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' |
| 940 |
DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name") |
| 941 |
|
| 942 |
// DBElasticsearchNodeNameKey is the attribute Key conforming to the |
| 943 |
// "db.elasticsearch.node.name" semantic conventions. It represents the |
| 944 |
// represents the human-readable identifier of the node/instance to which a |
| 945 |
// request was routed. |
| 946 |
// |
| 947 |
// Type: string |
| 948 |
// RequirementLevel: Recommended (When communicating with an Elastic Cloud |
| 949 |
// deployment, this should be collected from the |
| 950 |
// "X-Found-Handling-Instance" HTTP response header.) |
| 951 |
// Stability: experimental |
| 952 |
// Examples: 'instance-0000000001' |
| 953 |
DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") |
| 954 |
) |
| 955 |
|
| 956 |
// DBElasticsearchClusterName returns an attribute KeyValue conforming to |
| 957 |
// the "db.elasticsearch.cluster.name" semantic conventions. It represents the |
| 958 |
// represents the identifier of an Elasticsearch cluster. |
| 959 |
func DBElasticsearchClusterName(val string) attribute.KeyValue { |
| 960 |
return DBElasticsearchClusterNameKey.String(val) |
| 961 |
} |
| 962 |
|
| 963 |
// DBElasticsearchNodeName returns an attribute KeyValue conforming to the |
| 964 |
// "db.elasticsearch.node.name" semantic conventions. It represents the |
| 965 |
// represents the human-readable identifier of the node/instance to which a |
| 966 |
// request was routed. |
| 967 |
func DBElasticsearchNodeName(val string) attribute.KeyValue { |
| 968 |
return DBElasticsearchNodeNameKey.String(val) |
| 969 |
} |
| 970 |
|
| 971 |
// Call-level attributes for SQL databases |
| 972 |
const ( |
| 973 |
// DBSQLTableKey is the attribute Key conforming to the "db.sql.table" |
| 974 |
// semantic conventions. It represents the name of the primary table that |
| 975 |
// the operation is acting upon, including the database name (if |
| 976 |
// applicable). |
| 977 |
// |
| 978 |
// Type: string |
| 979 |
// RequirementLevel: Recommended |
| 980 |
// Stability: experimental |
| 981 |
// Examples: 'public.users', 'customers' |
| 982 |
// Note: It is not recommended to attempt any client-side parsing of |
| 983 |
// `db.statement` just to get this property, but it should be set if it is |
| 984 |
// provided by the library being instrumented. If the operation is acting |
| 985 |
// upon an anonymous table, or more than one table, this value MUST NOT be |
| 986 |
// set. |
| 987 |
DBSQLTableKey = attribute.Key("db.sql.table") |
| 988 |
) |
| 989 |
|
| 990 |
// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" |
| 991 |
// semantic conventions. It represents the name of the primary table that the |
| 992 |
// operation is acting upon, including the database name (if applicable). |
| 993 |
func DBSQLTable(val string) attribute.KeyValue { |
| 994 |
return DBSQLTableKey.String(val) |
| 995 |
} |
| 996 |
|
| 997 |
// Call-level attributes for Cosmos DB. |
| 998 |
const ( |
| 999 |
// DBCosmosDBClientIDKey is the attribute Key conforming to the |
| 1000 |
// "db.cosmosdb.client_id" semantic conventions. It represents the unique |
| 1001 |
// Cosmos client instance id. |
| 1002 |
// |
| 1003 |
// Type: string |
| 1004 |
// RequirementLevel: Optional |
| 1005 |
// Stability: experimental |
| 1006 |
// Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' |
| 1007 |
DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") |
| 1008 |
|
| 1009 |
// DBCosmosDBConnectionModeKey is the attribute Key conforming to the |
| 1010 |
// "db.cosmosdb.connection_mode" semantic conventions. It represents the |
| 1011 |
// cosmos client connection mode. |
| 1012 |
// |
| 1013 |
// Type: Enum |
| 1014 |
// RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as |
| 1015 |
// default)) |
| 1016 |
// Stability: experimental |
| 1017 |
DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") |
| 1018 |
|
| 1019 |
// DBCosmosDBContainerKey is the attribute Key conforming to the |
| 1020 |
// "db.cosmosdb.container" semantic conventions. It represents the cosmos |
| 1021 |
// DB container name. |
| 1022 |
// |
| 1023 |
// Type: string |
| 1024 |
// RequirementLevel: ConditionallyRequired (if available) |
| 1025 |
// Stability: experimental |
| 1026 |
// Examples: 'anystring' |
| 1027 |
DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") |
| 1028 |
|
| 1029 |
// DBCosmosDBOperationTypeKey is the attribute Key conforming to the |
| 1030 |
// "db.cosmosdb.operation_type" semantic conventions. It represents the |
| 1031 |
// cosmosDB Operation Type. |
| 1032 |
// |
| 1033 |
// Type: Enum |
| 1034 |
// RequirementLevel: ConditionallyRequired (when performing one of the |
| 1035 |
// operations in this list) |
| 1036 |
// Stability: experimental |
| 1037 |
DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") |
| 1038 |
|
| 1039 |
// DBCosmosDBRequestChargeKey is the attribute Key conforming to the |
| 1040 |
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU |
| 1041 |
// consumed for that operation |
| 1042 |
// |
| 1043 |
// Type: double |
| 1044 |
// RequirementLevel: ConditionallyRequired (when available) |
| 1045 |
// Stability: experimental |
| 1046 |
// Examples: 46.18, 1.0 |
| 1047 |
DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") |
| 1048 |
|
| 1049 |
// DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the |
| 1050 |
// "db.cosmosdb.request_content_length" semantic conventions. It represents |
| 1051 |
// the request payload size in bytes |
| 1052 |
// |
| 1053 |
// Type: int |
| 1054 |
// RequirementLevel: Optional |
| 1055 |
// Stability: experimental |
| 1056 |
DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") |
| 1057 |
|
| 1058 |
// DBCosmosDBStatusCodeKey is the attribute Key conforming to the |
| 1059 |
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos |
| 1060 |
// DB status code. |
| 1061 |
// |
| 1062 |
// Type: int |
| 1063 |
// RequirementLevel: ConditionallyRequired (if response was received) |
| 1064 |
// Stability: experimental |
| 1065 |
// Examples: 200, 201 |
| 1066 |
DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") |
| 1067 |
|
| 1068 |
// DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the |
| 1069 |
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the |
| 1070 |
// cosmos DB sub status code. |
| 1071 |
// |
| 1072 |
// Type: int |
| 1073 |
// RequirementLevel: ConditionallyRequired (when response was received and |
| 1074 |
// contained sub-code.) |
| 1075 |
// Stability: experimental |
| 1076 |
// Examples: 1000, 1002 |
| 1077 |
DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") |
| 1078 |
) |
| 1079 |
|
| 1080 |
var ( |
| 1081 |
// Gateway (HTTP) connections mode |
| 1082 |
DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") |
| 1083 |
// Direct connection |
| 1084 |
DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") |
| 1085 |
) |
| 1086 |
|
| 1087 |
var ( |
| 1088 |
// invalid |
| 1089 |
DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") |
| 1090 |
// create |
| 1091 |
DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") |
| 1092 |
// patch |
| 1093 |
DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") |
| 1094 |
// read |
| 1095 |
DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") |
| 1096 |
// read_feed |
| 1097 |
DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") |
| 1098 |
// delete |
| 1099 |
DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") |
| 1100 |
// replace |
| 1101 |
DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") |
| 1102 |
// execute |
| 1103 |
DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") |
| 1104 |
// query |
| 1105 |
DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") |
| 1106 |
// head |
| 1107 |
DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") |
| 1108 |
// head_feed |
| 1109 |
DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") |
| 1110 |
// upsert |
| 1111 |
DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") |
| 1112 |
// batch |
| 1113 |
DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") |
| 1114 |
// query_plan |
| 1115 |
DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") |
| 1116 |
// execute_javascript |
| 1117 |
DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") |
| 1118 |
) |
| 1119 |
|
| 1120 |
// DBCosmosDBClientID returns an attribute KeyValue conforming to the |
| 1121 |
// "db.cosmosdb.client_id" semantic conventions. It represents the unique |
| 1122 |
// Cosmos client instance id. |
| 1123 |
func DBCosmosDBClientID(val string) attribute.KeyValue { |
| 1124 |
return DBCosmosDBClientIDKey.String(val) |
| 1125 |
} |
| 1126 |
|
| 1127 |
// DBCosmosDBContainer returns an attribute KeyValue conforming to the |
| 1128 |
// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB |
| 1129 |
// container name. |
| 1130 |
func DBCosmosDBContainer(val string) attribute.KeyValue { |
| 1131 |
return DBCosmosDBContainerKey.String(val) |
| 1132 |
} |
| 1133 |
|
| 1134 |
// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the |
| 1135 |
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU |
| 1136 |
// consumed for that operation |
| 1137 |
func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { |
| 1138 |
return DBCosmosDBRequestChargeKey.Float64(val) |
| 1139 |
} |
| 1140 |
|
| 1141 |
// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming |
| 1142 |
// to the "db.cosmosdb.request_content_length" semantic conventions. It |
| 1143 |
// represents the request payload size in bytes |
| 1144 |
func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { |
| 1145 |
return DBCosmosDBRequestContentLengthKey.Int(val) |
| 1146 |
} |
| 1147 |
|
| 1148 |
// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the |
| 1149 |
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB |
| 1150 |
// status code. |
| 1151 |
func DBCosmosDBStatusCode(val int) attribute.KeyValue { |
| 1152 |
return DBCosmosDBStatusCodeKey.Int(val) |
| 1153 |
} |
| 1154 |
|
| 1155 |
// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the |
| 1156 |
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos |
| 1157 |
// DB sub status code. |
| 1158 |
func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { |
| 1159 |
return DBCosmosDBSubStatusCodeKey.Int(val) |
| 1160 |
} |
| 1161 |
|
| 1162 |
// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's |
| 1163 |
// concepts. |
| 1164 |
const ( |
| 1165 |
// OTelStatusCodeKey is the attribute Key conforming to the |
| 1166 |
// "otel.status_code" semantic conventions. It represents the name of the |
| 1167 |
// code, either "OK" or "ERROR". MUST NOT be set if the status code is |
| 1168 |
// UNSET. |
| 1169 |
// |
| 1170 |
// Type: Enum |
| 1171 |
// RequirementLevel: Optional |
| 1172 |
// Stability: experimental |
| 1173 |
OTelStatusCodeKey = attribute.Key("otel.status_code") |
| 1174 |
|
| 1175 |
// OTelStatusDescriptionKey is the attribute Key conforming to the |
| 1176 |
// "otel.status_description" semantic conventions. It represents the |
| 1177 |
// description of the Status if it has a value, otherwise not set. |
| 1178 |
// |
| 1179 |
// Type: string |
| 1180 |
// RequirementLevel: Optional |
| 1181 |
// Stability: experimental |
| 1182 |
// Examples: 'resource not found' |
| 1183 |
OTelStatusDescriptionKey = attribute.Key("otel.status_description") |
| 1184 |
) |
| 1185 |
|
| 1186 |
var ( |
| 1187 |
// The operation has been validated by an Application developer or Operator to have completed successfully |
| 1188 |
OTelStatusCodeOk = OTelStatusCodeKey.String("OK") |
| 1189 |
// The operation contains an error |
| 1190 |
OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") |
| 1191 |
) |
| 1192 |
|
| 1193 |
// OTelStatusDescription returns an attribute KeyValue conforming to the |
| 1194 |
// "otel.status_description" semantic conventions. It represents the |
| 1195 |
// description of the Status if it has a value, otherwise not set. |
| 1196 |
func OTelStatusDescription(val string) attribute.KeyValue { |
| 1197 |
return OTelStatusDescriptionKey.String(val) |
| 1198 |
} |
| 1199 |
|
| 1200 |
// This semantic convention describes an instance of a function that runs |
| 1201 |
// without provisioning or managing of servers (also known as serverless |
| 1202 |
// functions or Function as a Service (FaaS)) with spans. |
| 1203 |
const ( |
| 1204 |
// FaaSInvocationIDKey is the attribute Key conforming to the |
| 1205 |
// "faas.invocation_id" semantic conventions. It represents the invocation |
| 1206 |
// ID of the current function invocation. |
| 1207 |
// |
| 1208 |
// Type: string |
| 1209 |
// RequirementLevel: Optional |
| 1210 |
// Stability: experimental |
| 1211 |
// Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' |
| 1212 |
FaaSInvocationIDKey = attribute.Key("faas.invocation_id") |
| 1213 |
) |
| 1214 |
|
| 1215 |
// FaaSInvocationID returns an attribute KeyValue conforming to the |
| 1216 |
// "faas.invocation_id" semantic conventions. It represents the invocation ID |
| 1217 |
// of the current function invocation. |
| 1218 |
func FaaSInvocationID(val string) attribute.KeyValue { |
| 1219 |
return FaaSInvocationIDKey.String(val) |
| 1220 |
} |
| 1221 |
|
| 1222 |
// Semantic Convention for FaaS triggered as a response to some data source |
| 1223 |
// operation such as a database or filesystem read/write. |
| 1224 |
const ( |
| 1225 |
// FaaSDocumentCollectionKey is the attribute Key conforming to the |
| 1226 |
// "faas.document.collection" semantic conventions. It represents the name |
| 1227 |
// of the source on which the triggering operation was performed. For |
| 1228 |
// example, in Cloud Storage or S3 corresponds to the bucket name, and in |
| 1229 |
// Cosmos DB to the database name. |
| 1230 |
// |
| 1231 |
// Type: string |
| 1232 |
// RequirementLevel: Required |
| 1233 |
// Stability: experimental |
| 1234 |
// Examples: 'myBucketName', 'myDBName' |
| 1235 |
FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") |
| 1236 |
|
| 1237 |
// FaaSDocumentNameKey is the attribute Key conforming to the |
| 1238 |
// "faas.document.name" semantic conventions. It represents the document |
| 1239 |
// name/table subjected to the operation. For example, in Cloud Storage or |
| 1240 |
// S3 is the name of the file, and in Cosmos DB the table name. |
| 1241 |
// |
| 1242 |
// Type: string |
| 1243 |
// RequirementLevel: Optional |
| 1244 |
// Stability: experimental |
| 1245 |
// Examples: 'myFile.txt', 'myTableName' |
| 1246 |
FaaSDocumentNameKey = attribute.Key("faas.document.name") |
| 1247 |
|
| 1248 |
// FaaSDocumentOperationKey is the attribute Key conforming to the |
| 1249 |
// "faas.document.operation" semantic conventions. It represents the |
| 1250 |
// describes the type of the operation that was performed on the data. |
| 1251 |
// |
| 1252 |
// Type: Enum |
| 1253 |
// RequirementLevel: Required |
| 1254 |
// Stability: experimental |
| 1255 |
FaaSDocumentOperationKey = attribute.Key("faas.document.operation") |
| 1256 |
|
| 1257 |
// FaaSDocumentTimeKey is the attribute Key conforming to the |
| 1258 |
// "faas.document.time" semantic conventions. It represents a string |
| 1259 |
// containing the time when the data was accessed in the [ISO |
| 1260 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 1261 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 1262 |
// |
| 1263 |
// Type: string |
| 1264 |
// RequirementLevel: Optional |
| 1265 |
// Stability: experimental |
| 1266 |
// Examples: '2020-01-23T13:47:06Z' |
| 1267 |
FaaSDocumentTimeKey = attribute.Key("faas.document.time") |
| 1268 |
) |
| 1269 |
|
| 1270 |
var ( |
| 1271 |
// When a new object is created |
| 1272 |
FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") |
| 1273 |
// When an object is modified |
| 1274 |
FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") |
| 1275 |
// When an object is deleted |
| 1276 |
FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") |
| 1277 |
) |
| 1278 |
|
| 1279 |
// FaaSDocumentCollection returns an attribute KeyValue conforming to the |
| 1280 |
// "faas.document.collection" semantic conventions. It represents the name of |
| 1281 |
// the source on which the triggering operation was performed. For example, in |
| 1282 |
// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the |
| 1283 |
// database name. |
| 1284 |
func FaaSDocumentCollection(val string) attribute.KeyValue { |
| 1285 |
return FaaSDocumentCollectionKey.String(val) |
| 1286 |
} |
| 1287 |
|
| 1288 |
// FaaSDocumentName returns an attribute KeyValue conforming to the |
| 1289 |
// "faas.document.name" semantic conventions. It represents the document |
| 1290 |
// name/table subjected to the operation. For example, in Cloud Storage or S3 |
| 1291 |
// is the name of the file, and in Cosmos DB the table name. |
| 1292 |
func FaaSDocumentName(val string) attribute.KeyValue { |
| 1293 |
return FaaSDocumentNameKey.String(val) |
| 1294 |
} |
| 1295 |
|
| 1296 |
// FaaSDocumentTime returns an attribute KeyValue conforming to the |
| 1297 |
// "faas.document.time" semantic conventions. It represents a string containing |
| 1298 |
// the time when the data was accessed in the [ISO |
| 1299 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 1300 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 1301 |
func FaaSDocumentTime(val string) attribute.KeyValue { |
| 1302 |
return FaaSDocumentTimeKey.String(val) |
| 1303 |
} |
| 1304 |
|
| 1305 |
// Semantic Convention for FaaS scheduled to be executed regularly. |
| 1306 |
const ( |
| 1307 |
// FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic |
| 1308 |
// conventions. It represents a string containing the schedule period as |
| 1309 |
// [Cron |
| 1310 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 1311 |
// |
| 1312 |
// Type: string |
| 1313 |
// RequirementLevel: Optional |
| 1314 |
// Stability: experimental |
| 1315 |
// Examples: '0/5 * * * ? *' |
| 1316 |
FaaSCronKey = attribute.Key("faas.cron") |
| 1317 |
|
| 1318 |
// FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic |
| 1319 |
// conventions. It represents a string containing the function invocation |
| 1320 |
// time in the [ISO |
| 1321 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 1322 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 1323 |
// |
| 1324 |
// Type: string |
| 1325 |
// RequirementLevel: Optional |
| 1326 |
// Stability: experimental |
| 1327 |
// Examples: '2020-01-23T13:47:06Z' |
| 1328 |
FaaSTimeKey = attribute.Key("faas.time") |
| 1329 |
) |
| 1330 |
|
| 1331 |
// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" |
| 1332 |
// semantic conventions. It represents a string containing the schedule period |
| 1333 |
// as [Cron |
| 1334 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 1335 |
func FaaSCron(val string) attribute.KeyValue { |
| 1336 |
return FaaSCronKey.String(val) |
| 1337 |
} |
| 1338 |
|
| 1339 |
// FaaSTime returns an attribute KeyValue conforming to the "faas.time" |
| 1340 |
// semantic conventions. It represents a string containing the function |
| 1341 |
// invocation time in the [ISO |
| 1342 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 1343 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 1344 |
func FaaSTime(val string) attribute.KeyValue { |
| 1345 |
return FaaSTimeKey.String(val) |
| 1346 |
} |
| 1347 |
|
| 1348 |
// Contains additional attributes for incoming FaaS spans. |
| 1349 |
const ( |
| 1350 |
// FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" |
| 1351 |
// semantic conventions. It represents a boolean that is true if the |
| 1352 |
// serverless function is executed for the first time (aka cold-start). |
| 1353 |
// |
| 1354 |
// Type: boolean |
| 1355 |
// RequirementLevel: Optional |
| 1356 |
// Stability: experimental |
| 1357 |
FaaSColdstartKey = attribute.Key("faas.coldstart") |
| 1358 |
) |
| 1359 |
|
| 1360 |
// FaaSColdstart returns an attribute KeyValue conforming to the |
| 1361 |
// "faas.coldstart" semantic conventions. It represents a boolean that is true |
| 1362 |
// if the serverless function is executed for the first time (aka cold-start). |
| 1363 |
func FaaSColdstart(val bool) attribute.KeyValue { |
| 1364 |
return FaaSColdstartKey.Bool(val) |
| 1365 |
} |
| 1366 |
|
| 1367 |
// The `aws` conventions apply to operations using the AWS SDK. They map |
| 1368 |
// request or response parameters in AWS SDK API calls to attributes on a Span. |
| 1369 |
// The conventions have been collected over time based on feedback from AWS |
| 1370 |
// users of tracing and will continue to evolve as new interesting conventions |
| 1371 |
// are found. |
| 1372 |
// Some descriptions are also provided for populating general OpenTelemetry |
| 1373 |
// semantic conventions based on these APIs. |
| 1374 |
const ( |
| 1375 |
// AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" |
| 1376 |
// semantic conventions. It represents the AWS request ID as returned in |
| 1377 |
// the response headers `x-amz-request-id` or `x-amz-requestid`. |
| 1378 |
// |
| 1379 |
// Type: string |
| 1380 |
// RequirementLevel: Optional |
| 1381 |
// Stability: experimental |
| 1382 |
// Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' |
| 1383 |
AWSRequestIDKey = attribute.Key("aws.request_id") |
| 1384 |
) |
| 1385 |
|
| 1386 |
// AWSRequestID returns an attribute KeyValue conforming to the |
| 1387 |
// "aws.request_id" semantic conventions. It represents the AWS request ID as |
| 1388 |
// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. |
| 1389 |
func AWSRequestID(val string) attribute.KeyValue { |
| 1390 |
return AWSRequestIDKey.String(val) |
| 1391 |
} |
| 1392 |
|
| 1393 |
// Attributes that exist for multiple DynamoDB request types. |
| 1394 |
const ( |
| 1395 |
// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the |
| 1396 |
// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 1397 |
// value of the `AttributesToGet` request parameter. |
| 1398 |
// |
| 1399 |
// Type: string[] |
| 1400 |
// RequirementLevel: Optional |
| 1401 |
// Stability: experimental |
| 1402 |
// Examples: 'lives', 'id' |
| 1403 |
AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") |
| 1404 |
|
| 1405 |
// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the |
| 1406 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the |
| 1407 |
// value of the `ConsistentRead` request parameter. |
| 1408 |
// |
| 1409 |
// Type: boolean |
| 1410 |
// RequirementLevel: Optional |
| 1411 |
// Stability: experimental |
| 1412 |
AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") |
| 1413 |
|
| 1414 |
// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the |
| 1415 |
// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 1416 |
// JSON-serialized value of each item in the `ConsumedCapacity` response |
| 1417 |
// field. |
| 1418 |
// |
| 1419 |
// Type: string[] |
| 1420 |
// RequirementLevel: Optional |
| 1421 |
// Stability: experimental |
| 1422 |
// Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { |
| 1423 |
// "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1424 |
// "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : |
| 1425 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1426 |
// "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": |
| 1427 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 1428 |
// "WriteCapacityUnits": number }, "TableName": "string", |
| 1429 |
// "WriteCapacityUnits": number }' |
| 1430 |
AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") |
| 1431 |
|
| 1432 |
// AWSDynamoDBIndexNameKey is the attribute Key conforming to the |
| 1433 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value |
| 1434 |
// of the `IndexName` request parameter. |
| 1435 |
// |
| 1436 |
// Type: string |
| 1437 |
// RequirementLevel: Optional |
| 1438 |
// Stability: experimental |
| 1439 |
// Examples: 'name_to_group' |
| 1440 |
AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") |
| 1441 |
|
| 1442 |
// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to |
| 1443 |
// the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 1444 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` |
| 1445 |
// response field. |
| 1446 |
// |
| 1447 |
// Type: string |
| 1448 |
// RequirementLevel: Optional |
| 1449 |
// Stability: experimental |
| 1450 |
// Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": |
| 1451 |
// blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { |
| 1452 |
// "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], |
| 1453 |
// "NULL": boolean, "S": "string", "SS": [ "string" ] } }, |
| 1454 |
// "SizeEstimateRangeGB": [ number ] } ] }' |
| 1455 |
AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") |
| 1456 |
|
| 1457 |
// AWSDynamoDBLimitKey is the attribute Key conforming to the |
| 1458 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of |
| 1459 |
// the `Limit` request parameter. |
| 1460 |
// |
| 1461 |
// Type: int |
| 1462 |
// RequirementLevel: Optional |
| 1463 |
// Stability: experimental |
| 1464 |
// Examples: 10 |
| 1465 |
AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") |
| 1466 |
|
| 1467 |
// AWSDynamoDBProjectionKey is the attribute Key conforming to the |
| 1468 |
// "aws.dynamodb.projection" semantic conventions. It represents the value |
| 1469 |
// of the `ProjectionExpression` request parameter. |
| 1470 |
// |
| 1471 |
// Type: string |
| 1472 |
// RequirementLevel: Optional |
| 1473 |
// Stability: experimental |
| 1474 |
// Examples: 'Title', 'Title, Price, Color', 'Title, Description, |
| 1475 |
// RelatedItems, ProductReviews' |
| 1476 |
AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") |
| 1477 |
|
| 1478 |
// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to |
| 1479 |
// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It |
| 1480 |
// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` |
| 1481 |
// request parameter. |
| 1482 |
// |
| 1483 |
// Type: double |
| 1484 |
// RequirementLevel: Optional |
| 1485 |
// Stability: experimental |
| 1486 |
// Examples: 1.0, 2.0 |
| 1487 |
AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") |
| 1488 |
|
| 1489 |
// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming |
| 1490 |
// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. |
| 1491 |
// It represents the value of the |
| 1492 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 1493 |
// |
| 1494 |
// Type: double |
| 1495 |
// RequirementLevel: Optional |
| 1496 |
// Stability: experimental |
| 1497 |
// Examples: 1.0, 2.0 |
| 1498 |
AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") |
| 1499 |
|
| 1500 |
// AWSDynamoDBSelectKey is the attribute Key conforming to the |
| 1501 |
// "aws.dynamodb.select" semantic conventions. It represents the value of |
| 1502 |
// the `Select` request parameter. |
| 1503 |
// |
| 1504 |
// Type: string |
| 1505 |
// RequirementLevel: Optional |
| 1506 |
// Stability: experimental |
| 1507 |
// Examples: 'ALL_ATTRIBUTES', 'COUNT' |
| 1508 |
AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") |
| 1509 |
|
| 1510 |
// AWSDynamoDBTableNamesKey is the attribute Key conforming to the |
| 1511 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys |
| 1512 |
// in the `RequestItems` object field. |
| 1513 |
// |
| 1514 |
// Type: string[] |
| 1515 |
// RequirementLevel: Optional |
| 1516 |
// Stability: experimental |
| 1517 |
// Examples: 'Users', 'Cats' |
| 1518 |
AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") |
| 1519 |
) |
| 1520 |
|
| 1521 |
// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to |
| 1522 |
// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 1523 |
// value of the `AttributesToGet` request parameter. |
| 1524 |
func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { |
| 1525 |
return AWSDynamoDBAttributesToGetKey.StringSlice(val) |
| 1526 |
} |
| 1527 |
|
| 1528 |
// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the |
| 1529 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the value |
| 1530 |
// of the `ConsistentRead` request parameter. |
| 1531 |
func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { |
| 1532 |
return AWSDynamoDBConsistentReadKey.Bool(val) |
| 1533 |
} |
| 1534 |
|
| 1535 |
// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to |
| 1536 |
// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 1537 |
// JSON-serialized value of each item in the `ConsumedCapacity` response field. |
| 1538 |
func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { |
| 1539 |
return AWSDynamoDBConsumedCapacityKey.StringSlice(val) |
| 1540 |
} |
| 1541 |
|
| 1542 |
// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the |
| 1543 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value of |
| 1544 |
// the `IndexName` request parameter. |
| 1545 |
func AWSDynamoDBIndexName(val string) attribute.KeyValue { |
| 1546 |
return AWSDynamoDBIndexNameKey.String(val) |
| 1547 |
} |
| 1548 |
|
| 1549 |
// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming |
| 1550 |
// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 1551 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` response |
| 1552 |
// field. |
| 1553 |
func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { |
| 1554 |
return AWSDynamoDBItemCollectionMetricsKey.String(val) |
| 1555 |
} |
| 1556 |
|
| 1557 |
// AWSDynamoDBLimit returns an attribute KeyValue conforming to the |
| 1558 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of the |
| 1559 |
// `Limit` request parameter. |
| 1560 |
func AWSDynamoDBLimit(val int) attribute.KeyValue { |
| 1561 |
return AWSDynamoDBLimitKey.Int(val) |
| 1562 |
} |
| 1563 |
|
| 1564 |
// AWSDynamoDBProjection returns an attribute KeyValue conforming to the |
| 1565 |
// "aws.dynamodb.projection" semantic conventions. It represents the value of |
| 1566 |
// the `ProjectionExpression` request parameter. |
| 1567 |
func AWSDynamoDBProjection(val string) attribute.KeyValue { |
| 1568 |
return AWSDynamoDBProjectionKey.String(val) |
| 1569 |
} |
| 1570 |
|
| 1571 |
// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue |
| 1572 |
// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic |
| 1573 |
// conventions. It represents the value of the |
| 1574 |
// `ProvisionedThroughput.ReadCapacityUnits` request parameter. |
| 1575 |
func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { |
| 1576 |
return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) |
| 1577 |
} |
| 1578 |
|
| 1579 |
// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue |
| 1580 |
// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic |
| 1581 |
// conventions. It represents the value of the |
| 1582 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 1583 |
func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { |
| 1584 |
return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) |
| 1585 |
} |
| 1586 |
|
| 1587 |
// AWSDynamoDBSelect returns an attribute KeyValue conforming to the |
| 1588 |
// "aws.dynamodb.select" semantic conventions. It represents the value of the |
| 1589 |
// `Select` request parameter. |
| 1590 |
func AWSDynamoDBSelect(val string) attribute.KeyValue { |
| 1591 |
return AWSDynamoDBSelectKey.String(val) |
| 1592 |
} |
| 1593 |
|
| 1594 |
// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the |
| 1595 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys in |
| 1596 |
// the `RequestItems` object field. |
| 1597 |
func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { |
| 1598 |
return AWSDynamoDBTableNamesKey.StringSlice(val) |
| 1599 |
} |
| 1600 |
|
| 1601 |
// DynamoDB.CreateTable |
| 1602 |
const ( |
| 1603 |
// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to |
| 1604 |
// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It |
| 1605 |
// represents the JSON-serialized value of each item of the |
| 1606 |
// `GlobalSecondaryIndexes` request field |
| 1607 |
// |
| 1608 |
// Type: string[] |
| 1609 |
// RequirementLevel: Optional |
| 1610 |
// Stability: experimental |
| 1611 |
// Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": |
| 1612 |
// "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ |
| 1613 |
// "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { |
| 1614 |
// "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' |
| 1615 |
AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") |
| 1616 |
|
| 1617 |
// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to |
| 1618 |
// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 1619 |
// represents the JSON-serialized value of each item of the |
| 1620 |
// `LocalSecondaryIndexes` request field. |
| 1621 |
// |
| 1622 |
// Type: string[] |
| 1623 |
// RequirementLevel: Optional |
| 1624 |
// Stability: experimental |
| 1625 |
// Examples: '{ "IndexARN": "string", "IndexName": "string", |
| 1626 |
// "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { |
| 1627 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 1628 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' |
| 1629 |
AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") |
| 1630 |
) |
| 1631 |
|
| 1632 |
// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue |
| 1633 |
// conforming to the "aws.dynamodb.global_secondary_indexes" semantic |
| 1634 |
// conventions. It represents the JSON-serialized value of each item of the |
| 1635 |
// `GlobalSecondaryIndexes` request field |
| 1636 |
func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 1637 |
return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) |
| 1638 |
} |
| 1639 |
|
| 1640 |
// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming |
| 1641 |
// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 1642 |
// represents the JSON-serialized value of each item of the |
| 1643 |
// `LocalSecondaryIndexes` request field. |
| 1644 |
func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 1645 |
return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) |
| 1646 |
} |
| 1647 |
|
| 1648 |
// DynamoDB.ListTables |
| 1649 |
const ( |
| 1650 |
// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the |
| 1651 |
// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents |
| 1652 |
// the value of the `ExclusiveStartTableName` request parameter. |
| 1653 |
// |
| 1654 |
// Type: string |
| 1655 |
// RequirementLevel: Optional |
| 1656 |
// Stability: experimental |
| 1657 |
// Examples: 'Users', 'CatsTable' |
| 1658 |
AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") |
| 1659 |
|
| 1660 |
// AWSDynamoDBTableCountKey is the attribute Key conforming to the |
| 1661 |
// "aws.dynamodb.table_count" semantic conventions. It represents the the |
| 1662 |
// number of items in the `TableNames` response parameter. |
| 1663 |
// |
| 1664 |
// Type: int |
| 1665 |
// RequirementLevel: Optional |
| 1666 |
// Stability: experimental |
| 1667 |
// Examples: 20 |
| 1668 |
AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") |
| 1669 |
) |
| 1670 |
|
| 1671 |
// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming |
| 1672 |
// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It |
| 1673 |
// represents the value of the `ExclusiveStartTableName` request parameter. |
| 1674 |
func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { |
| 1675 |
return AWSDynamoDBExclusiveStartTableKey.String(val) |
| 1676 |
} |
| 1677 |
|
| 1678 |
// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the |
| 1679 |
// "aws.dynamodb.table_count" semantic conventions. It represents the the |
| 1680 |
// number of items in the `TableNames` response parameter. |
| 1681 |
func AWSDynamoDBTableCount(val int) attribute.KeyValue { |
| 1682 |
return AWSDynamoDBTableCountKey.Int(val) |
| 1683 |
} |
| 1684 |
|
| 1685 |
// DynamoDB.Query |
| 1686 |
const ( |
| 1687 |
// AWSDynamoDBScanForwardKey is the attribute Key conforming to the |
| 1688 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the |
| 1689 |
// value of the `ScanIndexForward` request parameter. |
| 1690 |
// |
| 1691 |
// Type: boolean |
| 1692 |
// RequirementLevel: Optional |
| 1693 |
// Stability: experimental |
| 1694 |
AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") |
| 1695 |
) |
| 1696 |
|
| 1697 |
// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the |
| 1698 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of |
| 1699 |
// the `ScanIndexForward` request parameter. |
| 1700 |
func AWSDynamoDBScanForward(val bool) attribute.KeyValue { |
| 1701 |
return AWSDynamoDBScanForwardKey.Bool(val) |
| 1702 |
} |
| 1703 |
|
| 1704 |
// DynamoDB.Scan |
| 1705 |
const ( |
| 1706 |
// AWSDynamoDBCountKey is the attribute Key conforming to the |
| 1707 |
// "aws.dynamodb.count" semantic conventions. It represents the value of |
| 1708 |
// the `Count` response parameter. |
| 1709 |
// |
| 1710 |
// Type: int |
| 1711 |
// RequirementLevel: Optional |
| 1712 |
// Stability: experimental |
| 1713 |
// Examples: 10 |
| 1714 |
AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") |
| 1715 |
|
| 1716 |
// AWSDynamoDBScannedCountKey is the attribute Key conforming to the |
| 1717 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the |
| 1718 |
// value of the `ScannedCount` response parameter. |
| 1719 |
// |
| 1720 |
// Type: int |
| 1721 |
// RequirementLevel: Optional |
| 1722 |
// Stability: experimental |
| 1723 |
// Examples: 50 |
| 1724 |
AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") |
| 1725 |
|
| 1726 |
// AWSDynamoDBSegmentKey is the attribute Key conforming to the |
| 1727 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of |
| 1728 |
// the `Segment` request parameter. |
| 1729 |
// |
| 1730 |
// Type: int |
| 1731 |
// RequirementLevel: Optional |
| 1732 |
// Stability: experimental |
| 1733 |
// Examples: 10 |
| 1734 |
AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") |
| 1735 |
|
| 1736 |
// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the |
| 1737 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the |
| 1738 |
// value of the `TotalSegments` request parameter. |
| 1739 |
// |
| 1740 |
// Type: int |
| 1741 |
// RequirementLevel: Optional |
| 1742 |
// Stability: experimental |
| 1743 |
// Examples: 100 |
| 1744 |
AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") |
| 1745 |
) |
| 1746 |
|
| 1747 |
// AWSDynamoDBCount returns an attribute KeyValue conforming to the |
| 1748 |
// "aws.dynamodb.count" semantic conventions. It represents the value of the |
| 1749 |
// `Count` response parameter. |
| 1750 |
func AWSDynamoDBCount(val int) attribute.KeyValue { |
| 1751 |
return AWSDynamoDBCountKey.Int(val) |
| 1752 |
} |
| 1753 |
|
| 1754 |
// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the |
| 1755 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the value |
| 1756 |
// of the `ScannedCount` response parameter. |
| 1757 |
func AWSDynamoDBScannedCount(val int) attribute.KeyValue { |
| 1758 |
return AWSDynamoDBScannedCountKey.Int(val) |
| 1759 |
} |
| 1760 |
|
| 1761 |
// AWSDynamoDBSegment returns an attribute KeyValue conforming to the |
| 1762 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of the |
| 1763 |
// `Segment` request parameter. |
| 1764 |
func AWSDynamoDBSegment(val int) attribute.KeyValue { |
| 1765 |
return AWSDynamoDBSegmentKey.Int(val) |
| 1766 |
} |
| 1767 |
|
| 1768 |
// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the |
| 1769 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the value |
| 1770 |
// of the `TotalSegments` request parameter. |
| 1771 |
func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { |
| 1772 |
return AWSDynamoDBTotalSegmentsKey.Int(val) |
| 1773 |
} |
| 1774 |
|
| 1775 |
// DynamoDB.UpdateTable |
| 1776 |
const ( |
| 1777 |
// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to |
| 1778 |
// the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 1779 |
// represents the JSON-serialized value of each item in the |
| 1780 |
// `AttributeDefinitions` request field. |
| 1781 |
// |
| 1782 |
// Type: string[] |
| 1783 |
// RequirementLevel: Optional |
| 1784 |
// Stability: experimental |
| 1785 |
// Examples: '{ "AttributeName": "string", "AttributeType": "string" }' |
| 1786 |
AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") |
| 1787 |
|
| 1788 |
// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key |
| 1789 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 1790 |
// conventions. It represents the JSON-serialized value of each item in the |
| 1791 |
// the `GlobalSecondaryIndexUpdates` request field. |
| 1792 |
// |
| 1793 |
// Type: string[] |
| 1794 |
// RequirementLevel: Optional |
| 1795 |
// Stability: experimental |
| 1796 |
// Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { |
| 1797 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 1798 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, |
| 1799 |
// "ProvisionedThroughput": { "ReadCapacityUnits": number, |
| 1800 |
// "WriteCapacityUnits": number } }' |
| 1801 |
AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") |
| 1802 |
) |
| 1803 |
|
| 1804 |
// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming |
| 1805 |
// to the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 1806 |
// represents the JSON-serialized value of each item in the |
| 1807 |
// `AttributeDefinitions` request field. |
| 1808 |
func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { |
| 1809 |
return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) |
| 1810 |
} |
| 1811 |
|
| 1812 |
// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue |
| 1813 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 1814 |
// conventions. It represents the JSON-serialized value of each item in the the |
| 1815 |
// `GlobalSecondaryIndexUpdates` request field. |
| 1816 |
func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { |
| 1817 |
return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) |
| 1818 |
} |
| 1819 |
|
| 1820 |
// Attributes that exist for S3 request types. |
| 1821 |
const ( |
| 1822 |
// AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" |
| 1823 |
// semantic conventions. It represents the S3 bucket name the request |
| 1824 |
// refers to. Corresponds to the `--bucket` parameter of the [S3 |
| 1825 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1826 |
// operations. |
| 1827 |
// |
| 1828 |
// Type: string |
| 1829 |
// RequirementLevel: Optional |
| 1830 |
// Stability: experimental |
| 1831 |
// Examples: 'some-bucket-name' |
| 1832 |
// Note: The `bucket` attribute is applicable to all S3 operations that |
| 1833 |
// reference a bucket, i.e. that require the bucket name as a mandatory |
| 1834 |
// parameter. |
| 1835 |
// This applies to almost all S3 operations except `list-buckets`. |
| 1836 |
AWSS3BucketKey = attribute.Key("aws.s3.bucket") |
| 1837 |
|
| 1838 |
// AWSS3CopySourceKey is the attribute Key conforming to the |
| 1839 |
// "aws.s3.copy_source" semantic conventions. It represents the source |
| 1840 |
// object (in the form `bucket`/`key`) for the copy operation. |
| 1841 |
// |
| 1842 |
// Type: string |
| 1843 |
// RequirementLevel: Optional |
| 1844 |
// Stability: experimental |
| 1845 |
// Examples: 'someFile.yml' |
| 1846 |
// Note: The `copy_source` attribute applies to S3 copy operations and |
| 1847 |
// corresponds to the `--copy-source` parameter |
| 1848 |
// of the [copy-object operation within the S3 |
| 1849 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). |
| 1850 |
// This applies in particular to the following operations: |
| 1851 |
// |
| 1852 |
// - |
| 1853 |
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 1854 |
// - |
| 1855 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1856 |
AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") |
| 1857 |
|
| 1858 |
// AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" |
| 1859 |
// semantic conventions. It represents the delete request container that |
| 1860 |
// specifies the objects to be deleted. |
| 1861 |
// |
| 1862 |
// Type: string |
| 1863 |
// RequirementLevel: Optional |
| 1864 |
// Stability: experimental |
| 1865 |
// Examples: |
| 1866 |
// 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' |
| 1867 |
// Note: The `delete` attribute is only applicable to the |
| 1868 |
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) |
| 1869 |
// operation. |
| 1870 |
// The `delete` attribute corresponds to the `--delete` parameter of the |
| 1871 |
// [delete-objects operation within the S3 |
| 1872 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). |
| 1873 |
AWSS3DeleteKey = attribute.Key("aws.s3.delete") |
| 1874 |
|
| 1875 |
// AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic |
| 1876 |
// conventions. It represents the S3 object key the request refers to. |
| 1877 |
// Corresponds to the `--key` parameter of the [S3 |
| 1878 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1879 |
// operations. |
| 1880 |
// |
| 1881 |
// Type: string |
| 1882 |
// RequirementLevel: Optional |
| 1883 |
// Stability: experimental |
| 1884 |
// Examples: 'someFile.yml' |
| 1885 |
// Note: The `key` attribute is applicable to all object-related S3 |
| 1886 |
// operations, i.e. that require the object key as a mandatory parameter. |
| 1887 |
// This applies in particular to the following operations: |
| 1888 |
// |
| 1889 |
// - |
| 1890 |
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 1891 |
// - |
| 1892 |
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) |
| 1893 |
// - |
| 1894 |
// [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) |
| 1895 |
// - |
| 1896 |
// [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) |
| 1897 |
// - |
| 1898 |
// [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) |
| 1899 |
// - |
| 1900 |
// [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) |
| 1901 |
// - |
| 1902 |
// [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) |
| 1903 |
// - |
| 1904 |
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 1905 |
// - |
| 1906 |
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 1907 |
// - |
| 1908 |
// [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) |
| 1909 |
// - |
| 1910 |
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 1911 |
// - |
| 1912 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1913 |
// - |
| 1914 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1915 |
AWSS3KeyKey = attribute.Key("aws.s3.key") |
| 1916 |
|
| 1917 |
// AWSS3PartNumberKey is the attribute Key conforming to the |
| 1918 |
// "aws.s3.part_number" semantic conventions. It represents the part number |
| 1919 |
// of the part being uploaded in a multipart-upload operation. This is a |
| 1920 |
// positive integer between 1 and 10,000. |
| 1921 |
// |
| 1922 |
// Type: int |
| 1923 |
// RequirementLevel: Optional |
| 1924 |
// Stability: experimental |
| 1925 |
// Examples: 3456 |
| 1926 |
// Note: The `part_number` attribute is only applicable to the |
| 1927 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1928 |
// and |
| 1929 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1930 |
// operations. |
| 1931 |
// The `part_number` attribute corresponds to the `--part-number` parameter |
| 1932 |
// of the |
| 1933 |
// [upload-part operation within the S3 |
| 1934 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). |
| 1935 |
AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") |
| 1936 |
|
| 1937 |
// AWSS3UploadIDKey is the attribute Key conforming to the |
| 1938 |
// "aws.s3.upload_id" semantic conventions. It represents the upload ID |
| 1939 |
// that identifies the multipart upload. |
| 1940 |
// |
| 1941 |
// Type: string |
| 1942 |
// RequirementLevel: Optional |
| 1943 |
// Stability: experimental |
| 1944 |
// Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' |
| 1945 |
// Note: The `upload_id` attribute applies to S3 multipart-upload |
| 1946 |
// operations and corresponds to the `--upload-id` parameter |
| 1947 |
// of the [S3 |
| 1948 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1949 |
// multipart operations. |
| 1950 |
// This applies in particular to the following operations: |
| 1951 |
// |
| 1952 |
// - |
| 1953 |
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 1954 |
// - |
| 1955 |
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 1956 |
// - |
| 1957 |
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 1958 |
// - |
| 1959 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1960 |
// - |
| 1961 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1962 |
AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") |
| 1963 |
) |
| 1964 |
|
| 1965 |
// AWSS3Bucket returns an attribute KeyValue conforming to the |
| 1966 |
// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the |
| 1967 |
// request refers to. Corresponds to the `--bucket` parameter of the [S3 |
| 1968 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1969 |
// operations. |
| 1970 |
func AWSS3Bucket(val string) attribute.KeyValue { |
| 1971 |
return AWSS3BucketKey.String(val) |
| 1972 |
} |
| 1973 |
|
| 1974 |
// AWSS3CopySource returns an attribute KeyValue conforming to the |
| 1975 |
// "aws.s3.copy_source" semantic conventions. It represents the source object |
| 1976 |
// (in the form `bucket`/`key`) for the copy operation. |
| 1977 |
func AWSS3CopySource(val string) attribute.KeyValue { |
| 1978 |
return AWSS3CopySourceKey.String(val) |
| 1979 |
} |
| 1980 |
|
| 1981 |
// AWSS3Delete returns an attribute KeyValue conforming to the |
| 1982 |
// "aws.s3.delete" semantic conventions. It represents the delete request |
| 1983 |
// container that specifies the objects to be deleted. |
| 1984 |
func AWSS3Delete(val string) attribute.KeyValue { |
| 1985 |
return AWSS3DeleteKey.String(val) |
| 1986 |
} |
| 1987 |
|
| 1988 |
// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" |
| 1989 |
// semantic conventions. It represents the S3 object key the request refers to. |
| 1990 |
// Corresponds to the `--key` parameter of the [S3 |
| 1991 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1992 |
// operations. |
| 1993 |
func AWSS3Key(val string) attribute.KeyValue { |
| 1994 |
return AWSS3KeyKey.String(val) |
| 1995 |
} |
| 1996 |
|
| 1997 |
// AWSS3PartNumber returns an attribute KeyValue conforming to the |
| 1998 |
// "aws.s3.part_number" semantic conventions. It represents the part number of |
| 1999 |
// the part being uploaded in a multipart-upload operation. This is a positive |
| 2000 |
// integer between 1 and 10,000. |
| 2001 |
func AWSS3PartNumber(val int) attribute.KeyValue { |
| 2002 |
return AWSS3PartNumberKey.Int(val) |
| 2003 |
} |
| 2004 |
|
| 2005 |
// AWSS3UploadID returns an attribute KeyValue conforming to the |
| 2006 |
// "aws.s3.upload_id" semantic conventions. It represents the upload ID that |
| 2007 |
// identifies the multipart upload. |
| 2008 |
func AWSS3UploadID(val string) attribute.KeyValue { |
| 2009 |
return AWSS3UploadIDKey.String(val) |
| 2010 |
} |
| 2011 |
|
| 2012 |
// Semantic conventions to apply when instrumenting the GraphQL implementation. |
| 2013 |
// They map GraphQL operations to attributes on a Span. |
| 2014 |
const ( |
| 2015 |
// GraphqlDocumentKey is the attribute Key conforming to the |
| 2016 |
// "graphql.document" semantic conventions. It represents the GraphQL |
| 2017 |
// document being executed. |
| 2018 |
// |
| 2019 |
// Type: string |
| 2020 |
// RequirementLevel: Optional |
| 2021 |
// Stability: experimental |
| 2022 |
// Examples: 'query findBookByID { bookByID(id: ?) { name } }' |
| 2023 |
// Note: The value may be sanitized to exclude sensitive information. |
| 2024 |
GraphqlDocumentKey = attribute.Key("graphql.document") |
| 2025 |
|
| 2026 |
// GraphqlOperationNameKey is the attribute Key conforming to the |
| 2027 |
// "graphql.operation.name" semantic conventions. It represents the name of |
| 2028 |
// the operation being executed. |
| 2029 |
// |
| 2030 |
// Type: string |
| 2031 |
// RequirementLevel: Optional |
| 2032 |
// Stability: experimental |
| 2033 |
// Examples: 'findBookByID' |
| 2034 |
GraphqlOperationNameKey = attribute.Key("graphql.operation.name") |
| 2035 |
|
| 2036 |
// GraphqlOperationTypeKey is the attribute Key conforming to the |
| 2037 |
// "graphql.operation.type" semantic conventions. It represents the type of |
| 2038 |
// the operation being executed. |
| 2039 |
// |
| 2040 |
// Type: Enum |
| 2041 |
// RequirementLevel: Optional |
| 2042 |
// Stability: experimental |
| 2043 |
// Examples: 'query', 'mutation', 'subscription' |
| 2044 |
GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") |
| 2045 |
) |
| 2046 |
|
| 2047 |
var ( |
| 2048 |
// GraphQL query |
| 2049 |
GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") |
| 2050 |
// GraphQL mutation |
| 2051 |
GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") |
| 2052 |
// GraphQL subscription |
| 2053 |
GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") |
| 2054 |
) |
| 2055 |
|
| 2056 |
// GraphqlDocument returns an attribute KeyValue conforming to the |
| 2057 |
// "graphql.document" semantic conventions. It represents the GraphQL document |
| 2058 |
// being executed. |
| 2059 |
func GraphqlDocument(val string) attribute.KeyValue { |
| 2060 |
return GraphqlDocumentKey.String(val) |
| 2061 |
} |
| 2062 |
|
| 2063 |
// GraphqlOperationName returns an attribute KeyValue conforming to the |
| 2064 |
// "graphql.operation.name" semantic conventions. It represents the name of the |
| 2065 |
// operation being executed. |
| 2066 |
func GraphqlOperationName(val string) attribute.KeyValue { |
| 2067 |
return GraphqlOperationNameKey.String(val) |
| 2068 |
} |