attribute_group.go raw
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.26.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // The Android platform on which the Android application is running.
11 const (
12 // AndroidOSAPILevelKey is the attribute Key conforming to the
13 // "android.os.api_level" semantic conventions. It represents the uniquely
14 // identifies the framework API revision offered by a version
15 // (`os.version`) of the android operating system. More information can be
16 // found
17 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
18 //
19 // Type: string
20 // RequirementLevel: Optional
21 // Stability: experimental
22 // Examples: '33', '32'
23 AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
24 )
25
26 // AndroidOSAPILevel returns an attribute KeyValue conforming to the
27 // "android.os.api_level" semantic conventions. It represents the uniquely
28 // identifies the framework API revision offered by a version (`os.version`) of
29 // the android operating system. More information can be found
30 // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
31 func AndroidOSAPILevel(val string) attribute.KeyValue {
32 return AndroidOSAPILevelKey.String(val)
33 }
34
35 // ASP.NET Core attributes
36 const (
37 // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the
38 // "aspnetcore.rate_limiting.result" semantic conventions. It represents
39 // the rate-limiting result, shows whether the lease was acquired or
40 // contains a rejection reason
41 //
42 // Type: Enum
43 // RequirementLevel: Required
44 // Stability: stable
45 // Examples: 'acquired', 'request_canceled'
46 AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result")
47
48 // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to
49 // the "aspnetcore.diagnostics.handler.type" semantic conventions. It
50 // represents the full type name of the
51 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
52 // implementation that handled the exception.
53 //
54 // Type: string
55 // RequirementLevel: ConditionallyRequired (if and only if the exception
56 // was handled by this handler.)
57 // Stability: stable
58 // Examples: 'Contoso.MyHandler'
59 AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type")
60
61 // AspnetcoreDiagnosticsExceptionResultKey is the attribute Key conforming
62 // to the "aspnetcore.diagnostics.exception.result" semantic conventions.
63 // It represents the aSP.NET Core exception middleware handling result
64 //
65 // Type: Enum
66 // RequirementLevel: Optional
67 // Stability: stable
68 // Examples: 'handled', 'unhandled'
69 AspnetcoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result")
70
71 // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the
72 // "aspnetcore.rate_limiting.policy" semantic conventions. It represents
73 // the rate limiting policy name.
74 //
75 // Type: string
76 // RequirementLevel: Optional
77 // Stability: stable
78 // Examples: 'fixed', 'sliding', 'token'
79 AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy")
80
81 // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the
82 // "aspnetcore.request.is_unhandled" semantic conventions. It represents
83 // the flag indicating if request was handled by the application pipeline.
84 //
85 // Type: boolean
86 // RequirementLevel: Optional
87 // Stability: stable
88 // Examples: True
89 AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled")
90
91 // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the
92 // "aspnetcore.routing.is_fallback" semantic conventions. It represents a
93 // value that indicates whether the matched route is a fallback route.
94 //
95 // Type: boolean
96 // RequirementLevel: Optional
97 // Stability: stable
98 // Examples: True
99 AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback")
100
101 // AspnetcoreRoutingMatchStatusKey is the attribute Key conforming to the
102 // "aspnetcore.routing.match_status" semantic conventions. It represents
103 // the match result - success or failure
104 //
105 // Type: Enum
106 // RequirementLevel: Optional
107 // Stability: stable
108 // Examples: 'success', 'failure'
109 AspnetcoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status")
110 )
111
112 var (
113 // Lease was acquired
114 AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired")
115 // Lease request was rejected by the endpoint limiter
116 AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter")
117 // Lease request was rejected by the global limiter
118 AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter")
119 // Lease request was canceled
120 AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled")
121 )
122
123 var (
124 // Exception was handled by the exception handling middleware
125 AspnetcoreDiagnosticsExceptionResultHandled = AspnetcoreDiagnosticsExceptionResultKey.String("handled")
126 // Exception was not handled by the exception handling middleware
127 AspnetcoreDiagnosticsExceptionResultUnhandled = AspnetcoreDiagnosticsExceptionResultKey.String("unhandled")
128 // Exception handling was skipped because the response had started
129 AspnetcoreDiagnosticsExceptionResultSkipped = AspnetcoreDiagnosticsExceptionResultKey.String("skipped")
130 // Exception handling didn't run because the request was aborted
131 AspnetcoreDiagnosticsExceptionResultAborted = AspnetcoreDiagnosticsExceptionResultKey.String("aborted")
132 )
133
134 var (
135 // Match succeeded
136 AspnetcoreRoutingMatchStatusSuccess = AspnetcoreRoutingMatchStatusKey.String("success")
137 // Match failed
138 AspnetcoreRoutingMatchStatusFailure = AspnetcoreRoutingMatchStatusKey.String("failure")
139 )
140
141 // AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming
142 // to the "aspnetcore.diagnostics.handler.type" semantic conventions. It
143 // represents the full type name of the
144 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
145 // implementation that handled the exception.
146 func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue {
147 return AspnetcoreDiagnosticsHandlerTypeKey.String(val)
148 }
149
150 // AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to
151 // the "aspnetcore.rate_limiting.policy" semantic conventions. It represents
152 // the rate limiting policy name.
153 func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue {
154 return AspnetcoreRateLimitingPolicyKey.String(val)
155 }
156
157 // AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to
158 // the "aspnetcore.request.is_unhandled" semantic conventions. It represents
159 // the flag indicating if request was handled by the application pipeline.
160 func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue {
161 return AspnetcoreRequestIsUnhandledKey.Bool(val)
162 }
163
164 // AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to
165 // the "aspnetcore.routing.is_fallback" semantic conventions. It represents a
166 // value that indicates whether the matched route is a fallback route.
167 func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue {
168 return AspnetcoreRoutingIsFallbackKey.Bool(val)
169 }
170
171 // Generic attributes for AWS services.
172 const (
173 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
174 // semantic conventions. It represents the AWS request ID as returned in
175 // the response headers `x-amz-request-id` or `x-amz-requestid`.
176 //
177 // Type: string
178 // RequirementLevel: Optional
179 // Stability: experimental
180 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
181 AWSRequestIDKey = attribute.Key("aws.request_id")
182 )
183
184 // AWSRequestID returns an attribute KeyValue conforming to the
185 // "aws.request_id" semantic conventions. It represents the AWS request ID as
186 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
187 func AWSRequestID(val string) attribute.KeyValue {
188 return AWSRequestIDKey.String(val)
189 }
190
191 // Attributes for AWS DynamoDB.
192 const (
193 // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
194 // the "aws.dynamodb.attribute_definitions" semantic conventions. It
195 // represents the JSON-serialized value of each item in the
196 // `AttributeDefinitions` request field.
197 //
198 // Type: string[]
199 // RequirementLevel: Optional
200 // Stability: experimental
201 // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
202 AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
203
204 // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
205 // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
206 // value of the `AttributesToGet` request parameter.
207 //
208 // Type: string[]
209 // RequirementLevel: Optional
210 // Stability: experimental
211 // Examples: 'lives', 'id'
212 AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
213
214 // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
215 // "aws.dynamodb.consistent_read" semantic conventions. It represents the
216 // value of the `ConsistentRead` request parameter.
217 //
218 // Type: boolean
219 // RequirementLevel: Optional
220 // Stability: experimental
221 AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
222
223 // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
224 // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
225 // JSON-serialized value of each item in the `ConsumedCapacity` response
226 // field.
227 //
228 // Type: string[]
229 // RequirementLevel: Optional
230 // Stability: experimental
231 // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
232 // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
233 // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
234 // { "CapacityUnits": number, "ReadCapacityUnits": number,
235 // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
236 // { "CapacityUnits": number, "ReadCapacityUnits": number,
237 // "WriteCapacityUnits": number }, "TableName": "string",
238 // "WriteCapacityUnits": number }'
239 AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
240
241 // AWSDynamoDBCountKey is the attribute Key conforming to the
242 // "aws.dynamodb.count" semantic conventions. It represents the value of
243 // the `Count` response parameter.
244 //
245 // Type: int
246 // RequirementLevel: Optional
247 // Stability: experimental
248 // Examples: 10
249 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
250
251 // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
252 // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
253 // the value of the `ExclusiveStartTableName` request parameter.
254 //
255 // Type: string
256 // RequirementLevel: Optional
257 // Stability: experimental
258 // Examples: 'Users', 'CatsTable'
259 AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
260
261 // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
262 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
263 // conventions. It represents the JSON-serialized value of each item in the
264 // `GlobalSecondaryIndexUpdates` request field.
265 //
266 // Type: string[]
267 // RequirementLevel: Optional
268 // Stability: experimental
269 // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
270 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
271 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
272 // "ProvisionedThroughput": { "ReadCapacityUnits": number,
273 // "WriteCapacityUnits": number } }'
274 AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
275
276 // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
277 // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
278 // represents the JSON-serialized value of each item of the
279 // `GlobalSecondaryIndexes` request field
280 //
281 // Type: string[]
282 // RequirementLevel: Optional
283 // Stability: experimental
284 // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
285 // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
286 // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
287 // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
288 AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
289
290 // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
291 // "aws.dynamodb.index_name" semantic conventions. It represents the value
292 // of the `IndexName` request parameter.
293 //
294 // Type: string
295 // RequirementLevel: Optional
296 // Stability: experimental
297 // Examples: 'name_to_group'
298 AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
299
300 // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
301 // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
302 // represents the JSON-serialized value of the `ItemCollectionMetrics`
303 // response field.
304 //
305 // Type: string
306 // RequirementLevel: Optional
307 // Stability: experimental
308 // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
309 // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
310 // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
311 // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
312 // "SizeEstimateRangeGB": [ number ] } ] }'
313 AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
314
315 // AWSDynamoDBLimitKey is the attribute Key conforming to the
316 // "aws.dynamodb.limit" semantic conventions. It represents the value of
317 // the `Limit` request parameter.
318 //
319 // Type: int
320 // RequirementLevel: Optional
321 // Stability: experimental
322 // Examples: 10
323 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
324
325 // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
326 // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
327 // represents the JSON-serialized value of each item of the
328 // `LocalSecondaryIndexes` request field.
329 //
330 // Type: string[]
331 // RequirementLevel: Optional
332 // Stability: experimental
333 // Examples: '{ "IndexARN": "string", "IndexName": "string",
334 // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
335 // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
336 // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
337 AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
338
339 // AWSDynamoDBProjectionKey is the attribute Key conforming to the
340 // "aws.dynamodb.projection" semantic conventions. It represents the value
341 // of the `ProjectionExpression` request parameter.
342 //
343 // Type: string
344 // RequirementLevel: Optional
345 // Stability: experimental
346 // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
347 // RelatedItems, ProductReviews'
348 AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
349
350 // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
351 // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
352 // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
353 // request parameter.
354 //
355 // Type: double
356 // RequirementLevel: Optional
357 // Stability: experimental
358 // Examples: 1.0, 2.0
359 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
360
361 // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
362 // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
363 // It represents the value of the
364 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
365 //
366 // Type: double
367 // RequirementLevel: Optional
368 // Stability: experimental
369 // Examples: 1.0, 2.0
370 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
371
372 // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
373 // "aws.dynamodb.scan_forward" semantic conventions. It represents the
374 // value of the `ScanIndexForward` request parameter.
375 //
376 // Type: boolean
377 // RequirementLevel: Optional
378 // Stability: experimental
379 AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
380
381 // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
382 // "aws.dynamodb.scanned_count" semantic conventions. It represents the
383 // value of the `ScannedCount` response parameter.
384 //
385 // Type: int
386 // RequirementLevel: Optional
387 // Stability: experimental
388 // Examples: 50
389 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
390
391 // AWSDynamoDBSegmentKey is the attribute Key conforming to the
392 // "aws.dynamodb.segment" semantic conventions. It represents the value of
393 // the `Segment` request parameter.
394 //
395 // Type: int
396 // RequirementLevel: Optional
397 // Stability: experimental
398 // Examples: 10
399 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
400
401 // AWSDynamoDBSelectKey is the attribute Key conforming to the
402 // "aws.dynamodb.select" semantic conventions. It represents the value of
403 // the `Select` request parameter.
404 //
405 // Type: string
406 // RequirementLevel: Optional
407 // Stability: experimental
408 // Examples: 'ALL_ATTRIBUTES', 'COUNT'
409 AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
410
411 // AWSDynamoDBTableCountKey is the attribute Key conforming to the
412 // "aws.dynamodb.table_count" semantic conventions. It represents the
413 // number of items in the `TableNames` response parameter.
414 //
415 // Type: int
416 // RequirementLevel: Optional
417 // Stability: experimental
418 // Examples: 20
419 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
420
421 // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
422 // "aws.dynamodb.table_names" semantic conventions. It represents the keys
423 // in the `RequestItems` object field.
424 //
425 // Type: string[]
426 // RequirementLevel: Optional
427 // Stability: experimental
428 // Examples: 'Users', 'Cats'
429 AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
430
431 // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
432 // "aws.dynamodb.total_segments" semantic conventions. It represents the
433 // value of the `TotalSegments` request parameter.
434 //
435 // Type: int
436 // RequirementLevel: Optional
437 // Stability: experimental
438 // Examples: 100
439 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
440 )
441
442 // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
443 // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
444 // represents the JSON-serialized value of each item in the
445 // `AttributeDefinitions` request field.
446 func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
447 return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
448 }
449
450 // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
451 // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
452 // value of the `AttributesToGet` request parameter.
453 func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
454 return AWSDynamoDBAttributesToGetKey.StringSlice(val)
455 }
456
457 // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
458 // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
459 // of the `ConsistentRead` request parameter.
460 func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
461 return AWSDynamoDBConsistentReadKey.Bool(val)
462 }
463
464 // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
465 // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
466 // JSON-serialized value of each item in the `ConsumedCapacity` response field.
467 func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
468 return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
469 }
470
471 // AWSDynamoDBCount returns an attribute KeyValue conforming to the
472 // "aws.dynamodb.count" semantic conventions. It represents the value of the
473 // `Count` response parameter.
474 func AWSDynamoDBCount(val int) attribute.KeyValue {
475 return AWSDynamoDBCountKey.Int(val)
476 }
477
478 // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
479 // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
480 // represents the value of the `ExclusiveStartTableName` request parameter.
481 func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
482 return AWSDynamoDBExclusiveStartTableKey.String(val)
483 }
484
485 // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
486 // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
487 // conventions. It represents the JSON-serialized value of each item in the
488 // `GlobalSecondaryIndexUpdates` request field.
489 func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
490 return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
491 }
492
493 // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
494 // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
495 // conventions. It represents the JSON-serialized value of each item of the
496 // `GlobalSecondaryIndexes` request field
497 func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
498 return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
499 }
500
501 // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
502 // "aws.dynamodb.index_name" semantic conventions. It represents the value of
503 // the `IndexName` request parameter.
504 func AWSDynamoDBIndexName(val string) attribute.KeyValue {
505 return AWSDynamoDBIndexNameKey.String(val)
506 }
507
508 // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
509 // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
510 // represents the JSON-serialized value of the `ItemCollectionMetrics` response
511 // field.
512 func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
513 return AWSDynamoDBItemCollectionMetricsKey.String(val)
514 }
515
516 // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
517 // "aws.dynamodb.limit" semantic conventions. It represents the value of the
518 // `Limit` request parameter.
519 func AWSDynamoDBLimit(val int) attribute.KeyValue {
520 return AWSDynamoDBLimitKey.Int(val)
521 }
522
523 // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
524 // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
525 // represents the JSON-serialized value of each item of the
526 // `LocalSecondaryIndexes` request field.
527 func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
528 return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
529 }
530
531 // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
532 // "aws.dynamodb.projection" semantic conventions. It represents the value of
533 // the `ProjectionExpression` request parameter.
534 func AWSDynamoDBProjection(val string) attribute.KeyValue {
535 return AWSDynamoDBProjectionKey.String(val)
536 }
537
538 // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
539 // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
540 // conventions. It represents the value of the
541 // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
542 func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
543 return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
544 }
545
546 // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
547 // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
548 // conventions. It represents the value of the
549 // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
550 func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
551 return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
552 }
553
554 // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
555 // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
556 // the `ScanIndexForward` request parameter.
557 func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
558 return AWSDynamoDBScanForwardKey.Bool(val)
559 }
560
561 // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
562 // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
563 // of the `ScannedCount` response parameter.
564 func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
565 return AWSDynamoDBScannedCountKey.Int(val)
566 }
567
568 // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
569 // "aws.dynamodb.segment" semantic conventions. It represents the value of the
570 // `Segment` request parameter.
571 func AWSDynamoDBSegment(val int) attribute.KeyValue {
572 return AWSDynamoDBSegmentKey.Int(val)
573 }
574
575 // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
576 // "aws.dynamodb.select" semantic conventions. It represents the value of the
577 // `Select` request parameter.
578 func AWSDynamoDBSelect(val string) attribute.KeyValue {
579 return AWSDynamoDBSelectKey.String(val)
580 }
581
582 // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
583 // "aws.dynamodb.table_count" semantic conventions. It represents the number of
584 // items in the `TableNames` response parameter.
585 func AWSDynamoDBTableCount(val int) attribute.KeyValue {
586 return AWSDynamoDBTableCountKey.Int(val)
587 }
588
589 // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
590 // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
591 // the `RequestItems` object field.
592 func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
593 return AWSDynamoDBTableNamesKey.StringSlice(val)
594 }
595
596 // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
597 // "aws.dynamodb.total_segments" semantic conventions. It represents the value
598 // of the `TotalSegments` request parameter.
599 func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
600 return AWSDynamoDBTotalSegmentsKey.Int(val)
601 }
602
603 // Attributes for AWS Elastic Container Service (ECS).
604 const (
605 // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
606 // semantic conventions. It represents the ID of a running ECS task. The ID
607 // MUST be extracted from `task.arn`.
608 //
609 // Type: string
610 // RequirementLevel: ConditionallyRequired (If and only if `task.arn` is
611 // populated.)
612 // Stability: experimental
613 // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b',
614 // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
615 AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
616
617 // AWSECSClusterARNKey is the attribute Key conforming to the
618 // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
619 // [ECS
620 // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
621 //
622 // Type: string
623 // RequirementLevel: Optional
624 // Stability: experimental
625 // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
626 AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
627
628 // AWSECSContainerARNKey is the attribute Key conforming to the
629 // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
630 // Resource Name (ARN) of an [ECS container
631 // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
632 //
633 // Type: string
634 // RequirementLevel: Optional
635 // Stability: experimental
636 // Examples:
637 // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
638 AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
639
640 // AWSECSLaunchtypeKey is the attribute Key conforming to the
641 // "aws.ecs.launchtype" semantic conventions. It represents the [launch
642 // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
643 // for an ECS task.
644 //
645 // Type: Enum
646 // RequirementLevel: Optional
647 // Stability: experimental
648 AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
649
650 // AWSECSTaskARNKey is the attribute Key conforming to the
651 // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a
652 // running [ECS
653 // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
654 //
655 // Type: string
656 // RequirementLevel: Optional
657 // Stability: experimental
658 // Examples:
659 // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b',
660 // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
661 AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
662
663 // AWSECSTaskFamilyKey is the attribute Key conforming to the
664 // "aws.ecs.task.family" semantic conventions. It represents the family
665 // name of the [ECS task
666 // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
667 // used to create the ECS task.
668 //
669 // Type: string
670 // RequirementLevel: Optional
671 // Stability: experimental
672 // Examples: 'opentelemetry-family'
673 AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
674
675 // AWSECSTaskRevisionKey is the attribute Key conforming to the
676 // "aws.ecs.task.revision" semantic conventions. It represents the revision
677 // for the task definition used to create the ECS task.
678 //
679 // Type: string
680 // RequirementLevel: Optional
681 // Stability: experimental
682 // Examples: '8', '26'
683 AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
684 )
685
686 var (
687 // ec2
688 AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
689 // fargate
690 AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
691 )
692
693 // AWSECSTaskID returns an attribute KeyValue conforming to the
694 // "aws.ecs.task.id" semantic conventions. It represents the ID of a running
695 // ECS task. The ID MUST be extracted from `task.arn`.
696 func AWSECSTaskID(val string) attribute.KeyValue {
697 return AWSECSTaskIDKey.String(val)
698 }
699
700 // AWSECSClusterARN returns an attribute KeyValue conforming to the
701 // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
702 // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
703 func AWSECSClusterARN(val string) attribute.KeyValue {
704 return AWSECSClusterARNKey.String(val)
705 }
706
707 // AWSECSContainerARN returns an attribute KeyValue conforming to the
708 // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
709 // Resource Name (ARN) of an [ECS container
710 // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
711 func AWSECSContainerARN(val string) attribute.KeyValue {
712 return AWSECSContainerARNKey.String(val)
713 }
714
715 // AWSECSTaskARN returns an attribute KeyValue conforming to the
716 // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
717 // [ECS
718 // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
719 func AWSECSTaskARN(val string) attribute.KeyValue {
720 return AWSECSTaskARNKey.String(val)
721 }
722
723 // AWSECSTaskFamily returns an attribute KeyValue conforming to the
724 // "aws.ecs.task.family" semantic conventions. It represents the family name of
725 // the [ECS task
726 // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
727 // used to create the ECS task.
728 func AWSECSTaskFamily(val string) attribute.KeyValue {
729 return AWSECSTaskFamilyKey.String(val)
730 }
731
732 // AWSECSTaskRevision returns an attribute KeyValue conforming to the
733 // "aws.ecs.task.revision" semantic conventions. It represents the revision for
734 // the task definition used to create the ECS task.
735 func AWSECSTaskRevision(val string) attribute.KeyValue {
736 return AWSECSTaskRevisionKey.String(val)
737 }
738
739 // Attributes for AWS Elastic Kubernetes Service (EKS).
740 const (
741 // AWSEKSClusterARNKey is the attribute Key conforming to the
742 // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
743 // EKS cluster.
744 //
745 // Type: string
746 // RequirementLevel: Optional
747 // Stability: experimental
748 // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
749 AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
750 )
751
752 // AWSEKSClusterARN returns an attribute KeyValue conforming to the
753 // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
754 // cluster.
755 func AWSEKSClusterARN(val string) attribute.KeyValue {
756 return AWSEKSClusterARNKey.String(val)
757 }
758
759 // Attributes for AWS Logs.
760 const (
761 // AWSLogGroupARNsKey is the attribute Key conforming to the
762 // "aws.log.group.arns" semantic conventions. It represents the Amazon
763 // Resource Name(s) (ARN) of the AWS log group(s).
764 //
765 // Type: string[]
766 // RequirementLevel: Optional
767 // Stability: experimental
768 // Examples:
769 // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
770 // Note: See the [log group ARN format
771 // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
772 AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
773
774 // AWSLogGroupNamesKey is the attribute Key conforming to the
775 // "aws.log.group.names" semantic conventions. It represents the name(s) of
776 // the AWS log group(s) an application is writing to.
777 //
778 // Type: string[]
779 // RequirementLevel: Optional
780 // Stability: experimental
781 // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
782 // Note: Multiple log groups must be supported for cases like
783 // multi-container applications, where a single application has sidecar
784 // containers, and each write to their own log group.
785 AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
786
787 // AWSLogStreamARNsKey is the attribute Key conforming to the
788 // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
789 // the AWS log stream(s).
790 //
791 // Type: string[]
792 // RequirementLevel: Optional
793 // Stability: experimental
794 // Examples:
795 // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
796 // Note: See the [log stream ARN format
797 // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
798 // One log group can contain several log streams, so these ARNs necessarily
799 // identify both a log group and a log stream.
800 AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
801
802 // AWSLogStreamNamesKey is the attribute Key conforming to the
803 // "aws.log.stream.names" semantic conventions. It represents the name(s)
804 // of the AWS log stream(s) an application is writing to.
805 //
806 // Type: string[]
807 // RequirementLevel: Optional
808 // Stability: experimental
809 // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
810 AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
811 )
812
813 // AWSLogGroupARNs returns an attribute KeyValue conforming to the
814 // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
815 // Name(s) (ARN) of the AWS log group(s).
816 func AWSLogGroupARNs(val ...string) attribute.KeyValue {
817 return AWSLogGroupARNsKey.StringSlice(val)
818 }
819
820 // AWSLogGroupNames returns an attribute KeyValue conforming to the
821 // "aws.log.group.names" semantic conventions. It represents the name(s) of the
822 // AWS log group(s) an application is writing to.
823 func AWSLogGroupNames(val ...string) attribute.KeyValue {
824 return AWSLogGroupNamesKey.StringSlice(val)
825 }
826
827 // AWSLogStreamARNs returns an attribute KeyValue conforming to the
828 // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
829 // AWS log stream(s).
830 func AWSLogStreamARNs(val ...string) attribute.KeyValue {
831 return AWSLogStreamARNsKey.StringSlice(val)
832 }
833
834 // AWSLogStreamNames returns an attribute KeyValue conforming to the
835 // "aws.log.stream.names" semantic conventions. It represents the name(s) of
836 // the AWS log stream(s) an application is writing to.
837 func AWSLogStreamNames(val ...string) attribute.KeyValue {
838 return AWSLogStreamNamesKey.StringSlice(val)
839 }
840
841 // Attributes for AWS Lambda.
842 const (
843 // AWSLambdaInvokedARNKey is the attribute Key conforming to the
844 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
845 // invoked ARN as provided on the `Context` passed to the function
846 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
847 // `/runtime/invocation/next` applicable).
848 //
849 // Type: string
850 // RequirementLevel: Optional
851 // Stability: experimental
852 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
853 // Note: This may be different from `cloud.resource_id` if an alias is
854 // involved.
855 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
856 )
857
858 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
859 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
860 // invoked ARN as provided on the `Context` passed to the function
861 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
862 // `/runtime/invocation/next` applicable).
863 func AWSLambdaInvokedARN(val string) attribute.KeyValue {
864 return AWSLambdaInvokedARNKey.String(val)
865 }
866
867 // Attributes for AWS S3.
868 const (
869 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
870 // semantic conventions. It represents the S3 bucket name the request
871 // refers to. Corresponds to the `--bucket` parameter of the [S3
872 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
873 // operations.
874 //
875 // Type: string
876 // RequirementLevel: Optional
877 // Stability: experimental
878 // Examples: 'some-bucket-name'
879 // Note: The `bucket` attribute is applicable to all S3 operations that
880 // reference a bucket, i.e. that require the bucket name as a mandatory
881 // parameter.
882 // This applies to almost all S3 operations except `list-buckets`.
883 AWSS3BucketKey = attribute.Key("aws.s3.bucket")
884
885 // AWSS3CopySourceKey is the attribute Key conforming to the
886 // "aws.s3.copy_source" semantic conventions. It represents the source
887 // object (in the form `bucket`/`key`) for the copy operation.
888 //
889 // Type: string
890 // RequirementLevel: Optional
891 // Stability: experimental
892 // Examples: 'someFile.yml'
893 // Note: The `copy_source` attribute applies to S3 copy operations and
894 // corresponds to the `--copy-source` parameter
895 // of the [copy-object operation within the S3
896 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
897 // This applies in particular to the following operations:
898 //
899 // -
900 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
901 // -
902 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
903 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
904
905 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
906 // semantic conventions. It represents the delete request container that
907 // specifies the objects to be deleted.
908 //
909 // Type: string
910 // RequirementLevel: Optional
911 // Stability: experimental
912 // Examples:
913 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
914 // Note: The `delete` attribute is only applicable to the
915 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
916 // operation.
917 // The `delete` attribute corresponds to the `--delete` parameter of the
918 // [delete-objects operation within the S3
919 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
920 AWSS3DeleteKey = attribute.Key("aws.s3.delete")
921
922 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
923 // conventions. It represents the S3 object key the request refers to.
924 // Corresponds to the `--key` parameter of the [S3
925 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
926 // operations.
927 //
928 // Type: string
929 // RequirementLevel: Optional
930 // Stability: experimental
931 // Examples: 'someFile.yml'
932 // Note: The `key` attribute is applicable to all object-related S3
933 // operations, i.e. that require the object key as a mandatory parameter.
934 // This applies in particular to the following operations:
935 //
936 // -
937 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
938 // -
939 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
940 // -
941 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
942 // -
943 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
944 // -
945 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
946 // -
947 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
948 // -
949 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
950 // -
951 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
952 // -
953 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
954 // -
955 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
956 // -
957 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
958 // -
959 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
960 // -
961 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
962 AWSS3KeyKey = attribute.Key("aws.s3.key")
963
964 // AWSS3PartNumberKey is the attribute Key conforming to the
965 // "aws.s3.part_number" semantic conventions. It represents the part number
966 // of the part being uploaded in a multipart-upload operation. This is a
967 // positive integer between 1 and 10,000.
968 //
969 // Type: int
970 // RequirementLevel: Optional
971 // Stability: experimental
972 // Examples: 3456
973 // Note: The `part_number` attribute is only applicable to the
974 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
975 // and
976 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
977 // operations.
978 // The `part_number` attribute corresponds to the `--part-number` parameter
979 // of the
980 // [upload-part operation within the S3
981 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
982 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
983
984 // AWSS3UploadIDKey is the attribute Key conforming to the
985 // "aws.s3.upload_id" semantic conventions. It represents the upload ID
986 // that identifies the multipart upload.
987 //
988 // Type: string
989 // RequirementLevel: Optional
990 // Stability: experimental
991 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
992 // Note: The `upload_id` attribute applies to S3 multipart-upload
993 // operations and corresponds to the `--upload-id` parameter
994 // of the [S3
995 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
996 // multipart operations.
997 // This applies in particular to the following operations:
998 //
999 // -
1000 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
1001 // -
1002 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
1003 // -
1004 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
1005 // -
1006 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
1007 // -
1008 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
1009 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
1010 )
1011
1012 // AWSS3Bucket returns an attribute KeyValue conforming to the
1013 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
1014 // request refers to. Corresponds to the `--bucket` parameter of the [S3
1015 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1016 // operations.
1017 func AWSS3Bucket(val string) attribute.KeyValue {
1018 return AWSS3BucketKey.String(val)
1019 }
1020
1021 // AWSS3CopySource returns an attribute KeyValue conforming to the
1022 // "aws.s3.copy_source" semantic conventions. It represents the source object
1023 // (in the form `bucket`/`key`) for the copy operation.
1024 func AWSS3CopySource(val string) attribute.KeyValue {
1025 return AWSS3CopySourceKey.String(val)
1026 }
1027
1028 // AWSS3Delete returns an attribute KeyValue conforming to the
1029 // "aws.s3.delete" semantic conventions. It represents the delete request
1030 // container that specifies the objects to be deleted.
1031 func AWSS3Delete(val string) attribute.KeyValue {
1032 return AWSS3DeleteKey.String(val)
1033 }
1034
1035 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
1036 // semantic conventions. It represents the S3 object key the request refers to.
1037 // Corresponds to the `--key` parameter of the [S3
1038 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
1039 // operations.
1040 func AWSS3Key(val string) attribute.KeyValue {
1041 return AWSS3KeyKey.String(val)
1042 }
1043
1044 // AWSS3PartNumber returns an attribute KeyValue conforming to the
1045 // "aws.s3.part_number" semantic conventions. It represents the part number of
1046 // the part being uploaded in a multipart-upload operation. This is a positive
1047 // integer between 1 and 10,000.
1048 func AWSS3PartNumber(val int) attribute.KeyValue {
1049 return AWSS3PartNumberKey.Int(val)
1050 }
1051
1052 // AWSS3UploadID returns an attribute KeyValue conforming to the
1053 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
1054 // identifies the multipart upload.
1055 func AWSS3UploadID(val string) attribute.KeyValue {
1056 return AWSS3UploadIDKey.String(val)
1057 }
1058
1059 // The web browser attributes
1060 const (
1061 // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
1062 // semantic conventions. It represents the array of brand name and version
1063 // separated by a space
1064 //
1065 // Type: string[]
1066 // RequirementLevel: Optional
1067 // Stability: experimental
1068 // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
1069 // Note: This value is intended to be taken from the [UA client hints
1070 // API](https://wicg.github.io/ua-client-hints/#interface)
1071 // (`navigator.userAgentData.brands`).
1072 BrowserBrandsKey = attribute.Key("browser.brands")
1073
1074 // BrowserLanguageKey is the attribute Key conforming to the
1075 // "browser.language" semantic conventions. It represents the preferred
1076 // language of the user using the browser
1077 //
1078 // Type: string
1079 // RequirementLevel: Optional
1080 // Stability: experimental
1081 // Examples: 'en', 'en-US', 'fr', 'fr-FR'
1082 // Note: This value is intended to be taken from the Navigator API
1083 // `navigator.language`.
1084 BrowserLanguageKey = attribute.Key("browser.language")
1085
1086 // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
1087 // semantic conventions. It represents a boolean that is true if the
1088 // browser is running on a mobile device
1089 //
1090 // Type: boolean
1091 // RequirementLevel: Optional
1092 // Stability: experimental
1093 // Note: This value is intended to be taken from the [UA client hints
1094 // API](https://wicg.github.io/ua-client-hints/#interface)
1095 // (`navigator.userAgentData.mobile`). If unavailable, this attribute
1096 // SHOULD be left unset.
1097 BrowserMobileKey = attribute.Key("browser.mobile")
1098
1099 // BrowserPlatformKey is the attribute Key conforming to the
1100 // "browser.platform" semantic conventions. It represents the platform on
1101 // which the browser is running
1102 //
1103 // Type: string
1104 // RequirementLevel: Optional
1105 // Stability: experimental
1106 // Examples: 'Windows', 'macOS', 'Android'
1107 // Note: This value is intended to be taken from the [UA client hints
1108 // API](https://wicg.github.io/ua-client-hints/#interface)
1109 // (`navigator.userAgentData.platform`). If unavailable, the legacy
1110 // `navigator.platform` API SHOULD NOT be used instead and this attribute
1111 // SHOULD be left unset in order for the values to be consistent.
1112 // The list of possible values is defined in the [W3C User-Agent Client
1113 // Hints
1114 // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
1115 // Note that some (but not all) of these values can overlap with values in
1116 // the [`os.type` and `os.name` attributes](./os.md). However, for
1117 // consistency, the values in the `browser.platform` attribute should
1118 // capture the exact value that the user agent provides.
1119 BrowserPlatformKey = attribute.Key("browser.platform")
1120 )
1121
1122 // BrowserBrands returns an attribute KeyValue conforming to the
1123 // "browser.brands" semantic conventions. It represents the array of brand name
1124 // and version separated by a space
1125 func BrowserBrands(val ...string) attribute.KeyValue {
1126 return BrowserBrandsKey.StringSlice(val)
1127 }
1128
1129 // BrowserLanguage returns an attribute KeyValue conforming to the
1130 // "browser.language" semantic conventions. It represents the preferred
1131 // language of the user using the browser
1132 func BrowserLanguage(val string) attribute.KeyValue {
1133 return BrowserLanguageKey.String(val)
1134 }
1135
1136 // BrowserMobile returns an attribute KeyValue conforming to the
1137 // "browser.mobile" semantic conventions. It represents a boolean that is true
1138 // if the browser is running on a mobile device
1139 func BrowserMobile(val bool) attribute.KeyValue {
1140 return BrowserMobileKey.Bool(val)
1141 }
1142
1143 // BrowserPlatform returns an attribute KeyValue conforming to the
1144 // "browser.platform" semantic conventions. It represents the platform on which
1145 // the browser is running
1146 func BrowserPlatform(val string) attribute.KeyValue {
1147 return BrowserPlatformKey.String(val)
1148 }
1149
1150 // These attributes may be used to describe the client in a connection-based
1151 // network interaction where there is one side that initiates the connection
1152 // (the client is the side that initiates the connection). This covers all TCP
1153 // network interactions since TCP is connection-based and one side initiates
1154 // the connection (an exception is made for peer-to-peer communication over TCP
1155 // where the "user-facing" surface of the protocol / API doesn't expose a clear
1156 // notion of client and server). This also covers UDP network interactions
1157 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
1158 const (
1159 // ClientAddressKey is the attribute Key conforming to the "client.address"
1160 // semantic conventions. It represents the client address - domain name if
1161 // available without reverse DNS lookup; otherwise, IP address or Unix
1162 // domain socket name.
1163 //
1164 // Type: string
1165 // RequirementLevel: Optional
1166 // Stability: stable
1167 // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
1168 // Note: When observed from the server side, and when communicating through
1169 // an intermediary, `client.address` SHOULD represent the client address
1170 // behind any intermediaries, for example proxies, if it's available.
1171 ClientAddressKey = attribute.Key("client.address")
1172
1173 // ClientPortKey is the attribute Key conforming to the "client.port"
1174 // semantic conventions. It represents the client port number.
1175 //
1176 // Type: int
1177 // RequirementLevel: Optional
1178 // Stability: stable
1179 // Examples: 65123
1180 // Note: When observed from the server side, and when communicating through
1181 // an intermediary, `client.port` SHOULD represent the client port behind
1182 // any intermediaries, for example proxies, if it's available.
1183 ClientPortKey = attribute.Key("client.port")
1184 )
1185
1186 // ClientAddress returns an attribute KeyValue conforming to the
1187 // "client.address" semantic conventions. It represents the client address -
1188 // domain name if available without reverse DNS lookup; otherwise, IP address
1189 // or Unix domain socket name.
1190 func ClientAddress(val string) attribute.KeyValue {
1191 return ClientAddressKey.String(val)
1192 }
1193
1194 // ClientPort returns an attribute KeyValue conforming to the "client.port"
1195 // semantic conventions. It represents the client port number.
1196 func ClientPort(val int) attribute.KeyValue {
1197 return ClientPortKey.Int(val)
1198 }
1199
1200 // A cloud environment (e.g. GCP, Azure, AWS).
1201 const (
1202 // CloudAccountIDKey is the attribute Key conforming to the
1203 // "cloud.account.id" semantic conventions. It represents the cloud account
1204 // ID the resource is assigned to.
1205 //
1206 // Type: string
1207 // RequirementLevel: Optional
1208 // Stability: experimental
1209 // Examples: '111111111111', 'opentelemetry'
1210 CloudAccountIDKey = attribute.Key("cloud.account.id")
1211
1212 // CloudAvailabilityZoneKey is the attribute Key conforming to the
1213 // "cloud.availability_zone" semantic conventions. It represents the cloud
1214 // regions often have multiple, isolated locations known as zones to
1215 // increase availability. Availability zone represents the zone where the
1216 // resource is running.
1217 //
1218 // Type: string
1219 // RequirementLevel: Optional
1220 // Stability: experimental
1221 // Examples: 'us-east-1c'
1222 // Note: Availability zones are called "zones" on Alibaba Cloud and Google
1223 // Cloud.
1224 CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
1225
1226 // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
1227 // semantic conventions. It represents the cloud platform in use.
1228 //
1229 // Type: Enum
1230 // RequirementLevel: Optional
1231 // Stability: experimental
1232 // Note: The prefix of the service SHOULD match the one specified in
1233 // `cloud.provider`.
1234 CloudPlatformKey = attribute.Key("cloud.platform")
1235
1236 // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
1237 // semantic conventions. It represents the name of the cloud provider.
1238 //
1239 // Type: Enum
1240 // RequirementLevel: Optional
1241 // Stability: experimental
1242 CloudProviderKey = attribute.Key("cloud.provider")
1243
1244 // CloudRegionKey is the attribute Key conforming to the "cloud.region"
1245 // semantic conventions. It represents the geographical region the resource
1246 // is running.
1247 //
1248 // Type: string
1249 // RequirementLevel: Optional
1250 // Stability: experimental
1251 // Examples: 'us-central1', 'us-east-1'
1252 // Note: Refer to your provider's docs to see the available regions, for
1253 // example [Alibaba Cloud
1254 // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
1255 // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
1256 // [Azure
1257 // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
1258 // [Google Cloud regions](https://cloud.google.com/about/locations), or
1259 // [Tencent Cloud
1260 // regions](https://www.tencentcloud.com/document/product/213/6091).
1261 CloudRegionKey = attribute.Key("cloud.region")
1262
1263 // CloudResourceIDKey is the attribute Key conforming to the
1264 // "cloud.resource_id" semantic conventions. It represents the cloud
1265 // provider-specific native identifier of the monitored cloud resource
1266 // (e.g. an
1267 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
1268 // on AWS, a [fully qualified resource
1269 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
1270 // on Azure, a [full resource
1271 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1272 // on GCP)
1273 //
1274 // Type: string
1275 // RequirementLevel: Optional
1276 // Stability: experimental
1277 // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
1278 // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
1279 // '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
1280 // Note: On some cloud providers, it may not be possible to determine the
1281 // full ID at startup,
1282 // so it may be necessary to set `cloud.resource_id` as a span attribute
1283 // instead.
1284 //
1285 // The exact value to use for `cloud.resource_id` depends on the cloud
1286 // provider.
1287 // The following well-known definitions MUST be used if you set this
1288 // attribute and they apply:
1289 //
1290 // * **AWS Lambda:** The function
1291 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
1292 // Take care not to use the "invoked ARN" directly but replace any
1293 // [alias
1294 // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
1295 // with the resolved function version, as the same runtime instance may
1296 // be invokable with
1297 // multiple different aliases.
1298 // * **GCP:** The [URI of the
1299 // resource](https://cloud.google.com/iam/docs/full-resource-names)
1300 // * **Azure:** The [Fully Qualified Resource
1301 // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
1302 // of the invoked function,
1303 // *not* the function app, having the form
1304 // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
1305 // This means that a span attribute MUST be used, as an Azure function
1306 // app can host multiple functions that would usually share
1307 // a TracerProvider.
1308 CloudResourceIDKey = attribute.Key("cloud.resource_id")
1309 )
1310
1311 var (
1312 // Alibaba Cloud Elastic Compute Service
1313 CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
1314 // Alibaba Cloud Function Compute
1315 CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
1316 // Red Hat OpenShift on Alibaba Cloud
1317 CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
1318 // AWS Elastic Compute Cloud
1319 CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
1320 // AWS Elastic Container Service
1321 CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
1322 // AWS Elastic Kubernetes Service
1323 CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
1324 // AWS Lambda
1325 CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
1326 // AWS Elastic Beanstalk
1327 CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
1328 // AWS App Runner
1329 CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
1330 // Red Hat OpenShift on AWS (ROSA)
1331 CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
1332 // Azure Virtual Machines
1333 CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
1334 // Azure Container Apps
1335 CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps")
1336 // Azure Container Instances
1337 CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
1338 // Azure Kubernetes Service
1339 CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
1340 // Azure Functions
1341 CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
1342 // Azure App Service
1343 CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
1344 // Azure Red Hat OpenShift
1345 CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
1346 // Google Bare Metal Solution (BMS)
1347 CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
1348 // Google Cloud Compute Engine (GCE)
1349 CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
1350 // Google Cloud Run
1351 CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
1352 // Google Cloud Kubernetes Engine (GKE)
1353 CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
1354 // Google Cloud Functions (GCF)
1355 CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
1356 // Google Cloud App Engine (GAE)
1357 CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
1358 // Red Hat OpenShift on Google Cloud
1359 CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
1360 // Red Hat OpenShift on IBM Cloud
1361 CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
1362 // Tencent Cloud Cloud Virtual Machine (CVM)
1363 CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
1364 // Tencent Cloud Elastic Kubernetes Service (EKS)
1365 CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
1366 // Tencent Cloud Serverless Cloud Function (SCF)
1367 CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
1368 )
1369
1370 var (
1371 // Alibaba Cloud
1372 CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
1373 // Amazon Web Services
1374 CloudProviderAWS = CloudProviderKey.String("aws")
1375 // Microsoft Azure
1376 CloudProviderAzure = CloudProviderKey.String("azure")
1377 // Google Cloud Platform
1378 CloudProviderGCP = CloudProviderKey.String("gcp")
1379 // Heroku Platform as a Service
1380 CloudProviderHeroku = CloudProviderKey.String("heroku")
1381 // IBM Cloud
1382 CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
1383 // Tencent Cloud
1384 CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
1385 )
1386
1387 // CloudAccountID returns an attribute KeyValue conforming to the
1388 // "cloud.account.id" semantic conventions. It represents the cloud account ID
1389 // the resource is assigned to.
1390 func CloudAccountID(val string) attribute.KeyValue {
1391 return CloudAccountIDKey.String(val)
1392 }
1393
1394 // CloudAvailabilityZone returns an attribute KeyValue conforming to the
1395 // "cloud.availability_zone" semantic conventions. It represents the cloud
1396 // regions often have multiple, isolated locations known as zones to increase
1397 // availability. Availability zone represents the zone where the resource is
1398 // running.
1399 func CloudAvailabilityZone(val string) attribute.KeyValue {
1400 return CloudAvailabilityZoneKey.String(val)
1401 }
1402
1403 // CloudRegion returns an attribute KeyValue conforming to the
1404 // "cloud.region" semantic conventions. It represents the geographical region
1405 // the resource is running.
1406 func CloudRegion(val string) attribute.KeyValue {
1407 return CloudRegionKey.String(val)
1408 }
1409
1410 // CloudResourceID returns an attribute KeyValue conforming to the
1411 // "cloud.resource_id" semantic conventions. It represents the cloud
1412 // provider-specific native identifier of the monitored cloud resource (e.g. an
1413 // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
1414 // on AWS, a [fully qualified resource
1415 // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
1416 // Azure, a [full resource
1417 // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1418 // on GCP)
1419 func CloudResourceID(val string) attribute.KeyValue {
1420 return CloudResourceIDKey.String(val)
1421 }
1422
1423 // Attributes for CloudEvents.
1424 const (
1425 // CloudeventsEventIDKey is the attribute Key conforming to the
1426 // "cloudevents.event_id" semantic conventions. It represents the
1427 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
1428 // uniquely identifies the event.
1429 //
1430 // Type: string
1431 // RequirementLevel: Optional
1432 // Stability: experimental
1433 // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
1434 CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
1435
1436 // CloudeventsEventSourceKey is the attribute Key conforming to the
1437 // "cloudevents.event_source" semantic conventions. It represents the
1438 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
1439 // identifies the context in which an event happened.
1440 //
1441 // Type: string
1442 // RequirementLevel: Optional
1443 // Stability: experimental
1444 // Examples: 'https://github.com/cloudevents',
1445 // '/cloudevents/spec/pull/123', 'my-service'
1446 CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
1447
1448 // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
1449 // "cloudevents.event_spec_version" semantic conventions. It represents the
1450 // [version of the CloudEvents
1451 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
1452 // which the event uses.
1453 //
1454 // Type: string
1455 // RequirementLevel: Optional
1456 // Stability: experimental
1457 // Examples: '1.0'
1458 CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
1459
1460 // CloudeventsEventSubjectKey is the attribute Key conforming to the
1461 // "cloudevents.event_subject" semantic conventions. It represents the
1462 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
1463 // of the event in the context of the event producer (identified by
1464 // source).
1465 //
1466 // Type: string
1467 // RequirementLevel: Optional
1468 // Stability: experimental
1469 // Examples: 'mynewfile.jpg'
1470 CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
1471
1472 // CloudeventsEventTypeKey is the attribute Key conforming to the
1473 // "cloudevents.event_type" semantic conventions. It represents the
1474 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
1475 // contains a value describing the type of event related to the originating
1476 // occurrence.
1477 //
1478 // Type: string
1479 // RequirementLevel: Optional
1480 // Stability: experimental
1481 // Examples: 'com.github.pull_request.opened',
1482 // 'com.example.object.deleted.v2'
1483 CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
1484 )
1485
1486 // CloudeventsEventID returns an attribute KeyValue conforming to the
1487 // "cloudevents.event_id" semantic conventions. It represents the
1488 // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
1489 // uniquely identifies the event.
1490 func CloudeventsEventID(val string) attribute.KeyValue {
1491 return CloudeventsEventIDKey.String(val)
1492 }
1493
1494 // CloudeventsEventSource returns an attribute KeyValue conforming to the
1495 // "cloudevents.event_source" semantic conventions. It represents the
1496 // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
1497 // identifies the context in which an event happened.
1498 func CloudeventsEventSource(val string) attribute.KeyValue {
1499 return CloudeventsEventSourceKey.String(val)
1500 }
1501
1502 // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
1503 // the "cloudevents.event_spec_version" semantic conventions. It represents the
1504 // [version of the CloudEvents
1505 // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
1506 // which the event uses.
1507 func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
1508 return CloudeventsEventSpecVersionKey.String(val)
1509 }
1510
1511 // CloudeventsEventSubject returns an attribute KeyValue conforming to the
1512 // "cloudevents.event_subject" semantic conventions. It represents the
1513 // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
1514 // of the event in the context of the event producer (identified by source).
1515 func CloudeventsEventSubject(val string) attribute.KeyValue {
1516 return CloudeventsEventSubjectKey.String(val)
1517 }
1518
1519 // CloudeventsEventType returns an attribute KeyValue conforming to the
1520 // "cloudevents.event_type" semantic conventions. It represents the
1521 // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
1522 // contains a value describing the type of event related to the originating
1523 // occurrence.
1524 func CloudeventsEventType(val string) attribute.KeyValue {
1525 return CloudeventsEventTypeKey.String(val)
1526 }
1527
1528 // These attributes allow to report this unit of code and therefore to provide
1529 // more context about the span.
1530 const (
1531 // CodeColumnKey is the attribute Key conforming to the "code.column"
1532 // semantic conventions. It represents the column number in `code.filepath`
1533 // best representing the operation. It SHOULD point within the code unit
1534 // named in `code.function`.
1535 //
1536 // Type: int
1537 // RequirementLevel: Optional
1538 // Stability: experimental
1539 // Examples: 16
1540 CodeColumnKey = attribute.Key("code.column")
1541
1542 // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
1543 // semantic conventions. It represents the source code file name that
1544 // identifies the code unit as uniquely as possible (preferably an absolute
1545 // file path).
1546 //
1547 // Type: string
1548 // RequirementLevel: Optional
1549 // Stability: experimental
1550 // Examples: '/usr/local/MyApplication/content_root/app/index.php'
1551 CodeFilepathKey = attribute.Key("code.filepath")
1552
1553 // CodeFunctionKey is the attribute Key conforming to the "code.function"
1554 // semantic conventions. It represents the method or function name, or
1555 // equivalent (usually rightmost part of the code unit's name).
1556 //
1557 // Type: string
1558 // RequirementLevel: Optional
1559 // Stability: experimental
1560 // Examples: 'serveRequest'
1561 CodeFunctionKey = attribute.Key("code.function")
1562
1563 // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
1564 // semantic conventions. It represents the line number in `code.filepath`
1565 // best representing the operation. It SHOULD point within the code unit
1566 // named in `code.function`.
1567 //
1568 // Type: int
1569 // RequirementLevel: Optional
1570 // Stability: experimental
1571 // Examples: 42
1572 CodeLineNumberKey = attribute.Key("code.lineno")
1573
1574 // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
1575 // semantic conventions. It represents the "namespace" within which
1576 // `code.function` is defined. Usually the qualified class or module name,
1577 // such that `code.namespace` + some separator + `code.function` form a
1578 // unique identifier for the code unit.
1579 //
1580 // Type: string
1581 // RequirementLevel: Optional
1582 // Stability: experimental
1583 // Examples: 'com.example.MyHTTPService'
1584 CodeNamespaceKey = attribute.Key("code.namespace")
1585
1586 // CodeStacktraceKey is the attribute Key conforming to the
1587 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
1588 // string in the natural representation for the language runtime. The
1589 // representation is to be determined and documented by each language SIG.
1590 //
1591 // Type: string
1592 // RequirementLevel: Optional
1593 // Stability: experimental
1594 // Examples: 'at
1595 // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
1596 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
1597 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
1598 CodeStacktraceKey = attribute.Key("code.stacktrace")
1599 )
1600
1601 // CodeColumn returns an attribute KeyValue conforming to the "code.column"
1602 // semantic conventions. It represents the column number in `code.filepath`
1603 // best representing the operation. It SHOULD point within the code unit named
1604 // in `code.function`.
1605 func CodeColumn(val int) attribute.KeyValue {
1606 return CodeColumnKey.Int(val)
1607 }
1608
1609 // CodeFilepath returns an attribute KeyValue conforming to the
1610 // "code.filepath" semantic conventions. It represents the source code file
1611 // name that identifies the code unit as uniquely as possible (preferably an
1612 // absolute file path).
1613 func CodeFilepath(val string) attribute.KeyValue {
1614 return CodeFilepathKey.String(val)
1615 }
1616
1617 // CodeFunction returns an attribute KeyValue conforming to the
1618 // "code.function" semantic conventions. It represents the method or function
1619 // name, or equivalent (usually rightmost part of the code unit's name).
1620 func CodeFunction(val string) attribute.KeyValue {
1621 return CodeFunctionKey.String(val)
1622 }
1623
1624 // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
1625 // semantic conventions. It represents the line number in `code.filepath` best
1626 // representing the operation. It SHOULD point within the code unit named in
1627 // `code.function`.
1628 func CodeLineNumber(val int) attribute.KeyValue {
1629 return CodeLineNumberKey.Int(val)
1630 }
1631
1632 // CodeNamespace returns an attribute KeyValue conforming to the
1633 // "code.namespace" semantic conventions. It represents the "namespace" within
1634 // which `code.function` is defined. Usually the qualified class or module
1635 // name, such that `code.namespace` + some separator + `code.function` form a
1636 // unique identifier for the code unit.
1637 func CodeNamespace(val string) attribute.KeyValue {
1638 return CodeNamespaceKey.String(val)
1639 }
1640
1641 // CodeStacktrace returns an attribute KeyValue conforming to the
1642 // "code.stacktrace" semantic conventions. It represents a stacktrace as a
1643 // string in the natural representation for the language runtime. The
1644 // representation is to be determined and documented by each language SIG.
1645 func CodeStacktrace(val string) attribute.KeyValue {
1646 return CodeStacktraceKey.String(val)
1647 }
1648
1649 // A container instance.
1650 const (
1651 // ContainerCommandKey is the attribute Key conforming to the
1652 // "container.command" semantic conventions. It represents the command used
1653 // to run the container (i.e. the command name).
1654 //
1655 // Type: string
1656 // RequirementLevel: Optional
1657 // Stability: experimental
1658 // Examples: 'otelcontribcol'
1659 // Note: If using embedded credentials or sensitive data, it is recommended
1660 // to remove them to prevent potential leakage.
1661 ContainerCommandKey = attribute.Key("container.command")
1662
1663 // ContainerCommandArgsKey is the attribute Key conforming to the
1664 // "container.command_args" semantic conventions. It represents the all the
1665 // command arguments (including the command/executable itself) run by the
1666 // container. [2]
1667 //
1668 // Type: string[]
1669 // RequirementLevel: Optional
1670 // Stability: experimental
1671 // Examples: 'otelcontribcol, --config, config.yaml'
1672 ContainerCommandArgsKey = attribute.Key("container.command_args")
1673
1674 // ContainerCommandLineKey is the attribute Key conforming to the
1675 // "container.command_line" semantic conventions. It represents the full
1676 // command run by the container as a single string representing the full
1677 // command. [2]
1678 //
1679 // Type: string
1680 // RequirementLevel: Optional
1681 // Stability: experimental
1682 // Examples: 'otelcontribcol --config config.yaml'
1683 ContainerCommandLineKey = attribute.Key("container.command_line")
1684
1685 // ContainerCPUStateKey is the attribute Key conforming to the
1686 // "container.cpu.state" semantic conventions. It represents the CPU state
1687 // for this data point.
1688 //
1689 // Type: Enum
1690 // RequirementLevel: Optional
1691 // Stability: experimental
1692 // Examples: 'user', 'kernel'
1693 ContainerCPUStateKey = attribute.Key("container.cpu.state")
1694
1695 // ContainerIDKey is the attribute Key conforming to the "container.id"
1696 // semantic conventions. It represents the container ID. Usually a UUID, as
1697 // for example used to [identify Docker
1698 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1699 // The UUID might be abbreviated.
1700 //
1701 // Type: string
1702 // RequirementLevel: Optional
1703 // Stability: experimental
1704 // Examples: 'a3bf90e006b2'
1705 ContainerIDKey = attribute.Key("container.id")
1706
1707 // ContainerImageIDKey is the attribute Key conforming to the
1708 // "container.image.id" semantic conventions. It represents the runtime
1709 // specific image identifier. Usually a hash algorithm followed by a UUID.
1710 //
1711 // Type: string
1712 // RequirementLevel: Optional
1713 // Stability: experimental
1714 // Examples:
1715 // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
1716 // Note: Docker defines a sha256 of the image id; `container.image.id`
1717 // corresponds to the `Image` field from the Docker container inspect
1718 // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
1719 // endpoint.
1720 // K8S defines a link to the container registry repository with digest
1721 // `"imageID": "registry.azurecr.io
1722 // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
1723 // The ID is assigned by the container runtime and can vary in different
1724 // environments. Consider using `oci.manifest.digest` if it is important to
1725 // identify the same image in different environments/runtimes.
1726 ContainerImageIDKey = attribute.Key("container.image.id")
1727
1728 // ContainerImageNameKey is the attribute Key conforming to the
1729 // "container.image.name" semantic conventions. It represents the name of
1730 // the image the container was built on.
1731 //
1732 // Type: string
1733 // RequirementLevel: Optional
1734 // Stability: experimental
1735 // Examples: 'gcr.io/opentelemetry/operator'
1736 ContainerImageNameKey = attribute.Key("container.image.name")
1737
1738 // ContainerImageRepoDigestsKey is the attribute Key conforming to the
1739 // "container.image.repo_digests" semantic conventions. It represents the
1740 // repo digests of the container image as provided by the container
1741 // runtime.
1742 //
1743 // Type: string[]
1744 // RequirementLevel: Optional
1745 // Stability: experimental
1746 // Examples:
1747 // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
1748 // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
1749 // Note:
1750 // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
1751 // and
1752 // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
1753 // report those under the `RepoDigests` field.
1754 ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
1755
1756 // ContainerImageTagsKey is the attribute Key conforming to the
1757 // "container.image.tags" semantic conventions. It represents the container
1758 // image tags. An example can be found in [Docker Image
1759 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1760 // Should be only the `<tag>` section of the full name for example from
1761 // `registry.example.com/my-org/my-image:<tag>`.
1762 //
1763 // Type: string[]
1764 // RequirementLevel: Optional
1765 // Stability: experimental
1766 // Examples: 'v1.27.1', '3.5.7-0'
1767 ContainerImageTagsKey = attribute.Key("container.image.tags")
1768
1769 // ContainerNameKey is the attribute Key conforming to the "container.name"
1770 // semantic conventions. It represents the container name used by container
1771 // runtime.
1772 //
1773 // Type: string
1774 // RequirementLevel: Optional
1775 // Stability: experimental
1776 // Examples: 'opentelemetry-autoconf'
1777 ContainerNameKey = attribute.Key("container.name")
1778
1779 // ContainerRuntimeKey is the attribute Key conforming to the
1780 // "container.runtime" semantic conventions. It represents the container
1781 // runtime managing this container.
1782 //
1783 // Type: string
1784 // RequirementLevel: Optional
1785 // Stability: experimental
1786 // Examples: 'docker', 'containerd', 'rkt'
1787 ContainerRuntimeKey = attribute.Key("container.runtime")
1788 )
1789
1790 var (
1791 // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)
1792 ContainerCPUStateUser = ContainerCPUStateKey.String("user")
1793 // When CPU is used by the system (host OS)
1794 ContainerCPUStateSystem = ContainerCPUStateKey.String("system")
1795 // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)
1796 ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel")
1797 )
1798
1799 // ContainerCommand returns an attribute KeyValue conforming to the
1800 // "container.command" semantic conventions. It represents the command used to
1801 // run the container (i.e. the command name).
1802 func ContainerCommand(val string) attribute.KeyValue {
1803 return ContainerCommandKey.String(val)
1804 }
1805
1806 // ContainerCommandArgs returns an attribute KeyValue conforming to the
1807 // "container.command_args" semantic conventions. It represents the all the
1808 // command arguments (including the command/executable itself) run by the
1809 // container. [2]
1810 func ContainerCommandArgs(val ...string) attribute.KeyValue {
1811 return ContainerCommandArgsKey.StringSlice(val)
1812 }
1813
1814 // ContainerCommandLine returns an attribute KeyValue conforming to the
1815 // "container.command_line" semantic conventions. It represents the full
1816 // command run by the container as a single string representing the full
1817 // command. [2]
1818 func ContainerCommandLine(val string) attribute.KeyValue {
1819 return ContainerCommandLineKey.String(val)
1820 }
1821
1822 // ContainerID returns an attribute KeyValue conforming to the
1823 // "container.id" semantic conventions. It represents the container ID. Usually
1824 // a UUID, as for example used to [identify Docker
1825 // containers](https://docs.docker.com/engine/reference/run/#container-identification).
1826 // The UUID might be abbreviated.
1827 func ContainerID(val string) attribute.KeyValue {
1828 return ContainerIDKey.String(val)
1829 }
1830
1831 // ContainerImageID returns an attribute KeyValue conforming to the
1832 // "container.image.id" semantic conventions. It represents the runtime
1833 // specific image identifier. Usually a hash algorithm followed by a UUID.
1834 func ContainerImageID(val string) attribute.KeyValue {
1835 return ContainerImageIDKey.String(val)
1836 }
1837
1838 // ContainerImageName returns an attribute KeyValue conforming to the
1839 // "container.image.name" semantic conventions. It represents the name of the
1840 // image the container was built on.
1841 func ContainerImageName(val string) attribute.KeyValue {
1842 return ContainerImageNameKey.String(val)
1843 }
1844
1845 // ContainerImageRepoDigests returns an attribute KeyValue conforming to the
1846 // "container.image.repo_digests" semantic conventions. It represents the repo
1847 // digests of the container image as provided by the container runtime.
1848 func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
1849 return ContainerImageRepoDigestsKey.StringSlice(val)
1850 }
1851
1852 // ContainerImageTags returns an attribute KeyValue conforming to the
1853 // "container.image.tags" semantic conventions. It represents the container
1854 // image tags. An example can be found in [Docker Image
1855 // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
1856 // Should be only the `<tag>` section of the full name for example from
1857 // `registry.example.com/my-org/my-image:<tag>`.
1858 func ContainerImageTags(val ...string) attribute.KeyValue {
1859 return ContainerImageTagsKey.StringSlice(val)
1860 }
1861
1862 // ContainerName returns an attribute KeyValue conforming to the
1863 // "container.name" semantic conventions. It represents the container name used
1864 // by container runtime.
1865 func ContainerName(val string) attribute.KeyValue {
1866 return ContainerNameKey.String(val)
1867 }
1868
1869 // ContainerRuntime returns an attribute KeyValue conforming to the
1870 // "container.runtime" semantic conventions. It represents the container
1871 // runtime managing this container.
1872 func ContainerRuntime(val string) attribute.KeyValue {
1873 return ContainerRuntimeKey.String(val)
1874 }
1875
1876 // This group defines the attributes used to describe telemetry in the context
1877 // of databases.
1878 const (
1879 // DBClientConnectionsPoolNameKey is the attribute Key conforming to the
1880 // "db.client.connections.pool.name" semantic conventions. It represents
1881 // the name of the connection pool; unique within the instrumented
1882 // application. In case the connection pool implementation doesn't provide
1883 // a name, instrumentation should use a combination of `server.address` and
1884 // `server.port` attributes formatted as `server.address:server.port`.
1885 //
1886 // Type: string
1887 // RequirementLevel: Optional
1888 // Stability: experimental
1889 // Examples: 'myDataSource'
1890 DBClientConnectionsPoolNameKey = attribute.Key("db.client.connections.pool.name")
1891
1892 // DBClientConnectionsStateKey is the attribute Key conforming to the
1893 // "db.client.connections.state" semantic conventions. It represents the
1894 // state of a connection in the pool
1895 //
1896 // Type: Enum
1897 // RequirementLevel: Optional
1898 // Stability: experimental
1899 // Examples: 'idle'
1900 DBClientConnectionsStateKey = attribute.Key("db.client.connections.state")
1901
1902 // DBCollectionNameKey is the attribute Key conforming to the
1903 // "db.collection.name" semantic conventions. It represents the name of a
1904 // collection (table, container) within the database.
1905 //
1906 // Type: string
1907 // RequirementLevel: Optional
1908 // Stability: experimental
1909 // Examples: 'public.users', 'customers'
1910 // Note: If the collection name is parsed from the query, it SHOULD match
1911 // the value provided in the query and may be qualified with the schema and
1912 // database name.
1913 // It is RECOMMENDED to capture the value as provided by the application
1914 // without attempting to do any case normalization.
1915 DBCollectionNameKey = attribute.Key("db.collection.name")
1916
1917 // DBNamespaceKey is the attribute Key conforming to the "db.namespace"
1918 // semantic conventions. It represents the name of the database, fully
1919 // qualified within the server address and port.
1920 //
1921 // Type: string
1922 // RequirementLevel: Optional
1923 // Stability: experimental
1924 // Examples: 'customers', 'test.users'
1925 // Note: If a database system has multiple namespace components, they
1926 // SHOULD be concatenated (potentially using database system specific
1927 // conventions) from most general to most specific namespace component, and
1928 // more specific namespaces SHOULD NOT be captured without the more general
1929 // namespaces, to ensure that "startswith" queries for the more general
1930 // namespaces will be valid.
1931 // Semantic conventions for individual database systems SHOULD document
1932 // what `db.namespace` means in the context of that system.
1933 // It is RECOMMENDED to capture the value as provided by the application
1934 // without attempting to do any case normalization.
1935 DBNamespaceKey = attribute.Key("db.namespace")
1936
1937 // DBOperationNameKey is the attribute Key conforming to the
1938 // "db.operation.name" semantic conventions. It represents the name of the
1939 // operation or command being executed.
1940 //
1941 // Type: string
1942 // RequirementLevel: Optional
1943 // Stability: experimental
1944 // Examples: 'findAndModify', 'HMSET', 'SELECT'
1945 // Note: It is RECOMMENDED to capture the value as provided by the
1946 // application without attempting to do any case normalization.
1947 DBOperationNameKey = attribute.Key("db.operation.name")
1948
1949 // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
1950 // semantic conventions. It represents the database query being executed.
1951 //
1952 // Type: string
1953 // RequirementLevel: Optional
1954 // Stability: experimental
1955 // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey
1956 // "WuValue"'
1957 DBQueryTextKey = attribute.Key("db.query.text")
1958
1959 // DBSystemKey is the attribute Key conforming to the "db.system" semantic
1960 // conventions. It represents the database management system (DBMS) product
1961 // as identified by the client instrumentation.
1962 //
1963 // Type: Enum
1964 // RequirementLevel: Optional
1965 // Stability: experimental
1966 // Note: The actual DBMS may differ from the one identified by the client.
1967 // For example, when using PostgreSQL client libraries to connect to a
1968 // CockroachDB, the `db.system` is set to `postgresql` based on the
1969 // instrumentation's best knowledge.
1970 DBSystemKey = attribute.Key("db.system")
1971 )
1972
1973 var (
1974 // idle
1975 DBClientConnectionsStateIdle = DBClientConnectionsStateKey.String("idle")
1976 // used
1977 DBClientConnectionsStateUsed = DBClientConnectionsStateKey.String("used")
1978 )
1979
1980 var (
1981 // Some other SQL database. Fallback only. See notes
1982 DBSystemOtherSQL = DBSystemKey.String("other_sql")
1983 // Microsoft SQL Server
1984 DBSystemMSSQL = DBSystemKey.String("mssql")
1985 // Microsoft SQL Server Compact
1986 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
1987 // MySQL
1988 DBSystemMySQL = DBSystemKey.String("mysql")
1989 // Oracle Database
1990 DBSystemOracle = DBSystemKey.String("oracle")
1991 // IBM DB2
1992 DBSystemDB2 = DBSystemKey.String("db2")
1993 // PostgreSQL
1994 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
1995 // Amazon Redshift
1996 DBSystemRedshift = DBSystemKey.String("redshift")
1997 // Apache Hive
1998 DBSystemHive = DBSystemKey.String("hive")
1999 // Cloudscape
2000 DBSystemCloudscape = DBSystemKey.String("cloudscape")
2001 // HyperSQL DataBase
2002 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
2003 // Progress Database
2004 DBSystemProgress = DBSystemKey.String("progress")
2005 // SAP MaxDB
2006 DBSystemMaxDB = DBSystemKey.String("maxdb")
2007 // SAP HANA
2008 DBSystemHanaDB = DBSystemKey.String("hanadb")
2009 // Ingres
2010 DBSystemIngres = DBSystemKey.String("ingres")
2011 // FirstSQL
2012 DBSystemFirstSQL = DBSystemKey.String("firstsql")
2013 // EnterpriseDB
2014 DBSystemEDB = DBSystemKey.String("edb")
2015 // InterSystems Caché
2016 DBSystemCache = DBSystemKey.String("cache")
2017 // Adabas (Adaptable Database System)
2018 DBSystemAdabas = DBSystemKey.String("adabas")
2019 // Firebird
2020 DBSystemFirebird = DBSystemKey.String("firebird")
2021 // Apache Derby
2022 DBSystemDerby = DBSystemKey.String("derby")
2023 // FileMaker
2024 DBSystemFilemaker = DBSystemKey.String("filemaker")
2025 // Informix
2026 DBSystemInformix = DBSystemKey.String("informix")
2027 // InstantDB
2028 DBSystemInstantDB = DBSystemKey.String("instantdb")
2029 // InterBase
2030 DBSystemInterbase = DBSystemKey.String("interbase")
2031 // MariaDB
2032 DBSystemMariaDB = DBSystemKey.String("mariadb")
2033 // Netezza
2034 DBSystemNetezza = DBSystemKey.String("netezza")
2035 // Pervasive PSQL
2036 DBSystemPervasive = DBSystemKey.String("pervasive")
2037 // PointBase
2038 DBSystemPointbase = DBSystemKey.String("pointbase")
2039 // SQLite
2040 DBSystemSqlite = DBSystemKey.String("sqlite")
2041 // Sybase
2042 DBSystemSybase = DBSystemKey.String("sybase")
2043 // Teradata
2044 DBSystemTeradata = DBSystemKey.String("teradata")
2045 // Vertica
2046 DBSystemVertica = DBSystemKey.String("vertica")
2047 // H2
2048 DBSystemH2 = DBSystemKey.String("h2")
2049 // ColdFusion IMQ
2050 DBSystemColdfusion = DBSystemKey.String("coldfusion")
2051 // Apache Cassandra
2052 DBSystemCassandra = DBSystemKey.String("cassandra")
2053 // Apache HBase
2054 DBSystemHBase = DBSystemKey.String("hbase")
2055 // MongoDB
2056 DBSystemMongoDB = DBSystemKey.String("mongodb")
2057 // Redis
2058 DBSystemRedis = DBSystemKey.String("redis")
2059 // Couchbase
2060 DBSystemCouchbase = DBSystemKey.String("couchbase")
2061 // CouchDB
2062 DBSystemCouchDB = DBSystemKey.String("couchdb")
2063 // Microsoft Azure Cosmos DB
2064 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
2065 // Amazon DynamoDB
2066 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
2067 // Neo4j
2068 DBSystemNeo4j = DBSystemKey.String("neo4j")
2069 // Apache Geode
2070 DBSystemGeode = DBSystemKey.String("geode")
2071 // Elasticsearch
2072 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
2073 // Memcached
2074 DBSystemMemcached = DBSystemKey.String("memcached")
2075 // CockroachDB
2076 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
2077 // OpenSearch
2078 DBSystemOpensearch = DBSystemKey.String("opensearch")
2079 // ClickHouse
2080 DBSystemClickhouse = DBSystemKey.String("clickhouse")
2081 // Cloud Spanner
2082 DBSystemSpanner = DBSystemKey.String("spanner")
2083 // Trino
2084 DBSystemTrino = DBSystemKey.String("trino")
2085 )
2086
2087 // DBClientConnectionsPoolName returns an attribute KeyValue conforming to
2088 // the "db.client.connections.pool.name" semantic conventions. It represents
2089 // the name of the connection pool; unique within the instrumented application.
2090 // In case the connection pool implementation doesn't provide a name,
2091 // instrumentation should use a combination of `server.address` and
2092 // `server.port` attributes formatted as `server.address:server.port`.
2093 func DBClientConnectionsPoolName(val string) attribute.KeyValue {
2094 return DBClientConnectionsPoolNameKey.String(val)
2095 }
2096
2097 // DBCollectionName returns an attribute KeyValue conforming to the
2098 // "db.collection.name" semantic conventions. It represents the name of a
2099 // collection (table, container) within the database.
2100 func DBCollectionName(val string) attribute.KeyValue {
2101 return DBCollectionNameKey.String(val)
2102 }
2103
2104 // DBNamespace returns an attribute KeyValue conforming to the
2105 // "db.namespace" semantic conventions. It represents the name of the database,
2106 // fully qualified within the server address and port.
2107 func DBNamespace(val string) attribute.KeyValue {
2108 return DBNamespaceKey.String(val)
2109 }
2110
2111 // DBOperationName returns an attribute KeyValue conforming to the
2112 // "db.operation.name" semantic conventions. It represents the name of the
2113 // operation or command being executed.
2114 func DBOperationName(val string) attribute.KeyValue {
2115 return DBOperationNameKey.String(val)
2116 }
2117
2118 // DBQueryText returns an attribute KeyValue conforming to the
2119 // "db.query.text" semantic conventions. It represents the database query being
2120 // executed.
2121 func DBQueryText(val string) attribute.KeyValue {
2122 return DBQueryTextKey.String(val)
2123 }
2124
2125 // This group defines attributes for Cassandra.
2126 const (
2127 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
2128 // "db.cassandra.consistency_level" semantic conventions. It represents the
2129 // consistency level of the query. Based on consistency values from
2130 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
2131 //
2132 // Type: Enum
2133 // RequirementLevel: Optional
2134 // Stability: experimental
2135 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
2136
2137 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
2138 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
2139 // data center of the coordinating node for a query.
2140 //
2141 // Type: string
2142 // RequirementLevel: Optional
2143 // Stability: experimental
2144 // Examples: 'us-west-2'
2145 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
2146
2147 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
2148 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
2149 // of the coordinating node for a query.
2150 //
2151 // Type: string
2152 // RequirementLevel: Optional
2153 // Stability: experimental
2154 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
2155 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
2156
2157 // DBCassandraIdempotenceKey is the attribute Key conforming to the
2158 // "db.cassandra.idempotence" semantic conventions. It represents the
2159 // whether or not the query is idempotent.
2160 //
2161 // Type: boolean
2162 // RequirementLevel: Optional
2163 // Stability: experimental
2164 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
2165
2166 // DBCassandraPageSizeKey is the attribute Key conforming to the
2167 // "db.cassandra.page_size" semantic conventions. It represents the fetch
2168 // size used for paging, i.e. how many rows will be returned at once.
2169 //
2170 // Type: int
2171 // RequirementLevel: Optional
2172 // Stability: experimental
2173 // Examples: 5000
2174 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
2175
2176 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
2177 // to the "db.cassandra.speculative_execution_count" semantic conventions.
2178 // It represents the number of times a query was speculatively executed.
2179 // Not set or `0` if the query was not executed speculatively.
2180 //
2181 // Type: int
2182 // RequirementLevel: Optional
2183 // Stability: experimental
2184 // Examples: 0, 2
2185 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
2186 )
2187
2188 var (
2189 // all
2190 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
2191 // each_quorum
2192 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
2193 // quorum
2194 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
2195 // local_quorum
2196 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
2197 // one
2198 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
2199 // two
2200 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
2201 // three
2202 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
2203 // local_one
2204 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
2205 // any
2206 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
2207 // serial
2208 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
2209 // local_serial
2210 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
2211 )
2212
2213 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
2214 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
2215 // center of the coordinating node for a query.
2216 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
2217 return DBCassandraCoordinatorDCKey.String(val)
2218 }
2219
2220 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
2221 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
2222 // the coordinating node for a query.
2223 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
2224 return DBCassandraCoordinatorIDKey.String(val)
2225 }
2226
2227 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
2228 // "db.cassandra.idempotence" semantic conventions. It represents the whether
2229 // or not the query is idempotent.
2230 func DBCassandraIdempotence(val bool) attribute.KeyValue {
2231 return DBCassandraIdempotenceKey.Bool(val)
2232 }
2233
2234 // DBCassandraPageSize returns an attribute KeyValue conforming to the
2235 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
2236 // used for paging, i.e. how many rows will be returned at once.
2237 func DBCassandraPageSize(val int) attribute.KeyValue {
2238 return DBCassandraPageSizeKey.Int(val)
2239 }
2240
2241 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
2242 // conforming to the "db.cassandra.speculative_execution_count" semantic
2243 // conventions. It represents the number of times a query was speculatively
2244 // executed. Not set or `0` if the query was not executed speculatively.
2245 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
2246 return DBCassandraSpeculativeExecutionCountKey.Int(val)
2247 }
2248
2249 // This group defines attributes for Azure Cosmos DB.
2250 const (
2251 // DBCosmosDBClientIDKey is the attribute Key conforming to the
2252 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
2253 // Cosmos client instance id.
2254 //
2255 // Type: string
2256 // RequirementLevel: Optional
2257 // Stability: experimental
2258 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
2259 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
2260
2261 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
2262 // "db.cosmosdb.connection_mode" semantic conventions. It represents the
2263 // cosmos client connection mode.
2264 //
2265 // Type: Enum
2266 // RequirementLevel: Optional
2267 // Stability: experimental
2268 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
2269
2270 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
2271 // "db.cosmosdb.operation_type" semantic conventions. It represents the
2272 // cosmosDB Operation Type.
2273 //
2274 // Type: Enum
2275 // RequirementLevel: Optional
2276 // Stability: experimental
2277 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
2278
2279 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
2280 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
2281 // consumed for that operation
2282 //
2283 // Type: double
2284 // RequirementLevel: Optional
2285 // Stability: experimental
2286 // Examples: 46.18, 1.0
2287 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
2288
2289 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
2290 // "db.cosmosdb.request_content_length" semantic conventions. It represents
2291 // the request payload size in bytes
2292 //
2293 // Type: int
2294 // RequirementLevel: Optional
2295 // Stability: experimental
2296 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
2297
2298 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
2299 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
2300 // DB status code.
2301 //
2302 // Type: int
2303 // RequirementLevel: Optional
2304 // Stability: experimental
2305 // Examples: 200, 201
2306 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
2307
2308 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
2309 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
2310 // cosmos DB sub status code.
2311 //
2312 // Type: int
2313 // RequirementLevel: Optional
2314 // Stability: experimental
2315 // Examples: 1000, 1002
2316 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
2317 )
2318
2319 var (
2320 // Gateway (HTTP) connections mode
2321 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
2322 // Direct connection
2323 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
2324 )
2325
2326 var (
2327 // invalid
2328 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
2329 // create
2330 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
2331 // patch
2332 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
2333 // read
2334 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
2335 // read_feed
2336 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
2337 // delete
2338 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
2339 // replace
2340 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
2341 // execute
2342 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
2343 // query
2344 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
2345 // head
2346 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
2347 // head_feed
2348 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
2349 // upsert
2350 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
2351 // batch
2352 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
2353 // query_plan
2354 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
2355 // execute_javascript
2356 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
2357 )
2358
2359 // DBCosmosDBClientID returns an attribute KeyValue conforming to the
2360 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
2361 // Cosmos client instance id.
2362 func DBCosmosDBClientID(val string) attribute.KeyValue {
2363 return DBCosmosDBClientIDKey.String(val)
2364 }
2365
2366 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
2367 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
2368 // consumed for that operation
2369 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
2370 return DBCosmosDBRequestChargeKey.Float64(val)
2371 }
2372
2373 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
2374 // to the "db.cosmosdb.request_content_length" semantic conventions. It
2375 // represents the request payload size in bytes
2376 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
2377 return DBCosmosDBRequestContentLengthKey.Int(val)
2378 }
2379
2380 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
2381 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
2382 // status code.
2383 func DBCosmosDBStatusCode(val int) attribute.KeyValue {
2384 return DBCosmosDBStatusCodeKey.Int(val)
2385 }
2386
2387 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
2388 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
2389 // DB sub status code.
2390 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
2391 return DBCosmosDBSubStatusCodeKey.Int(val)
2392 }
2393
2394 // This group defines attributes for Elasticsearch.
2395 const (
2396 // DBElasticsearchClusterNameKey is the attribute Key conforming to the
2397 // "db.elasticsearch.cluster.name" semantic conventions. It represents the
2398 // represents the identifier of an Elasticsearch cluster.
2399 //
2400 // Type: string
2401 // RequirementLevel: Optional
2402 // Stability: experimental
2403 // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
2404 DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
2405
2406 // DBElasticsearchNodeNameKey is the attribute Key conforming to the
2407 // "db.elasticsearch.node.name" semantic conventions. It represents the
2408 // represents the human-readable identifier of the node/instance to which a
2409 // request was routed.
2410 //
2411 // Type: string
2412 // RequirementLevel: Optional
2413 // Stability: experimental
2414 // Examples: 'instance-0000000001'
2415 DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
2416 )
2417
2418 // DBElasticsearchClusterName returns an attribute KeyValue conforming to
2419 // the "db.elasticsearch.cluster.name" semantic conventions. It represents the
2420 // represents the identifier of an Elasticsearch cluster.
2421 func DBElasticsearchClusterName(val string) attribute.KeyValue {
2422 return DBElasticsearchClusterNameKey.String(val)
2423 }
2424
2425 // DBElasticsearchNodeName returns an attribute KeyValue conforming to the
2426 // "db.elasticsearch.node.name" semantic conventions. It represents the
2427 // represents the human-readable identifier of the node/instance to which a
2428 // request was routed.
2429 func DBElasticsearchNodeName(val string) attribute.KeyValue {
2430 return DBElasticsearchNodeNameKey.String(val)
2431 }
2432
2433 // Attributes for software deployments.
2434 const (
2435 // DeploymentEnvironmentKey is the attribute Key conforming to the
2436 // "deployment.environment" semantic conventions. It represents the name of
2437 // the [deployment
2438 // environment](https://wikipedia.org/wiki/Deployment_environment) (aka
2439 // deployment tier).
2440 //
2441 // Type: string
2442 // RequirementLevel: Optional
2443 // Stability: experimental
2444 // Examples: 'staging', 'production'
2445 // Note: `deployment.environment` does not affect the uniqueness
2446 // constraints defined through
2447 // the `service.namespace`, `service.name` and `service.instance.id`
2448 // resource attributes.
2449 // This implies that resources carrying the following attribute
2450 // combinations MUST be
2451 // considered to be identifying the same service:
2452 //
2453 // * `service.name=frontend`, `deployment.environment=production`
2454 // * `service.name=frontend`, `deployment.environment=staging`.
2455 DeploymentEnvironmentKey = attribute.Key("deployment.environment")
2456 )
2457
2458 // DeploymentEnvironment returns an attribute KeyValue conforming to the
2459 // "deployment.environment" semantic conventions. It represents the name of the
2460 // [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
2461 // (aka deployment tier).
2462 func DeploymentEnvironment(val string) attribute.KeyValue {
2463 return DeploymentEnvironmentKey.String(val)
2464 }
2465
2466 // Attributes that represents an occurrence of a lifecycle transition on the
2467 // Android platform.
2468 const (
2469 // AndroidStateKey is the attribute Key conforming to the "android.state"
2470 // semantic conventions. It represents the deprecated use the
2471 // `device.app.lifecycle` event definition including `android.state` as a
2472 // payload field instead.
2473 //
2474 // Type: Enum
2475 // RequirementLevel: Optional
2476 // Stability: experimental
2477 // Note: The Android lifecycle states are defined in [Activity lifecycle
2478 // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
2479 // and from which the `OS identifiers` are derived.
2480 AndroidStateKey = attribute.Key("android.state")
2481 )
2482
2483 var (
2484 // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
2485 AndroidStateCreated = AndroidStateKey.String("created")
2486 // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
2487 AndroidStateBackground = AndroidStateKey.String("background")
2488 // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
2489 AndroidStateForeground = AndroidStateKey.String("foreground")
2490 )
2491
2492 // These attributes may be used to describe the receiver of a network
2493 // exchange/packet. These should be used when there is no client/server
2494 // relationship between the two sides, or when that relationship is unknown.
2495 // This covers low-level network interactions (e.g. packet tracing) where you
2496 // don't know if there was a connection or which side initiated it. This also
2497 // covers unidirectional UDP flows and peer-to-peer communication where the
2498 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
2499 // client and server.
2500 const (
2501 // DestinationAddressKey is the attribute Key conforming to the
2502 // "destination.address" semantic conventions. It represents the
2503 // destination address - domain name if available without reverse DNS
2504 // lookup; otherwise, IP address or Unix domain socket name.
2505 //
2506 // Type: string
2507 // RequirementLevel: Optional
2508 // Stability: experimental
2509 // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
2510 // Note: When observed from the source side, and when communicating through
2511 // an intermediary, `destination.address` SHOULD represent the destination
2512 // address behind any intermediaries, for example proxies, if it's
2513 // available.
2514 DestinationAddressKey = attribute.Key("destination.address")
2515
2516 // DestinationPortKey is the attribute Key conforming to the
2517 // "destination.port" semantic conventions. It represents the destination
2518 // port number
2519 //
2520 // Type: int
2521 // RequirementLevel: Optional
2522 // Stability: experimental
2523 // Examples: 3389, 2888
2524 DestinationPortKey = attribute.Key("destination.port")
2525 )
2526
2527 // DestinationAddress returns an attribute KeyValue conforming to the
2528 // "destination.address" semantic conventions. It represents the destination
2529 // address - domain name if available without reverse DNS lookup; otherwise, IP
2530 // address or Unix domain socket name.
2531 func DestinationAddress(val string) attribute.KeyValue {
2532 return DestinationAddressKey.String(val)
2533 }
2534
2535 // DestinationPort returns an attribute KeyValue conforming to the
2536 // "destination.port" semantic conventions. It represents the destination port
2537 // number
2538 func DestinationPort(val int) attribute.KeyValue {
2539 return DestinationPortKey.Int(val)
2540 }
2541
2542 // Describes device attributes.
2543 const (
2544 // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
2545 // conventions. It represents a unique identifier representing the device
2546 //
2547 // Type: string
2548 // RequirementLevel: Optional
2549 // Stability: experimental
2550 // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
2551 // Note: The device identifier MUST only be defined using the values
2552 // outlined below. This value is not an advertising identifier and MUST NOT
2553 // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
2554 // to the [vendor
2555 // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
2556 // On Android (Java or Kotlin), this value MUST be equal to the Firebase
2557 // Installation ID or a globally unique UUID which is persisted across
2558 // sessions in your application. More information can be found
2559 // [here](https://developer.android.com/training/articles/user-data-ids) on
2560 // best practices and exact implementation details. Caution should be taken
2561 // when storing personal data or anything which can identify a user. GDPR
2562 // and data protection laws may apply, ensure you do your own due
2563 // diligence.
2564 DeviceIDKey = attribute.Key("device.id")
2565
2566 // DeviceManufacturerKey is the attribute Key conforming to the
2567 // "device.manufacturer" semantic conventions. It represents the name of
2568 // the device manufacturer
2569 //
2570 // Type: string
2571 // RequirementLevel: Optional
2572 // Stability: experimental
2573 // Examples: 'Apple', 'Samsung'
2574 // Note: The Android OS provides this field via
2575 // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
2576 // iOS apps SHOULD hardcode the value `Apple`.
2577 DeviceManufacturerKey = attribute.Key("device.manufacturer")
2578
2579 // DeviceModelIdentifierKey is the attribute Key conforming to the
2580 // "device.model.identifier" semantic conventions. It represents the model
2581 // identifier for the device
2582 //
2583 // Type: string
2584 // RequirementLevel: Optional
2585 // Stability: experimental
2586 // Examples: 'iPhone3,4', 'SM-G920F'
2587 // Note: It's recommended this value represents a machine-readable version
2588 // of the model identifier rather than the market or consumer-friendly name
2589 // of the device.
2590 DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
2591
2592 // DeviceModelNameKey is the attribute Key conforming to the
2593 // "device.model.name" semantic conventions. It represents the marketing
2594 // name for the device model
2595 //
2596 // Type: string
2597 // RequirementLevel: Optional
2598 // Stability: experimental
2599 // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
2600 // Note: It's recommended this value represents a human-readable version of
2601 // the device model rather than a machine-readable alternative.
2602 DeviceModelNameKey = attribute.Key("device.model.name")
2603 )
2604
2605 // DeviceID returns an attribute KeyValue conforming to the "device.id"
2606 // semantic conventions. It represents a unique identifier representing the
2607 // device
2608 func DeviceID(val string) attribute.KeyValue {
2609 return DeviceIDKey.String(val)
2610 }
2611
2612 // DeviceManufacturer returns an attribute KeyValue conforming to the
2613 // "device.manufacturer" semantic conventions. It represents the name of the
2614 // device manufacturer
2615 func DeviceManufacturer(val string) attribute.KeyValue {
2616 return DeviceManufacturerKey.String(val)
2617 }
2618
2619 // DeviceModelIdentifier returns an attribute KeyValue conforming to the
2620 // "device.model.identifier" semantic conventions. It represents the model
2621 // identifier for the device
2622 func DeviceModelIdentifier(val string) attribute.KeyValue {
2623 return DeviceModelIdentifierKey.String(val)
2624 }
2625
2626 // DeviceModelName returns an attribute KeyValue conforming to the
2627 // "device.model.name" semantic conventions. It represents the marketing name
2628 // for the device model
2629 func DeviceModelName(val string) attribute.KeyValue {
2630 return DeviceModelNameKey.String(val)
2631 }
2632
2633 // These attributes may be used for any disk related operation.
2634 const (
2635 // DiskIoDirectionKey is the attribute Key conforming to the
2636 // "disk.io.direction" semantic conventions. It represents the disk IO
2637 // operation direction.
2638 //
2639 // Type: Enum
2640 // RequirementLevel: Optional
2641 // Stability: experimental
2642 // Examples: 'read'
2643 DiskIoDirectionKey = attribute.Key("disk.io.direction")
2644 )
2645
2646 var (
2647 // read
2648 DiskIoDirectionRead = DiskIoDirectionKey.String("read")
2649 // write
2650 DiskIoDirectionWrite = DiskIoDirectionKey.String("write")
2651 )
2652
2653 // The shared attributes used to report a DNS query.
2654 const (
2655 // DNSQuestionNameKey is the attribute Key conforming to the
2656 // "dns.question.name" semantic conventions. It represents the name being
2657 // queried.
2658 //
2659 // Type: string
2660 // RequirementLevel: Optional
2661 // Stability: experimental
2662 // Examples: 'www.example.com', 'opentelemetry.io'
2663 // Note: If the name field contains non-printable characters (below 32 or
2664 // above 126), those characters should be represented as escaped base 10
2665 // integers (\DDD). Back slashes and quotes should be escaped. Tabs,
2666 // carriage returns, and line feeds should be converted to \t, \r, and \n
2667 // respectively.
2668 DNSQuestionNameKey = attribute.Key("dns.question.name")
2669 )
2670
2671 // DNSQuestionName returns an attribute KeyValue conforming to the
2672 // "dns.question.name" semantic conventions. It represents the name being
2673 // queried.
2674 func DNSQuestionName(val string) attribute.KeyValue {
2675 return DNSQuestionNameKey.String(val)
2676 }
2677
2678 // Attributes for operations with an authenticated and/or authorized enduser.
2679 const (
2680 // EnduserIDKey is the attribute Key conforming to the "enduser.id"
2681 // semantic conventions. It represents the username or client_id extracted
2682 // from the access token or
2683 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
2684 // in the inbound request from outside the system.
2685 //
2686 // Type: string
2687 // RequirementLevel: Optional
2688 // Stability: experimental
2689 // Examples: 'username'
2690 EnduserIDKey = attribute.Key("enduser.id")
2691
2692 // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
2693 // semantic conventions. It represents the actual/assumed role the client
2694 // is making the request under extracted from token or application security
2695 // context.
2696 //
2697 // Type: string
2698 // RequirementLevel: Optional
2699 // Stability: experimental
2700 // Examples: 'admin'
2701 EnduserRoleKey = attribute.Key("enduser.role")
2702
2703 // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
2704 // semantic conventions. It represents the scopes or granted authorities
2705 // the client currently possesses extracted from token or application
2706 // security context. The value would come from the scope associated with an
2707 // [OAuth 2.0 Access
2708 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
2709 // value in a [SAML 2.0
2710 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
2711 //
2712 // Type: string
2713 // RequirementLevel: Optional
2714 // Stability: experimental
2715 // Examples: 'read:message, write:files'
2716 EnduserScopeKey = attribute.Key("enduser.scope")
2717 )
2718
2719 // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
2720 // semantic conventions. It represents the username or client_id extracted from
2721 // the access token or
2722 // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
2723 // the inbound request from outside the system.
2724 func EnduserID(val string) attribute.KeyValue {
2725 return EnduserIDKey.String(val)
2726 }
2727
2728 // EnduserRole returns an attribute KeyValue conforming to the
2729 // "enduser.role" semantic conventions. It represents the actual/assumed role
2730 // the client is making the request under extracted from token or application
2731 // security context.
2732 func EnduserRole(val string) attribute.KeyValue {
2733 return EnduserRoleKey.String(val)
2734 }
2735
2736 // EnduserScope returns an attribute KeyValue conforming to the
2737 // "enduser.scope" semantic conventions. It represents the scopes or granted
2738 // authorities the client currently possesses extracted from token or
2739 // application security context. The value would come from the scope associated
2740 // with an [OAuth 2.0 Access
2741 // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
2742 // value in a [SAML 2.0
2743 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
2744 func EnduserScope(val string) attribute.KeyValue {
2745 return EnduserScopeKey.String(val)
2746 }
2747
2748 // The shared attributes used to report an error.
2749 const (
2750 // ErrorTypeKey is the attribute Key conforming to the "error.type"
2751 // semantic conventions. It represents the describes a class of error the
2752 // operation ended with.
2753 //
2754 // Type: Enum
2755 // RequirementLevel: Optional
2756 // Stability: stable
2757 // Examples: 'timeout', 'java.net.UnknownHostException',
2758 // 'server_certificate_invalid', '500'
2759 // Note: The `error.type` SHOULD be predictable, and SHOULD have low
2760 // cardinality.
2761 //
2762 // When `error.type` is set to a type (e.g., an exception type), its
2763 // canonical class name identifying the type within the artifact SHOULD be
2764 // used.
2765 //
2766 // Instrumentations SHOULD document the list of errors they report.
2767 //
2768 // The cardinality of `error.type` within one instrumentation library
2769 // SHOULD be low.
2770 // Telemetry consumers that aggregate data from multiple instrumentation
2771 // libraries and applications
2772 // should be prepared for `error.type` to have high cardinality at query
2773 // time when no
2774 // additional filters are applied.
2775 //
2776 // If the operation has completed successfully, instrumentations SHOULD NOT
2777 // set `error.type`.
2778 //
2779 // If a specific domain defines its own set of error identifiers (such as
2780 // HTTP or gRPC status codes),
2781 // it's RECOMMENDED to:
2782 //
2783 // * Use a domain-specific attribute
2784 // * Set `error.type` to capture all errors, regardless of whether they are
2785 // defined within the domain-specific set or not.
2786 ErrorTypeKey = attribute.Key("error.type")
2787 )
2788
2789 var (
2790 // A fallback error value to be used when the instrumentation doesn't define a custom value
2791 ErrorTypeOther = ErrorTypeKey.String("_OTHER")
2792 )
2793
2794 // Attributes for Events represented using Log Records.
2795 const (
2796 // EventNameKey is the attribute Key conforming to the "event.name"
2797 // semantic conventions. It represents the identifies the class / type of
2798 // event.
2799 //
2800 // Type: string
2801 // RequirementLevel: Optional
2802 // Stability: experimental
2803 // Examples: 'browser.mouse.click', 'device.app.lifecycle'
2804 // Note: Event names are subject to the same rules as [attribute
2805 // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md).
2806 // Notably, event names are namespaced to avoid collisions and provide a
2807 // clean separation of semantics for events in separate domains like
2808 // browser, mobile, and kubernetes.
2809 EventNameKey = attribute.Key("event.name")
2810 )
2811
2812 // EventName returns an attribute KeyValue conforming to the "event.name"
2813 // semantic conventions. It represents the identifies the class / type of
2814 // event.
2815 func EventName(val string) attribute.KeyValue {
2816 return EventNameKey.String(val)
2817 }
2818
2819 // The shared attributes used to report a single exception associated with a
2820 // span or log.
2821 const (
2822 // ExceptionEscapedKey is the attribute Key conforming to the
2823 // "exception.escaped" semantic conventions. It represents the sHOULD be
2824 // set to true if the exception event is recorded at a point where it is
2825 // known that the exception is escaping the scope of the span.
2826 //
2827 // Type: boolean
2828 // RequirementLevel: Optional
2829 // Stability: stable
2830 // Note: An exception is considered to have escaped (or left) the scope of
2831 // a span,
2832 // if that span is ended while the exception is still logically "in
2833 // flight".
2834 // This may be actually "in flight" in some languages (e.g. if the
2835 // exception
2836 // is passed to a Context manager's `__exit__` method in Python) but will
2837 // usually be caught at the point of recording the exception in most
2838 // languages.
2839 //
2840 // It is usually not possible to determine at the point where an exception
2841 // is thrown
2842 // whether it will escape the scope of a span.
2843 // However, it is trivial to know that an exception
2844 // will escape, if one checks for an active exception just before ending
2845 // the span,
2846 // as done in the [example for recording span
2847 // exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception).
2848 //
2849 // It follows that an exception may still escape the scope of the span
2850 // even if the `exception.escaped` attribute was not set or set to false,
2851 // since the event might have been recorded at a time where it was not
2852 // clear whether the exception will escape.
2853 ExceptionEscapedKey = attribute.Key("exception.escaped")
2854
2855 // ExceptionMessageKey is the attribute Key conforming to the
2856 // "exception.message" semantic conventions. It represents the exception
2857 // message.
2858 //
2859 // Type: string
2860 // RequirementLevel: Optional
2861 // Stability: stable
2862 // Examples: 'Division by zero', "Can't convert 'int' object to str
2863 // implicitly"
2864 ExceptionMessageKey = attribute.Key("exception.message")
2865
2866 // ExceptionStacktraceKey is the attribute Key conforming to the
2867 // "exception.stacktrace" semantic conventions. It represents a stacktrace
2868 // as a string in the natural representation for the language runtime. The
2869 // representation is to be determined and documented by each language SIG.
2870 //
2871 // Type: string
2872 // RequirementLevel: Optional
2873 // Stability: stable
2874 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
2875 // exception\\n at '
2876 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
2877 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
2878 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
2879 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
2880
2881 // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
2882 // semantic conventions. It represents the type of the exception (its
2883 // fully-qualified class name, if applicable). The dynamic type of the
2884 // exception should be preferred over the static type in languages that
2885 // support it.
2886 //
2887 // Type: string
2888 // RequirementLevel: Optional
2889 // Stability: stable
2890 // Examples: 'java.net.ConnectException', 'OSError'
2891 ExceptionTypeKey = attribute.Key("exception.type")
2892 )
2893
2894 // ExceptionEscaped returns an attribute KeyValue conforming to the
2895 // "exception.escaped" semantic conventions. It represents the sHOULD be set to
2896 // true if the exception event is recorded at a point where it is known that
2897 // the exception is escaping the scope of the span.
2898 func ExceptionEscaped(val bool) attribute.KeyValue {
2899 return ExceptionEscapedKey.Bool(val)
2900 }
2901
2902 // ExceptionMessage returns an attribute KeyValue conforming to the
2903 // "exception.message" semantic conventions. It represents the exception
2904 // message.
2905 func ExceptionMessage(val string) attribute.KeyValue {
2906 return ExceptionMessageKey.String(val)
2907 }
2908
2909 // ExceptionStacktrace returns an attribute KeyValue conforming to the
2910 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
2911 // string in the natural representation for the language runtime. The
2912 // representation is to be determined and documented by each language SIG.
2913 func ExceptionStacktrace(val string) attribute.KeyValue {
2914 return ExceptionStacktraceKey.String(val)
2915 }
2916
2917 // ExceptionType returns an attribute KeyValue conforming to the
2918 // "exception.type" semantic conventions. It represents the type of the
2919 // exception (its fully-qualified class name, if applicable). The dynamic type
2920 // of the exception should be preferred over the static type in languages that
2921 // support it.
2922 func ExceptionType(val string) attribute.KeyValue {
2923 return ExceptionTypeKey.String(val)
2924 }
2925
2926 // FaaS attributes
2927 const (
2928 // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
2929 // semantic conventions. It represents a boolean that is true if the
2930 // serverless function is executed for the first time (aka cold-start).
2931 //
2932 // Type: boolean
2933 // RequirementLevel: Optional
2934 // Stability: experimental
2935 FaaSColdstartKey = attribute.Key("faas.coldstart")
2936
2937 // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
2938 // conventions. It represents a string containing the schedule period as
2939 // [Cron
2940 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
2941 //
2942 // Type: string
2943 // RequirementLevel: Optional
2944 // Stability: experimental
2945 // Examples: '0/5 * * * ? *'
2946 FaaSCronKey = attribute.Key("faas.cron")
2947
2948 // FaaSDocumentCollectionKey is the attribute Key conforming to the
2949 // "faas.document.collection" semantic conventions. It represents the name
2950 // of the source on which the triggering operation was performed. For
2951 // example, in Cloud Storage or S3 corresponds to the bucket name, and in
2952 // Cosmos DB to the database name.
2953 //
2954 // Type: string
2955 // RequirementLevel: Optional
2956 // Stability: experimental
2957 // Examples: 'myBucketName', 'myDBName'
2958 FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
2959
2960 // FaaSDocumentNameKey is the attribute Key conforming to the
2961 // "faas.document.name" semantic conventions. It represents the document
2962 // name/table subjected to the operation. For example, in Cloud Storage or
2963 // S3 is the name of the file, and in Cosmos DB the table name.
2964 //
2965 // Type: string
2966 // RequirementLevel: Optional
2967 // Stability: experimental
2968 // Examples: 'myFile.txt', 'myTableName'
2969 FaaSDocumentNameKey = attribute.Key("faas.document.name")
2970
2971 // FaaSDocumentOperationKey is the attribute Key conforming to the
2972 // "faas.document.operation" semantic conventions. It represents the
2973 // describes the type of the operation that was performed on the data.
2974 //
2975 // Type: Enum
2976 // RequirementLevel: Optional
2977 // Stability: experimental
2978 FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
2979
2980 // FaaSDocumentTimeKey is the attribute Key conforming to the
2981 // "faas.document.time" semantic conventions. It represents a string
2982 // containing the time when the data was accessed in the [ISO
2983 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
2984 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
2985 //
2986 // Type: string
2987 // RequirementLevel: Optional
2988 // Stability: experimental
2989 // Examples: '2020-01-23T13:47:06Z'
2990 FaaSDocumentTimeKey = attribute.Key("faas.document.time")
2991
2992 // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
2993 // semantic conventions. It represents the execution environment ID as a
2994 // string, that will be potentially reused for other invocations to the
2995 // same function/function version.
2996 //
2997 // Type: string
2998 // RequirementLevel: Optional
2999 // Stability: experimental
3000 // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
3001 // Note: * **AWS Lambda:** Use the (full) log stream name.
3002 FaaSInstanceKey = attribute.Key("faas.instance")
3003
3004 // FaaSInvocationIDKey is the attribute Key conforming to the
3005 // "faas.invocation_id" semantic conventions. It represents the invocation
3006 // ID of the current function invocation.
3007 //
3008 // Type: string
3009 // RequirementLevel: Optional
3010 // Stability: experimental
3011 // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
3012 FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
3013
3014 // FaaSInvokedNameKey is the attribute Key conforming to the
3015 // "faas.invoked_name" semantic conventions. It represents the name of the
3016 // invoked function.
3017 //
3018 // Type: string
3019 // RequirementLevel: Optional
3020 // Stability: experimental
3021 // Examples: 'my-function'
3022 // Note: SHOULD be equal to the `faas.name` resource attribute of the
3023 // invoked function.
3024 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
3025
3026 // FaaSInvokedProviderKey is the attribute Key conforming to the
3027 // "faas.invoked_provider" semantic conventions. It represents the cloud
3028 // provider of the invoked function.
3029 //
3030 // Type: Enum
3031 // RequirementLevel: Optional
3032 // Stability: experimental
3033 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
3034 // invoked function.
3035 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
3036
3037 // FaaSInvokedRegionKey is the attribute Key conforming to the
3038 // "faas.invoked_region" semantic conventions. It represents the cloud
3039 // region of the invoked function.
3040 //
3041 // Type: string
3042 // RequirementLevel: Optional
3043 // Stability: experimental
3044 // Examples: 'eu-central-1'
3045 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
3046 // invoked function.
3047 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
3048
3049 // FaaSMaxMemoryKey is the attribute Key conforming to the
3050 // "faas.max_memory" semantic conventions. It represents the amount of
3051 // memory available to the serverless function converted to Bytes.
3052 //
3053 // Type: int
3054 // RequirementLevel: Optional
3055 // Stability: experimental
3056 // Examples: 134217728
3057 // Note: It's recommended to set this attribute since e.g. too little
3058 // memory can easily stop a Java AWS Lambda function from working
3059 // correctly. On AWS Lambda, the environment variable
3060 // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
3061 // be multiplied by 1,048,576).
3062 FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
3063
3064 // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
3065 // conventions. It represents the name of the single function that this
3066 // runtime instance executes.
3067 //
3068 // Type: string
3069 // RequirementLevel: Optional
3070 // Stability: experimental
3071 // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
3072 // Note: This is the name of the function as configured/deployed on the
3073 // FaaS
3074 // platform and is usually different from the name of the callback
3075 // function (which may be stored in the
3076 // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
3077 // span attributes).
3078 //
3079 // For some cloud providers, the above definition is ambiguous. The
3080 // following
3081 // definition of function name MUST be used for this attribute
3082 // (and consequently the span name) for the listed cloud
3083 // providers/products:
3084 //
3085 // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
3086 // followed by a forward slash followed by the function name (this form
3087 // can also be seen in the resource JSON for the function).
3088 // This means that a span attribute MUST be used, as an Azure function
3089 // app can host multiple functions that would usually share
3090 // a TracerProvider (see also the `cloud.resource_id` attribute).
3091 FaaSNameKey = attribute.Key("faas.name")
3092
3093 // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
3094 // conventions. It represents a string containing the function invocation
3095 // time in the [ISO
3096 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3097 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3098 //
3099 // Type: string
3100 // RequirementLevel: Optional
3101 // Stability: experimental
3102 // Examples: '2020-01-23T13:47:06Z'
3103 FaaSTimeKey = attribute.Key("faas.time")
3104
3105 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
3106 // semantic conventions. It represents the type of the trigger which caused
3107 // this function invocation.
3108 //
3109 // Type: Enum
3110 // RequirementLevel: Optional
3111 // Stability: experimental
3112 FaaSTriggerKey = attribute.Key("faas.trigger")
3113
3114 // FaaSVersionKey is the attribute Key conforming to the "faas.version"
3115 // semantic conventions. It represents the immutable version of the
3116 // function being executed.
3117 //
3118 // Type: string
3119 // RequirementLevel: Optional
3120 // Stability: experimental
3121 // Examples: '26', 'pinkfroid-00002'
3122 // Note: Depending on the cloud provider and platform, use:
3123 //
3124 // * **AWS Lambda:** The [function
3125 // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
3126 // (an integer represented as a decimal string).
3127 // * **Google Cloud Run (Services):** The
3128 // [revision](https://cloud.google.com/run/docs/managing/revisions)
3129 // (i.e., the function name plus the revision suffix).
3130 // * **Google Cloud Functions:** The value of the
3131 // [`K_REVISION` environment
3132 // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
3133 // * **Azure Functions:** Not applicable. Do not set this attribute.
3134 FaaSVersionKey = attribute.Key("faas.version")
3135 )
3136
3137 var (
3138 // When a new object is created
3139 FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
3140 // When an object is modified
3141 FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
3142 // When an object is deleted
3143 FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
3144 )
3145
3146 var (
3147 // Alibaba Cloud
3148 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
3149 // Amazon Web Services
3150 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
3151 // Microsoft Azure
3152 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
3153 // Google Cloud Platform
3154 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
3155 // Tencent Cloud
3156 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
3157 )
3158
3159 var (
3160 // A response to some data source operation such as a database or filesystem read/write
3161 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
3162 // To provide an answer to an inbound HTTP request
3163 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
3164 // A function is set to be executed when messages are sent to a messaging system
3165 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
3166 // A function is scheduled to be executed regularly
3167 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
3168 // If none of the others apply
3169 FaaSTriggerOther = FaaSTriggerKey.String("other")
3170 )
3171
3172 // FaaSColdstart returns an attribute KeyValue conforming to the
3173 // "faas.coldstart" semantic conventions. It represents a boolean that is true
3174 // if the serverless function is executed for the first time (aka cold-start).
3175 func FaaSColdstart(val bool) attribute.KeyValue {
3176 return FaaSColdstartKey.Bool(val)
3177 }
3178
3179 // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
3180 // semantic conventions. It represents a string containing the schedule period
3181 // as [Cron
3182 // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
3183 func FaaSCron(val string) attribute.KeyValue {
3184 return FaaSCronKey.String(val)
3185 }
3186
3187 // FaaSDocumentCollection returns an attribute KeyValue conforming to the
3188 // "faas.document.collection" semantic conventions. It represents the name of
3189 // the source on which the triggering operation was performed. For example, in
3190 // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
3191 // database name.
3192 func FaaSDocumentCollection(val string) attribute.KeyValue {
3193 return FaaSDocumentCollectionKey.String(val)
3194 }
3195
3196 // FaaSDocumentName returns an attribute KeyValue conforming to the
3197 // "faas.document.name" semantic conventions. It represents the document
3198 // name/table subjected to the operation. For example, in Cloud Storage or S3
3199 // is the name of the file, and in Cosmos DB the table name.
3200 func FaaSDocumentName(val string) attribute.KeyValue {
3201 return FaaSDocumentNameKey.String(val)
3202 }
3203
3204 // FaaSDocumentTime returns an attribute KeyValue conforming to the
3205 // "faas.document.time" semantic conventions. It represents a string containing
3206 // the time when the data was accessed in the [ISO
3207 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3208 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3209 func FaaSDocumentTime(val string) attribute.KeyValue {
3210 return FaaSDocumentTimeKey.String(val)
3211 }
3212
3213 // FaaSInstance returns an attribute KeyValue conforming to the
3214 // "faas.instance" semantic conventions. It represents the execution
3215 // environment ID as a string, that will be potentially reused for other
3216 // invocations to the same function/function version.
3217 func FaaSInstance(val string) attribute.KeyValue {
3218 return FaaSInstanceKey.String(val)
3219 }
3220
3221 // FaaSInvocationID returns an attribute KeyValue conforming to the
3222 // "faas.invocation_id" semantic conventions. It represents the invocation ID
3223 // of the current function invocation.
3224 func FaaSInvocationID(val string) attribute.KeyValue {
3225 return FaaSInvocationIDKey.String(val)
3226 }
3227
3228 // FaaSInvokedName returns an attribute KeyValue conforming to the
3229 // "faas.invoked_name" semantic conventions. It represents the name of the
3230 // invoked function.
3231 func FaaSInvokedName(val string) attribute.KeyValue {
3232 return FaaSInvokedNameKey.String(val)
3233 }
3234
3235 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
3236 // "faas.invoked_region" semantic conventions. It represents the cloud region
3237 // of the invoked function.
3238 func FaaSInvokedRegion(val string) attribute.KeyValue {
3239 return FaaSInvokedRegionKey.String(val)
3240 }
3241
3242 // FaaSMaxMemory returns an attribute KeyValue conforming to the
3243 // "faas.max_memory" semantic conventions. It represents the amount of memory
3244 // available to the serverless function converted to Bytes.
3245 func FaaSMaxMemory(val int) attribute.KeyValue {
3246 return FaaSMaxMemoryKey.Int(val)
3247 }
3248
3249 // FaaSName returns an attribute KeyValue conforming to the "faas.name"
3250 // semantic conventions. It represents the name of the single function that
3251 // this runtime instance executes.
3252 func FaaSName(val string) attribute.KeyValue {
3253 return FaaSNameKey.String(val)
3254 }
3255
3256 // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
3257 // semantic conventions. It represents a string containing the function
3258 // invocation time in the [ISO
3259 // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
3260 // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
3261 func FaaSTime(val string) attribute.KeyValue {
3262 return FaaSTimeKey.String(val)
3263 }
3264
3265 // FaaSVersion returns an attribute KeyValue conforming to the
3266 // "faas.version" semantic conventions. It represents the immutable version of
3267 // the function being executed.
3268 func FaaSVersion(val string) attribute.KeyValue {
3269 return FaaSVersionKey.String(val)
3270 }
3271
3272 // Attributes for Feature Flags.
3273 const (
3274 // FeatureFlagKeyKey is the attribute Key conforming to the
3275 // "feature_flag.key" semantic conventions. It represents the unique
3276 // identifier of the feature flag.
3277 //
3278 // Type: string
3279 // RequirementLevel: Optional
3280 // Stability: experimental
3281 // Examples: 'logo-color'
3282 FeatureFlagKeyKey = attribute.Key("feature_flag.key")
3283
3284 // FeatureFlagProviderNameKey is the attribute Key conforming to the
3285 // "feature_flag.provider_name" semantic conventions. It represents the
3286 // name of the service provider that performs the flag evaluation.
3287 //
3288 // Type: string
3289 // RequirementLevel: Optional
3290 // Stability: experimental
3291 // Examples: 'Flag Manager'
3292 FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
3293
3294 // FeatureFlagVariantKey is the attribute Key conforming to the
3295 // "feature_flag.variant" semantic conventions. It represents the sHOULD be
3296 // a semantic identifier for a value. If one is unavailable, a stringified
3297 // version of the value can be used.
3298 //
3299 // Type: string
3300 // RequirementLevel: Optional
3301 // Stability: experimental
3302 // Examples: 'red', 'true', 'on'
3303 // Note: A semantic identifier, commonly referred to as a variant, provides
3304 // a means
3305 // for referring to a value without including the value itself. This can
3306 // provide additional context for understanding the meaning behind a value.
3307 // For example, the variant `red` maybe be used for the value `#c05543`.
3308 //
3309 // A stringified version of the value can be used in situations where a
3310 // semantic identifier is unavailable. String representation of the value
3311 // should be determined by the implementer.
3312 FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
3313 )
3314
3315 // FeatureFlagKey returns an attribute KeyValue conforming to the
3316 // "feature_flag.key" semantic conventions. It represents the unique identifier
3317 // of the feature flag.
3318 func FeatureFlagKey(val string) attribute.KeyValue {
3319 return FeatureFlagKeyKey.String(val)
3320 }
3321
3322 // FeatureFlagProviderName returns an attribute KeyValue conforming to the
3323 // "feature_flag.provider_name" semantic conventions. It represents the name of
3324 // the service provider that performs the flag evaluation.
3325 func FeatureFlagProviderName(val string) attribute.KeyValue {
3326 return FeatureFlagProviderNameKey.String(val)
3327 }
3328
3329 // FeatureFlagVariant returns an attribute KeyValue conforming to the
3330 // "feature_flag.variant" semantic conventions. It represents the sHOULD be a
3331 // semantic identifier for a value. If one is unavailable, a stringified
3332 // version of the value can be used.
3333 func FeatureFlagVariant(val string) attribute.KeyValue {
3334 return FeatureFlagVariantKey.String(val)
3335 }
3336
3337 // Describes file attributes.
3338 const (
3339 // FileDirectoryKey is the attribute Key conforming to the "file.directory"
3340 // semantic conventions. It represents the directory where the file is
3341 // located. It should include the drive letter, when appropriate.
3342 //
3343 // Type: string
3344 // RequirementLevel: Optional
3345 // Stability: experimental
3346 // Examples: '/home/user', 'C:\\Program Files\\MyApp'
3347 FileDirectoryKey = attribute.Key("file.directory")
3348
3349 // FileExtensionKey is the attribute Key conforming to the "file.extension"
3350 // semantic conventions. It represents the file extension, excluding the
3351 // leading dot.
3352 //
3353 // Type: string
3354 // RequirementLevel: Optional
3355 // Stability: experimental
3356 // Examples: 'png', 'gz'
3357 // Note: When the file name has multiple extensions (example.tar.gz), only
3358 // the last one should be captured ("gz", not "tar.gz").
3359 FileExtensionKey = attribute.Key("file.extension")
3360
3361 // FileNameKey is the attribute Key conforming to the "file.name" semantic
3362 // conventions. It represents the name of the file including the extension,
3363 // without the directory.
3364 //
3365 // Type: string
3366 // RequirementLevel: Optional
3367 // Stability: experimental
3368 // Examples: 'example.png'
3369 FileNameKey = attribute.Key("file.name")
3370
3371 // FilePathKey is the attribute Key conforming to the "file.path" semantic
3372 // conventions. It represents the full path to the file, including the file
3373 // name. It should include the drive letter, when appropriate.
3374 //
3375 // Type: string
3376 // RequirementLevel: Optional
3377 // Stability: experimental
3378 // Examples: '/home/alice/example.png', 'C:\\Program
3379 // Files\\MyApp\\myapp.exe'
3380 FilePathKey = attribute.Key("file.path")
3381
3382 // FileSizeKey is the attribute Key conforming to the "file.size" semantic
3383 // conventions. It represents the file size in bytes.
3384 //
3385 // Type: int
3386 // RequirementLevel: Optional
3387 // Stability: experimental
3388 FileSizeKey = attribute.Key("file.size")
3389 )
3390
3391 // FileDirectory returns an attribute KeyValue conforming to the
3392 // "file.directory" semantic conventions. It represents the directory where the
3393 // file is located. It should include the drive letter, when appropriate.
3394 func FileDirectory(val string) attribute.KeyValue {
3395 return FileDirectoryKey.String(val)
3396 }
3397
3398 // FileExtension returns an attribute KeyValue conforming to the
3399 // "file.extension" semantic conventions. It represents the file extension,
3400 // excluding the leading dot.
3401 func FileExtension(val string) attribute.KeyValue {
3402 return FileExtensionKey.String(val)
3403 }
3404
3405 // FileName returns an attribute KeyValue conforming to the "file.name"
3406 // semantic conventions. It represents the name of the file including the
3407 // extension, without the directory.
3408 func FileName(val string) attribute.KeyValue {
3409 return FileNameKey.String(val)
3410 }
3411
3412 // FilePath returns an attribute KeyValue conforming to the "file.path"
3413 // semantic conventions. It represents the full path to the file, including the
3414 // file name. It should include the drive letter, when appropriate.
3415 func FilePath(val string) attribute.KeyValue {
3416 return FilePathKey.String(val)
3417 }
3418
3419 // FileSize returns an attribute KeyValue conforming to the "file.size"
3420 // semantic conventions. It represents the file size in bytes.
3421 func FileSize(val int) attribute.KeyValue {
3422 return FileSizeKey.Int(val)
3423 }
3424
3425 // Attributes for Google Cloud Run.
3426 const (
3427 // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
3428 // "gcp.cloud_run.job.execution" semantic conventions. It represents the
3429 // name of the Cloud Run
3430 // [execution](https://cloud.google.com/run/docs/managing/job-executions)
3431 // being run for the Job, as set by the
3432 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
3433 // environment variable.
3434 //
3435 // Type: string
3436 // RequirementLevel: Optional
3437 // Stability: experimental
3438 // Examples: 'job-name-xxxx', 'sample-job-mdw84'
3439 GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
3440
3441 // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
3442 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
3443 // index for a task within an execution as provided by the
3444 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
3445 // environment variable.
3446 //
3447 // Type: int
3448 // RequirementLevel: Optional
3449 // Stability: experimental
3450 // Examples: 0, 1
3451 GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
3452 )
3453
3454 // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
3455 // "gcp.cloud_run.job.execution" semantic conventions. It represents the name
3456 // of the Cloud Run
3457 // [execution](https://cloud.google.com/run/docs/managing/job-executions) being
3458 // run for the Job, as set by the
3459 // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
3460 // environment variable.
3461 func GCPCloudRunJobExecution(val string) attribute.KeyValue {
3462 return GCPCloudRunJobExecutionKey.String(val)
3463 }
3464
3465 // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
3466 // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
3467 // for a task within an execution as provided by the
3468 // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
3469 // environment variable.
3470 func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
3471 return GCPCloudRunJobTaskIndexKey.Int(val)
3472 }
3473
3474 // Attributes for Google Compute Engine (GCE).
3475 const (
3476 // GCPGceInstanceHostnameKey is the attribute Key conforming to the
3477 // "gcp.gce.instance.hostname" semantic conventions. It represents the
3478 // hostname of a GCE instance. This is the full value of the default or
3479 // [custom
3480 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
3481 //
3482 // Type: string
3483 // RequirementLevel: Optional
3484 // Stability: experimental
3485 // Examples: 'my-host1234.example.com',
3486 // 'sample-vm.us-west1-b.c.my-project.internal'
3487 GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
3488
3489 // GCPGceInstanceNameKey is the attribute Key conforming to the
3490 // "gcp.gce.instance.name" semantic conventions. It represents the instance
3491 // name of a GCE instance. This is the value provided by `host.name`, the
3492 // visible name of the instance in the Cloud Console UI, and the prefix for
3493 // the default hostname of the instance as defined by the [default internal
3494 // DNS
3495 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
3496 //
3497 // Type: string
3498 // RequirementLevel: Optional
3499 // Stability: experimental
3500 // Examples: 'instance-1', 'my-vm-name'
3501 GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
3502 )
3503
3504 // GCPGceInstanceHostname returns an attribute KeyValue conforming to the
3505 // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
3506 // of a GCE instance. This is the full value of the default or [custom
3507 // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
3508 func GCPGceInstanceHostname(val string) attribute.KeyValue {
3509 return GCPGceInstanceHostnameKey.String(val)
3510 }
3511
3512 // GCPGceInstanceName returns an attribute KeyValue conforming to the
3513 // "gcp.gce.instance.name" semantic conventions. It represents the instance
3514 // name of a GCE instance. This is the value provided by `host.name`, the
3515 // visible name of the instance in the Cloud Console UI, and the prefix for the
3516 // default hostname of the instance as defined by the [default internal DNS
3517 // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
3518 func GCPGceInstanceName(val string) attribute.KeyValue {
3519 return GCPGceInstanceNameKey.String(val)
3520 }
3521
3522 // The attributes used to describe telemetry in the context of LLM (Large
3523 // Language Models) requests and responses.
3524 const (
3525 // GenAiCompletionKey is the attribute Key conforming to the
3526 // "gen_ai.completion" semantic conventions. It represents the full
3527 // response received from the LLM.
3528 //
3529 // Type: string
3530 // RequirementLevel: Optional
3531 // Stability: experimental
3532 // Examples: "[{'role': 'assistant', 'content': 'The capital of France is
3533 // Paris.'}]"
3534 // Note: It's RECOMMENDED to format completions as JSON string matching
3535 // [OpenAI messages
3536 // format](https://platform.openai.com/docs/guides/text-generation)
3537 GenAiCompletionKey = attribute.Key("gen_ai.completion")
3538
3539 // GenAiPromptKey is the attribute Key conforming to the "gen_ai.prompt"
3540 // semantic conventions. It represents the full prompt sent to an LLM.
3541 //
3542 // Type: string
3543 // RequirementLevel: Optional
3544 // Stability: experimental
3545 // Examples: "[{'role': 'user', 'content': 'What is the capital of
3546 // France?'}]"
3547 // Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI
3548 // messages
3549 // format](https://platform.openai.com/docs/guides/text-generation)
3550 GenAiPromptKey = attribute.Key("gen_ai.prompt")
3551
3552 // GenAiRequestMaxTokensKey is the attribute Key conforming to the
3553 // "gen_ai.request.max_tokens" semantic conventions. It represents the
3554 // maximum number of tokens the LLM generates for a request.
3555 //
3556 // Type: int
3557 // RequirementLevel: Optional
3558 // Stability: experimental
3559 // Examples: 100
3560 GenAiRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens")
3561
3562 // GenAiRequestModelKey is the attribute Key conforming to the
3563 // "gen_ai.request.model" semantic conventions. It represents the name of
3564 // the LLM a request is being made to.
3565 //
3566 // Type: string
3567 // RequirementLevel: Optional
3568 // Stability: experimental
3569 // Examples: 'gpt-4'
3570 GenAiRequestModelKey = attribute.Key("gen_ai.request.model")
3571
3572 // GenAiRequestTemperatureKey is the attribute Key conforming to the
3573 // "gen_ai.request.temperature" semantic conventions. It represents the
3574 // temperature setting for the LLM request.
3575 //
3576 // Type: double
3577 // RequirementLevel: Optional
3578 // Stability: experimental
3579 // Examples: 0.0
3580 GenAiRequestTemperatureKey = attribute.Key("gen_ai.request.temperature")
3581
3582 // GenAiRequestTopPKey is the attribute Key conforming to the
3583 // "gen_ai.request.top_p" semantic conventions. It represents the top_p
3584 // sampling setting for the LLM request.
3585 //
3586 // Type: double
3587 // RequirementLevel: Optional
3588 // Stability: experimental
3589 // Examples: 1.0
3590 GenAiRequestTopPKey = attribute.Key("gen_ai.request.top_p")
3591
3592 // GenAiResponseFinishReasonsKey is the attribute Key conforming to the
3593 // "gen_ai.response.finish_reasons" semantic conventions. It represents the
3594 // array of reasons the model stopped generating tokens, corresponding to
3595 // each generation received.
3596 //
3597 // Type: string[]
3598 // RequirementLevel: Optional
3599 // Stability: experimental
3600 // Examples: 'stop'
3601 GenAiResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons")
3602
3603 // GenAiResponseIDKey is the attribute Key conforming to the
3604 // "gen_ai.response.id" semantic conventions. It represents the unique
3605 // identifier for the completion.
3606 //
3607 // Type: string
3608 // RequirementLevel: Optional
3609 // Stability: experimental
3610 // Examples: 'chatcmpl-123'
3611 GenAiResponseIDKey = attribute.Key("gen_ai.response.id")
3612
3613 // GenAiResponseModelKey is the attribute Key conforming to the
3614 // "gen_ai.response.model" semantic conventions. It represents the name of
3615 // the LLM a response was generated from.
3616 //
3617 // Type: string
3618 // RequirementLevel: Optional
3619 // Stability: experimental
3620 // Examples: 'gpt-4-0613'
3621 GenAiResponseModelKey = attribute.Key("gen_ai.response.model")
3622
3623 // GenAiSystemKey is the attribute Key conforming to the "gen_ai.system"
3624 // semantic conventions. It represents the Generative AI product as
3625 // identified by the client instrumentation.
3626 //
3627 // Type: Enum
3628 // RequirementLevel: Optional
3629 // Stability: experimental
3630 // Examples: 'openai'
3631 // Note: The actual GenAI product may differ from the one identified by the
3632 // client. For example, when using OpenAI client libraries to communicate
3633 // with Mistral, the `gen_ai.system` is set to `openai` based on the
3634 // instrumentation's best knowledge.
3635 GenAiSystemKey = attribute.Key("gen_ai.system")
3636
3637 // GenAiUsageCompletionTokensKey is the attribute Key conforming to the
3638 // "gen_ai.usage.completion_tokens" semantic conventions. It represents the
3639 // number of tokens used in the LLM response (completion).
3640 //
3641 // Type: int
3642 // RequirementLevel: Optional
3643 // Stability: experimental
3644 // Examples: 180
3645 GenAiUsageCompletionTokensKey = attribute.Key("gen_ai.usage.completion_tokens")
3646
3647 // GenAiUsagePromptTokensKey is the attribute Key conforming to the
3648 // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the
3649 // number of tokens used in the LLM prompt.
3650 //
3651 // Type: int
3652 // RequirementLevel: Optional
3653 // Stability: experimental
3654 // Examples: 100
3655 GenAiUsagePromptTokensKey = attribute.Key("gen_ai.usage.prompt_tokens")
3656 )
3657
3658 var (
3659 // OpenAI
3660 GenAiSystemOpenai = GenAiSystemKey.String("openai")
3661 )
3662
3663 // GenAiCompletion returns an attribute KeyValue conforming to the
3664 // "gen_ai.completion" semantic conventions. It represents the full response
3665 // received from the LLM.
3666 func GenAiCompletion(val string) attribute.KeyValue {
3667 return GenAiCompletionKey.String(val)
3668 }
3669
3670 // GenAiPrompt returns an attribute KeyValue conforming to the
3671 // "gen_ai.prompt" semantic conventions. It represents the full prompt sent to
3672 // an LLM.
3673 func GenAiPrompt(val string) attribute.KeyValue {
3674 return GenAiPromptKey.String(val)
3675 }
3676
3677 // GenAiRequestMaxTokens returns an attribute KeyValue conforming to the
3678 // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
3679 // number of tokens the LLM generates for a request.
3680 func GenAiRequestMaxTokens(val int) attribute.KeyValue {
3681 return GenAiRequestMaxTokensKey.Int(val)
3682 }
3683
3684 // GenAiRequestModel returns an attribute KeyValue conforming to the
3685 // "gen_ai.request.model" semantic conventions. It represents the name of the
3686 // LLM a request is being made to.
3687 func GenAiRequestModel(val string) attribute.KeyValue {
3688 return GenAiRequestModelKey.String(val)
3689 }
3690
3691 // GenAiRequestTemperature returns an attribute KeyValue conforming to the
3692 // "gen_ai.request.temperature" semantic conventions. It represents the
3693 // temperature setting for the LLM request.
3694 func GenAiRequestTemperature(val float64) attribute.KeyValue {
3695 return GenAiRequestTemperatureKey.Float64(val)
3696 }
3697
3698 // GenAiRequestTopP returns an attribute KeyValue conforming to the
3699 // "gen_ai.request.top_p" semantic conventions. It represents the top_p
3700 // sampling setting for the LLM request.
3701 func GenAiRequestTopP(val float64) attribute.KeyValue {
3702 return GenAiRequestTopPKey.Float64(val)
3703 }
3704
3705 // GenAiResponseFinishReasons returns an attribute KeyValue conforming to
3706 // the "gen_ai.response.finish_reasons" semantic conventions. It represents the
3707 // array of reasons the model stopped generating tokens, corresponding to each
3708 // generation received.
3709 func GenAiResponseFinishReasons(val ...string) attribute.KeyValue {
3710 return GenAiResponseFinishReasonsKey.StringSlice(val)
3711 }
3712
3713 // GenAiResponseID returns an attribute KeyValue conforming to the
3714 // "gen_ai.response.id" semantic conventions. It represents the unique
3715 // identifier for the completion.
3716 func GenAiResponseID(val string) attribute.KeyValue {
3717 return GenAiResponseIDKey.String(val)
3718 }
3719
3720 // GenAiResponseModel returns an attribute KeyValue conforming to the
3721 // "gen_ai.response.model" semantic conventions. It represents the name of the
3722 // LLM a response was generated from.
3723 func GenAiResponseModel(val string) attribute.KeyValue {
3724 return GenAiResponseModelKey.String(val)
3725 }
3726
3727 // GenAiUsageCompletionTokens returns an attribute KeyValue conforming to
3728 // the "gen_ai.usage.completion_tokens" semantic conventions. It represents the
3729 // number of tokens used in the LLM response (completion).
3730 func GenAiUsageCompletionTokens(val int) attribute.KeyValue {
3731 return GenAiUsageCompletionTokensKey.Int(val)
3732 }
3733
3734 // GenAiUsagePromptTokens returns an attribute KeyValue conforming to the
3735 // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the number
3736 // of tokens used in the LLM prompt.
3737 func GenAiUsagePromptTokens(val int) attribute.KeyValue {
3738 return GenAiUsagePromptTokensKey.Int(val)
3739 }
3740
3741 // Attributes for GraphQL.
3742 const (
3743 // GraphqlDocumentKey is the attribute Key conforming to the
3744 // "graphql.document" semantic conventions. It represents the GraphQL
3745 // document being executed.
3746 //
3747 // Type: string
3748 // RequirementLevel: Optional
3749 // Stability: experimental
3750 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
3751 // Note: The value may be sanitized to exclude sensitive information.
3752 GraphqlDocumentKey = attribute.Key("graphql.document")
3753
3754 // GraphqlOperationNameKey is the attribute Key conforming to the
3755 // "graphql.operation.name" semantic conventions. It represents the name of
3756 // the operation being executed.
3757 //
3758 // Type: string
3759 // RequirementLevel: Optional
3760 // Stability: experimental
3761 // Examples: 'findBookByID'
3762 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
3763
3764 // GraphqlOperationTypeKey is the attribute Key conforming to the
3765 // "graphql.operation.type" semantic conventions. It represents the type of
3766 // the operation being executed.
3767 //
3768 // Type: Enum
3769 // RequirementLevel: Optional
3770 // Stability: experimental
3771 // Examples: 'query', 'mutation', 'subscription'
3772 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
3773 )
3774
3775 var (
3776 // GraphQL query
3777 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
3778 // GraphQL mutation
3779 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
3780 // GraphQL subscription
3781 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
3782 )
3783
3784 // GraphqlDocument returns an attribute KeyValue conforming to the
3785 // "graphql.document" semantic conventions. It represents the GraphQL document
3786 // being executed.
3787 func GraphqlDocument(val string) attribute.KeyValue {
3788 return GraphqlDocumentKey.String(val)
3789 }
3790
3791 // GraphqlOperationName returns an attribute KeyValue conforming to the
3792 // "graphql.operation.name" semantic conventions. It represents the name of the
3793 // operation being executed.
3794 func GraphqlOperationName(val string) attribute.KeyValue {
3795 return GraphqlOperationNameKey.String(val)
3796 }
3797
3798 // Attributes for the Android platform on which the Android application is
3799 // running.
3800 const (
3801 // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
3802 // semantic conventions. It represents the unique identifier for the
3803 // application
3804 //
3805 // Type: string
3806 // RequirementLevel: Optional
3807 // Stability: experimental
3808 // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
3809 HerokuAppIDKey = attribute.Key("heroku.app.id")
3810
3811 // HerokuReleaseCommitKey is the attribute Key conforming to the
3812 // "heroku.release.commit" semantic conventions. It represents the commit
3813 // hash for the current release
3814 //
3815 // Type: string
3816 // RequirementLevel: Optional
3817 // Stability: experimental
3818 // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
3819 HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
3820
3821 // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
3822 // "heroku.release.creation_timestamp" semantic conventions. It represents
3823 // the time and date the release was created
3824 //
3825 // Type: string
3826 // RequirementLevel: Optional
3827 // Stability: experimental
3828 // Examples: '2022-10-23T18:00:42Z'
3829 HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
3830 )
3831
3832 // HerokuAppID returns an attribute KeyValue conforming to the
3833 // "heroku.app.id" semantic conventions. It represents the unique identifier
3834 // for the application
3835 func HerokuAppID(val string) attribute.KeyValue {
3836 return HerokuAppIDKey.String(val)
3837 }
3838
3839 // HerokuReleaseCommit returns an attribute KeyValue conforming to the
3840 // "heroku.release.commit" semantic conventions. It represents the commit hash
3841 // for the current release
3842 func HerokuReleaseCommit(val string) attribute.KeyValue {
3843 return HerokuReleaseCommitKey.String(val)
3844 }
3845
3846 // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
3847 // to the "heroku.release.creation_timestamp" semantic conventions. It
3848 // represents the time and date the release was created
3849 func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
3850 return HerokuReleaseCreationTimestampKey.String(val)
3851 }
3852
3853 // A host is defined as a computing instance. For example, physical servers,
3854 // virtual machines, switches or disk array.
3855 const (
3856 // HostArchKey is the attribute Key conforming to the "host.arch" semantic
3857 // conventions. It represents the CPU architecture the host system is
3858 // running on.
3859 //
3860 // Type: Enum
3861 // RequirementLevel: Optional
3862 // Stability: experimental
3863 HostArchKey = attribute.Key("host.arch")
3864
3865 // HostCPUCacheL2SizeKey is the attribute Key conforming to the
3866 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount
3867 // of level 2 memory cache available to the processor (in Bytes).
3868 //
3869 // Type: int
3870 // RequirementLevel: Optional
3871 // Stability: experimental
3872 // Examples: 12288000
3873 HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
3874
3875 // HostCPUFamilyKey is the attribute Key conforming to the
3876 // "host.cpu.family" semantic conventions. It represents the family or
3877 // generation of the CPU.
3878 //
3879 // Type: string
3880 // RequirementLevel: Optional
3881 // Stability: experimental
3882 // Examples: '6', 'PA-RISC 1.1e'
3883 HostCPUFamilyKey = attribute.Key("host.cpu.family")
3884
3885 // HostCPUModelIDKey is the attribute Key conforming to the
3886 // "host.cpu.model.id" semantic conventions. It represents the model
3887 // identifier. It provides more granular information about the CPU,
3888 // distinguishing it from other CPUs within the same family.
3889 //
3890 // Type: string
3891 // RequirementLevel: Optional
3892 // Stability: experimental
3893 // Examples: '6', '9000/778/B180L'
3894 HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
3895
3896 // HostCPUModelNameKey is the attribute Key conforming to the
3897 // "host.cpu.model.name" semantic conventions. It represents the model
3898 // designation of the processor.
3899 //
3900 // Type: string
3901 // RequirementLevel: Optional
3902 // Stability: experimental
3903 // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
3904 HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
3905
3906 // HostCPUSteppingKey is the attribute Key conforming to the
3907 // "host.cpu.stepping" semantic conventions. It represents the stepping or
3908 // core revisions.
3909 //
3910 // Type: string
3911 // RequirementLevel: Optional
3912 // Stability: experimental
3913 // Examples: '1', 'r1p1'
3914 HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
3915
3916 // HostCPUVendorIDKey is the attribute Key conforming to the
3917 // "host.cpu.vendor.id" semantic conventions. It represents the processor
3918 // manufacturer identifier. A maximum 12-character string.
3919 //
3920 // Type: string
3921 // RequirementLevel: Optional
3922 // Stability: experimental
3923 // Examples: 'GenuineIntel'
3924 // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
3925 // ID string in EBX, EDX and ECX registers. Writing these to memory in this
3926 // order results in a 12-character string.
3927 HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
3928
3929 // HostIDKey is the attribute Key conforming to the "host.id" semantic
3930 // conventions. It represents the unique host ID. For Cloud, this must be
3931 // the instance_id assigned by the cloud provider. For non-containerized
3932 // systems, this should be the `machine-id`. See the table below for the
3933 // sources to use to determine the `machine-id` based on operating system.
3934 //
3935 // Type: string
3936 // RequirementLevel: Optional
3937 // Stability: experimental
3938 // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
3939 HostIDKey = attribute.Key("host.id")
3940
3941 // HostImageIDKey is the attribute Key conforming to the "host.image.id"
3942 // semantic conventions. It represents the vM image ID or host OS image ID.
3943 // For Cloud, this value is from the provider.
3944 //
3945 // Type: string
3946 // RequirementLevel: Optional
3947 // Stability: experimental
3948 // Examples: 'ami-07b06b442921831e5'
3949 HostImageIDKey = attribute.Key("host.image.id")
3950
3951 // HostImageNameKey is the attribute Key conforming to the
3952 // "host.image.name" semantic conventions. It represents the name of the VM
3953 // image or OS install the host was instantiated from.
3954 //
3955 // Type: string
3956 // RequirementLevel: Optional
3957 // Stability: experimental
3958 // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
3959 HostImageNameKey = attribute.Key("host.image.name")
3960
3961 // HostImageVersionKey is the attribute Key conforming to the
3962 // "host.image.version" semantic conventions. It represents the version
3963 // string of the VM image or host OS as defined in [Version
3964 // Attributes](/docs/resource/README.md#version-attributes).
3965 //
3966 // Type: string
3967 // RequirementLevel: Optional
3968 // Stability: experimental
3969 // Examples: '0.1'
3970 HostImageVersionKey = attribute.Key("host.image.version")
3971
3972 // HostIPKey is the attribute Key conforming to the "host.ip" semantic
3973 // conventions. It represents the available IP addresses of the host,
3974 // excluding loopback interfaces.
3975 //
3976 // Type: string[]
3977 // RequirementLevel: Optional
3978 // Stability: experimental
3979 // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
3980 // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
3981 // addresses MUST be specified in the [RFC
3982 // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
3983 HostIPKey = attribute.Key("host.ip")
3984
3985 // HostMacKey is the attribute Key conforming to the "host.mac" semantic
3986 // conventions. It represents the available MAC addresses of the host,
3987 // excluding loopback interfaces.
3988 //
3989 // Type: string[]
3990 // RequirementLevel: Optional
3991 // Stability: experimental
3992 // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
3993 // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
3994 // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
3995 // as hyphen-separated octets in uppercase hexadecimal form from most to
3996 // least significant.
3997 HostMacKey = attribute.Key("host.mac")
3998
3999 // HostNameKey is the attribute Key conforming to the "host.name" semantic
4000 // conventions. It represents the name of the host. On Unix systems, it may
4001 // contain what the hostname command returns, or the fully qualified
4002 // hostname, or another name specified by the user.
4003 //
4004 // Type: string
4005 // RequirementLevel: Optional
4006 // Stability: experimental
4007 // Examples: 'opentelemetry-test'
4008 HostNameKey = attribute.Key("host.name")
4009
4010 // HostTypeKey is the attribute Key conforming to the "host.type" semantic
4011 // conventions. It represents the type of host. For Cloud, this must be the
4012 // machine type.
4013 //
4014 // Type: string
4015 // RequirementLevel: Optional
4016 // Stability: experimental
4017 // Examples: 'n1-standard-1'
4018 HostTypeKey = attribute.Key("host.type")
4019 )
4020
4021 var (
4022 // AMD64
4023 HostArchAMD64 = HostArchKey.String("amd64")
4024 // ARM32
4025 HostArchARM32 = HostArchKey.String("arm32")
4026 // ARM64
4027 HostArchARM64 = HostArchKey.String("arm64")
4028 // Itanium
4029 HostArchIA64 = HostArchKey.String("ia64")
4030 // 32-bit PowerPC
4031 HostArchPPC32 = HostArchKey.String("ppc32")
4032 // 64-bit PowerPC
4033 HostArchPPC64 = HostArchKey.String("ppc64")
4034 // IBM z/Architecture
4035 HostArchS390x = HostArchKey.String("s390x")
4036 // 32-bit x86
4037 HostArchX86 = HostArchKey.String("x86")
4038 )
4039
4040 // HostCPUCacheL2Size returns an attribute KeyValue conforming to the
4041 // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
4042 // level 2 memory cache available to the processor (in Bytes).
4043 func HostCPUCacheL2Size(val int) attribute.KeyValue {
4044 return HostCPUCacheL2SizeKey.Int(val)
4045 }
4046
4047 // HostCPUFamily returns an attribute KeyValue conforming to the
4048 // "host.cpu.family" semantic conventions. It represents the family or
4049 // generation of the CPU.
4050 func HostCPUFamily(val string) attribute.KeyValue {
4051 return HostCPUFamilyKey.String(val)
4052 }
4053
4054 // HostCPUModelID returns an attribute KeyValue conforming to the
4055 // "host.cpu.model.id" semantic conventions. It represents the model
4056 // identifier. It provides more granular information about the CPU,
4057 // distinguishing it from other CPUs within the same family.
4058 func HostCPUModelID(val string) attribute.KeyValue {
4059 return HostCPUModelIDKey.String(val)
4060 }
4061
4062 // HostCPUModelName returns an attribute KeyValue conforming to the
4063 // "host.cpu.model.name" semantic conventions. It represents the model
4064 // designation of the processor.
4065 func HostCPUModelName(val string) attribute.KeyValue {
4066 return HostCPUModelNameKey.String(val)
4067 }
4068
4069 // HostCPUStepping returns an attribute KeyValue conforming to the
4070 // "host.cpu.stepping" semantic conventions. It represents the stepping or core
4071 // revisions.
4072 func HostCPUStepping(val string) attribute.KeyValue {
4073 return HostCPUSteppingKey.String(val)
4074 }
4075
4076 // HostCPUVendorID returns an attribute KeyValue conforming to the
4077 // "host.cpu.vendor.id" semantic conventions. It represents the processor
4078 // manufacturer identifier. A maximum 12-character string.
4079 func HostCPUVendorID(val string) attribute.KeyValue {
4080 return HostCPUVendorIDKey.String(val)
4081 }
4082
4083 // HostID returns an attribute KeyValue conforming to the "host.id" semantic
4084 // conventions. It represents the unique host ID. For Cloud, this must be the
4085 // instance_id assigned by the cloud provider. For non-containerized systems,
4086 // this should be the `machine-id`. See the table below for the sources to use
4087 // to determine the `machine-id` based on operating system.
4088 func HostID(val string) attribute.KeyValue {
4089 return HostIDKey.String(val)
4090 }
4091
4092 // HostImageID returns an attribute KeyValue conforming to the
4093 // "host.image.id" semantic conventions. It represents the vM image ID or host
4094 // OS image ID. For Cloud, this value is from the provider.
4095 func HostImageID(val string) attribute.KeyValue {
4096 return HostImageIDKey.String(val)
4097 }
4098
4099 // HostImageName returns an attribute KeyValue conforming to the
4100 // "host.image.name" semantic conventions. It represents the name of the VM
4101 // image or OS install the host was instantiated from.
4102 func HostImageName(val string) attribute.KeyValue {
4103 return HostImageNameKey.String(val)
4104 }
4105
4106 // HostImageVersion returns an attribute KeyValue conforming to the
4107 // "host.image.version" semantic conventions. It represents the version string
4108 // of the VM image or host OS as defined in [Version
4109 // Attributes](/docs/resource/README.md#version-attributes).
4110 func HostImageVersion(val string) attribute.KeyValue {
4111 return HostImageVersionKey.String(val)
4112 }
4113
4114 // HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
4115 // conventions. It represents the available IP addresses of the host, excluding
4116 // loopback interfaces.
4117 func HostIP(val ...string) attribute.KeyValue {
4118 return HostIPKey.StringSlice(val)
4119 }
4120
4121 // HostMac returns an attribute KeyValue conforming to the "host.mac"
4122 // semantic conventions. It represents the available MAC addresses of the host,
4123 // excluding loopback interfaces.
4124 func HostMac(val ...string) attribute.KeyValue {
4125 return HostMacKey.StringSlice(val)
4126 }
4127
4128 // HostName returns an attribute KeyValue conforming to the "host.name"
4129 // semantic conventions. It represents the name of the host. On Unix systems,
4130 // it may contain what the hostname command returns, or the fully qualified
4131 // hostname, or another name specified by the user.
4132 func HostName(val string) attribute.KeyValue {
4133 return HostNameKey.String(val)
4134 }
4135
4136 // HostType returns an attribute KeyValue conforming to the "host.type"
4137 // semantic conventions. It represents the type of host. For Cloud, this must
4138 // be the machine type.
4139 func HostType(val string) attribute.KeyValue {
4140 return HostTypeKey.String(val)
4141 }
4142
4143 // Semantic convention attributes in the HTTP namespace.
4144 const (
4145 // HTTPConnectionStateKey is the attribute Key conforming to the
4146 // "http.connection.state" semantic conventions. It represents the state of
4147 // the HTTP connection in the HTTP connection pool.
4148 //
4149 // Type: Enum
4150 // RequirementLevel: Optional
4151 // Stability: experimental
4152 // Examples: 'active', 'idle'
4153 HTTPConnectionStateKey = attribute.Key("http.connection.state")
4154
4155 // HTTPRequestBodySizeKey is the attribute Key conforming to the
4156 // "http.request.body.size" semantic conventions. It represents the size of
4157 // the request payload body in bytes. This is the number of bytes
4158 // transferred excluding headers and is often, but not always, present as
4159 // the
4160 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4161 // header. For requests using transport encoding, this should be the
4162 // compressed size.
4163 //
4164 // Type: int
4165 // RequirementLevel: Optional
4166 // Stability: experimental
4167 // Examples: 3495
4168 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
4169
4170 // HTTPRequestMethodKey is the attribute Key conforming to the
4171 // "http.request.method" semantic conventions. It represents the hTTP
4172 // request method.
4173 //
4174 // Type: Enum
4175 // RequirementLevel: Optional
4176 // Stability: stable
4177 // Examples: 'GET', 'POST', 'HEAD'
4178 // Note: HTTP request method value SHOULD be "known" to the
4179 // instrumentation.
4180 // By default, this convention defines "known" methods as the ones listed
4181 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
4182 // and the PATCH method defined in
4183 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
4184 //
4185 // If the HTTP request method is not known to instrumentation, it MUST set
4186 // the `http.request.method` attribute to `_OTHER`.
4187 //
4188 // If the HTTP instrumentation could end up converting valid HTTP request
4189 // methods to `_OTHER`, then it MUST provide a way to override
4190 // the list of known HTTP methods. If this override is done via environment
4191 // variable, then the environment variable MUST be named
4192 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
4193 // list of case-sensitive known HTTP methods
4194 // (this list MUST be a full override of the default known method, it is
4195 // not a list of known methods in addition to the defaults).
4196 //
4197 // HTTP method names are case-sensitive and `http.request.method` attribute
4198 // value MUST match a known HTTP method name exactly.
4199 // Instrumentations for specific web frameworks that consider HTTP methods
4200 // to be case insensitive, SHOULD populate a canonical equivalent.
4201 // Tracing instrumentations that do so, MUST also set
4202 // `http.request.method_original` to the original value.
4203 HTTPRequestMethodKey = attribute.Key("http.request.method")
4204
4205 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
4206 // "http.request.method_original" semantic conventions. It represents the
4207 // original HTTP method sent by the client in the request line.
4208 //
4209 // Type: string
4210 // RequirementLevel: Optional
4211 // Stability: stable
4212 // Examples: 'GeT', 'ACL', 'foo'
4213 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
4214
4215 // HTTPRequestResendCountKey is the attribute Key conforming to the
4216 // "http.request.resend_count" semantic conventions. It represents the
4217 // ordinal number of request resending attempt (for any reason, including
4218 // redirects).
4219 //
4220 // Type: int
4221 // RequirementLevel: Optional
4222 // Stability: stable
4223 // Examples: 3
4224 // Note: The resend count SHOULD be updated each time an HTTP request gets
4225 // resent by the client, regardless of what was the cause of the resending
4226 // (e.g. redirection, authorization failure, 503 Server Unavailable,
4227 // network issues, or any other).
4228 HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
4229
4230 // HTTPRequestSizeKey is the attribute Key conforming to the
4231 // "http.request.size" semantic conventions. It represents the total size
4232 // of the request in bytes. This should be the total number of bytes sent
4233 // over the wire, including the request line (HTTP/1.1), framing (HTTP/2
4234 // and HTTP/3), headers, and request body if any.
4235 //
4236 // Type: int
4237 // RequirementLevel: Optional
4238 // Stability: experimental
4239 // Examples: 1437
4240 HTTPRequestSizeKey = attribute.Key("http.request.size")
4241
4242 // HTTPResponseBodySizeKey is the attribute Key conforming to the
4243 // "http.response.body.size" semantic conventions. It represents the size
4244 // of the response payload body in bytes. This is the number of bytes
4245 // transferred excluding headers and is often, but not always, present as
4246 // the
4247 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4248 // header. For requests using transport encoding, this should be the
4249 // compressed size.
4250 //
4251 // Type: int
4252 // RequirementLevel: Optional
4253 // Stability: experimental
4254 // Examples: 3495
4255 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
4256
4257 // HTTPResponseSizeKey is the attribute Key conforming to the
4258 // "http.response.size" semantic conventions. It represents the total size
4259 // of the response in bytes. This should be the total number of bytes sent
4260 // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and
4261 // HTTP/3), headers, and response body and trailers if any.
4262 //
4263 // Type: int
4264 // RequirementLevel: Optional
4265 // Stability: experimental
4266 // Examples: 1437
4267 HTTPResponseSizeKey = attribute.Key("http.response.size")
4268
4269 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
4270 // "http.response.status_code" semantic conventions. It represents the
4271 // [HTTP response status
4272 // code](https://tools.ietf.org/html/rfc7231#section-6).
4273 //
4274 // Type: int
4275 // RequirementLevel: Optional
4276 // Stability: stable
4277 // Examples: 200
4278 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
4279
4280 // HTTPRouteKey is the attribute Key conforming to the "http.route"
4281 // semantic conventions. It represents the matched route, that is, the path
4282 // template in the format used by the respective server framework.
4283 //
4284 // Type: string
4285 // RequirementLevel: Optional
4286 // Stability: stable
4287 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
4288 // Note: MUST NOT be populated when this is not supported by the HTTP
4289 // server framework as the route attribute should have low-cardinality and
4290 // the URI path can NOT substitute it.
4291 // SHOULD include the [application
4292 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
4293 HTTPRouteKey = attribute.Key("http.route")
4294 )
4295
4296 var (
4297 // active state
4298 HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
4299 // idle state
4300 HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
4301 )
4302
4303 var (
4304 // CONNECT method
4305 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
4306 // DELETE method
4307 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
4308 // GET method
4309 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
4310 // HEAD method
4311 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
4312 // OPTIONS method
4313 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
4314 // PATCH method
4315 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
4316 // POST method
4317 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
4318 // PUT method
4319 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
4320 // TRACE method
4321 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
4322 // Any HTTP method that the instrumentation has no prior knowledge of
4323 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
4324 )
4325
4326 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
4327 // "http.request.body.size" semantic conventions. It represents the size of the
4328 // request payload body in bytes. This is the number of bytes transferred
4329 // excluding headers and is often, but not always, present as the
4330 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4331 // header. For requests using transport encoding, this should be the compressed
4332 // size.
4333 func HTTPRequestBodySize(val int) attribute.KeyValue {
4334 return HTTPRequestBodySizeKey.Int(val)
4335 }
4336
4337 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
4338 // "http.request.method_original" semantic conventions. It represents the
4339 // original HTTP method sent by the client in the request line.
4340 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
4341 return HTTPRequestMethodOriginalKey.String(val)
4342 }
4343
4344 // HTTPRequestResendCount returns an attribute KeyValue conforming to the
4345 // "http.request.resend_count" semantic conventions. It represents the ordinal
4346 // number of request resending attempt (for any reason, including redirects).
4347 func HTTPRequestResendCount(val int) attribute.KeyValue {
4348 return HTTPRequestResendCountKey.Int(val)
4349 }
4350
4351 // HTTPRequestSize returns an attribute KeyValue conforming to the
4352 // "http.request.size" semantic conventions. It represents the total size of
4353 // the request in bytes. This should be the total number of bytes sent over the
4354 // wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
4355 // headers, and request body if any.
4356 func HTTPRequestSize(val int) attribute.KeyValue {
4357 return HTTPRequestSizeKey.Int(val)
4358 }
4359
4360 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
4361 // "http.response.body.size" semantic conventions. It represents the size of
4362 // the response payload body in bytes. This is the number of bytes transferred
4363 // excluding headers and is often, but not always, present as the
4364 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
4365 // header. For requests using transport encoding, this should be the compressed
4366 // size.
4367 func HTTPResponseBodySize(val int) attribute.KeyValue {
4368 return HTTPResponseBodySizeKey.Int(val)
4369 }
4370
4371 // HTTPResponseSize returns an attribute KeyValue conforming to the
4372 // "http.response.size" semantic conventions. It represents the total size of
4373 // the response in bytes. This should be the total number of bytes sent over
4374 // the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
4375 // headers, and response body and trailers if any.
4376 func HTTPResponseSize(val int) attribute.KeyValue {
4377 return HTTPResponseSizeKey.Int(val)
4378 }
4379
4380 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
4381 // "http.response.status_code" semantic conventions. It represents the [HTTP
4382 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
4383 func HTTPResponseStatusCode(val int) attribute.KeyValue {
4384 return HTTPResponseStatusCodeKey.Int(val)
4385 }
4386
4387 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
4388 // semantic conventions. It represents the matched route, that is, the path
4389 // template in the format used by the respective server framework.
4390 func HTTPRoute(val string) attribute.KeyValue {
4391 return HTTPRouteKey.String(val)
4392 }
4393
4394 // Java Virtual machine related attributes.
4395 const (
4396 // JvmBufferPoolNameKey is the attribute Key conforming to the
4397 // "jvm.buffer.pool.name" semantic conventions. It represents the name of
4398 // the buffer pool.
4399 //
4400 // Type: string
4401 // RequirementLevel: Optional
4402 // Stability: experimental
4403 // Examples: 'mapped', 'direct'
4404 // Note: Pool names are generally obtained via
4405 // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
4406 JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
4407
4408 // JvmGcActionKey is the attribute Key conforming to the "jvm.gc.action"
4409 // semantic conventions. It represents the name of the garbage collector
4410 // action.
4411 //
4412 // Type: string
4413 // RequirementLevel: Optional
4414 // Stability: stable
4415 // Examples: 'end of minor GC', 'end of major GC'
4416 // Note: Garbage collector action is generally obtained via
4417 // [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
4418 JvmGcActionKey = attribute.Key("jvm.gc.action")
4419
4420 // JvmGcNameKey is the attribute Key conforming to the "jvm.gc.name"
4421 // semantic conventions. It represents the name of the garbage collector.
4422 //
4423 // Type: string
4424 // RequirementLevel: Optional
4425 // Stability: stable
4426 // Examples: 'G1 Young Generation', 'G1 Old Generation'
4427 // Note: Garbage collector name is generally obtained via
4428 // [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).
4429 JvmGcNameKey = attribute.Key("jvm.gc.name")
4430
4431 // JvmMemoryPoolNameKey is the attribute Key conforming to the
4432 // "jvm.memory.pool.name" semantic conventions. It represents the name of
4433 // the memory pool.
4434 //
4435 // Type: string
4436 // RequirementLevel: Optional
4437 // Stability: stable
4438 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
4439 // Note: Pool names are generally obtained via
4440 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
4441 JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
4442
4443 // JvmMemoryTypeKey is the attribute Key conforming to the
4444 // "jvm.memory.type" semantic conventions. It represents the type of
4445 // memory.
4446 //
4447 // Type: Enum
4448 // RequirementLevel: Optional
4449 // Stability: stable
4450 // Examples: 'heap', 'non_heap'
4451 JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
4452
4453 // JvmThreadDaemonKey is the attribute Key conforming to the
4454 // "jvm.thread.daemon" semantic conventions. It represents the whether the
4455 // thread is daemon or not.
4456 //
4457 // Type: boolean
4458 // RequirementLevel: Optional
4459 // Stability: stable
4460 JvmThreadDaemonKey = attribute.Key("jvm.thread.daemon")
4461
4462 // JvmThreadStateKey is the attribute Key conforming to the
4463 // "jvm.thread.state" semantic conventions. It represents the state of the
4464 // thread.
4465 //
4466 // Type: Enum
4467 // RequirementLevel: Optional
4468 // Stability: stable
4469 // Examples: 'runnable', 'blocked'
4470 JvmThreadStateKey = attribute.Key("jvm.thread.state")
4471 )
4472
4473 var (
4474 // Heap memory
4475 JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
4476 // Non-heap memory
4477 JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
4478 )
4479
4480 var (
4481 // A thread that has not yet started is in this state
4482 JvmThreadStateNew = JvmThreadStateKey.String("new")
4483 // A thread executing in the Java virtual machine is in this state
4484 JvmThreadStateRunnable = JvmThreadStateKey.String("runnable")
4485 // A thread that is blocked waiting for a monitor lock is in this state
4486 JvmThreadStateBlocked = JvmThreadStateKey.String("blocked")
4487 // A thread that is waiting indefinitely for another thread to perform a particular action is in this state
4488 JvmThreadStateWaiting = JvmThreadStateKey.String("waiting")
4489 // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state
4490 JvmThreadStateTimedWaiting = JvmThreadStateKey.String("timed_waiting")
4491 // A thread that has exited is in this state
4492 JvmThreadStateTerminated = JvmThreadStateKey.String("terminated")
4493 )
4494
4495 // JvmBufferPoolName returns an attribute KeyValue conforming to the
4496 // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
4497 // buffer pool.
4498 func JvmBufferPoolName(val string) attribute.KeyValue {
4499 return JvmBufferPoolNameKey.String(val)
4500 }
4501
4502 // JvmGcAction returns an attribute KeyValue conforming to the
4503 // "jvm.gc.action" semantic conventions. It represents the name of the garbage
4504 // collector action.
4505 func JvmGcAction(val string) attribute.KeyValue {
4506 return JvmGcActionKey.String(val)
4507 }
4508
4509 // JvmGcName returns an attribute KeyValue conforming to the "jvm.gc.name"
4510 // semantic conventions. It represents the name of the garbage collector.
4511 func JvmGcName(val string) attribute.KeyValue {
4512 return JvmGcNameKey.String(val)
4513 }
4514
4515 // JvmMemoryPoolName returns an attribute KeyValue conforming to the
4516 // "jvm.memory.pool.name" semantic conventions. It represents the name of the
4517 // memory pool.
4518 func JvmMemoryPoolName(val string) attribute.KeyValue {
4519 return JvmMemoryPoolNameKey.String(val)
4520 }
4521
4522 // JvmThreadDaemon returns an attribute KeyValue conforming to the
4523 // "jvm.thread.daemon" semantic conventions. It represents the whether the
4524 // thread is daemon or not.
4525 func JvmThreadDaemon(val bool) attribute.KeyValue {
4526 return JvmThreadDaemonKey.Bool(val)
4527 }
4528
4529 // Kubernetes resource attributes.
4530 const (
4531 // K8SClusterNameKey is the attribute Key conforming to the
4532 // "k8s.cluster.name" semantic conventions. It represents the name of the
4533 // cluster.
4534 //
4535 // Type: string
4536 // RequirementLevel: Optional
4537 // Stability: experimental
4538 // Examples: 'opentelemetry-cluster'
4539 K8SClusterNameKey = attribute.Key("k8s.cluster.name")
4540
4541 // K8SClusterUIDKey is the attribute Key conforming to the
4542 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
4543 // the cluster, set to the UID of the `kube-system` namespace.
4544 //
4545 // Type: string
4546 // RequirementLevel: Optional
4547 // Stability: experimental
4548 // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
4549 // Note: K8S doesn't have support for obtaining a cluster ID. If this is
4550 // ever
4551 // added, we will recommend collecting the `k8s.cluster.uid` through the
4552 // official APIs. In the meantime, we are able to use the `uid` of the
4553 // `kube-system` namespace as a proxy for cluster ID. Read on for the
4554 // rationale.
4555 //
4556 // Every object created in a K8S cluster is assigned a distinct UID. The
4557 // `kube-system` namespace is used by Kubernetes itself and will exist
4558 // for the lifetime of the cluster. Using the `uid` of the `kube-system`
4559 // namespace is a reasonable proxy for the K8S ClusterID as it will only
4560 // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
4561 // UUIDs as standardized by
4562 // [ISO/IEC 9834-8 and ITU-T
4563 // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
4564 // Which states:
4565 //
4566 // > If generated according to one of the mechanisms defined in Rec.
4567 // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
4568 // different from all other UUIDs generated before 3603 A.D., or is
4569 // extremely likely to be different (depending on the mechanism chosen).
4570 //
4571 // Therefore, UIDs between clusters should be extremely unlikely to
4572 // conflict.
4573 K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
4574
4575 // K8SContainerNameKey is the attribute Key conforming to the
4576 // "k8s.container.name" semantic conventions. It represents the name of the
4577 // Container from Pod specification, must be unique within a Pod. Container
4578 // runtime usually uses different globally unique name (`container.name`).
4579 //
4580 // Type: string
4581 // RequirementLevel: Optional
4582 // Stability: experimental
4583 // Examples: 'redis'
4584 K8SContainerNameKey = attribute.Key("k8s.container.name")
4585
4586 // K8SContainerRestartCountKey is the attribute Key conforming to the
4587 // "k8s.container.restart_count" semantic conventions. It represents the
4588 // number of times the container was restarted. This attribute can be used
4589 // to identify a particular container (running or stopped) within a
4590 // container spec.
4591 //
4592 // Type: int
4593 // RequirementLevel: Optional
4594 // Stability: experimental
4595 K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
4596
4597 // K8SContainerStatusLastTerminatedReasonKey is the attribute Key
4598 // conforming to the "k8s.container.status.last_terminated_reason" semantic
4599 // conventions. It represents the last terminated reason of the Container.
4600 //
4601 // Type: string
4602 // RequirementLevel: Optional
4603 // Stability: experimental
4604 // Examples: 'Evicted', 'Error'
4605 K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
4606
4607 // K8SCronJobNameKey is the attribute Key conforming to the
4608 // "k8s.cronjob.name" semantic conventions. It represents the name of the
4609 // CronJob.
4610 //
4611 // Type: string
4612 // RequirementLevel: Optional
4613 // Stability: experimental
4614 // Examples: 'opentelemetry'
4615 K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
4616
4617 // K8SCronJobUIDKey is the attribute Key conforming to the
4618 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
4619 // CronJob.
4620 //
4621 // Type: string
4622 // RequirementLevel: Optional
4623 // Stability: experimental
4624 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4625 K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
4626
4627 // K8SDaemonSetNameKey is the attribute Key conforming to the
4628 // "k8s.daemonset.name" semantic conventions. It represents the name of the
4629 // DaemonSet.
4630 //
4631 // Type: string
4632 // RequirementLevel: Optional
4633 // Stability: experimental
4634 // Examples: 'opentelemetry'
4635 K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
4636
4637 // K8SDaemonSetUIDKey is the attribute Key conforming to the
4638 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
4639 // DaemonSet.
4640 //
4641 // Type: string
4642 // RequirementLevel: Optional
4643 // Stability: experimental
4644 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4645 K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
4646
4647 // K8SDeploymentNameKey is the attribute Key conforming to the
4648 // "k8s.deployment.name" semantic conventions. It represents the name of
4649 // the Deployment.
4650 //
4651 // Type: string
4652 // RequirementLevel: Optional
4653 // Stability: experimental
4654 // Examples: 'opentelemetry'
4655 K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
4656
4657 // K8SDeploymentUIDKey is the attribute Key conforming to the
4658 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
4659 // Deployment.
4660 //
4661 // Type: string
4662 // RequirementLevel: Optional
4663 // Stability: experimental
4664 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4665 K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
4666
4667 // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
4668 // semantic conventions. It represents the name of the Job.
4669 //
4670 // Type: string
4671 // RequirementLevel: Optional
4672 // Stability: experimental
4673 // Examples: 'opentelemetry'
4674 K8SJobNameKey = attribute.Key("k8s.job.name")
4675
4676 // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
4677 // semantic conventions. It represents the UID of the Job.
4678 //
4679 // Type: string
4680 // RequirementLevel: Optional
4681 // Stability: experimental
4682 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4683 K8SJobUIDKey = attribute.Key("k8s.job.uid")
4684
4685 // K8SNamespaceNameKey is the attribute Key conforming to the
4686 // "k8s.namespace.name" semantic conventions. It represents the name of the
4687 // namespace that the pod is running in.
4688 //
4689 // Type: string
4690 // RequirementLevel: Optional
4691 // Stability: experimental
4692 // Examples: 'default'
4693 K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
4694
4695 // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
4696 // semantic conventions. It represents the name of the Node.
4697 //
4698 // Type: string
4699 // RequirementLevel: Optional
4700 // Stability: experimental
4701 // Examples: 'node-1'
4702 K8SNodeNameKey = attribute.Key("k8s.node.name")
4703
4704 // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
4705 // semantic conventions. It represents the UID of the Node.
4706 //
4707 // Type: string
4708 // RequirementLevel: Optional
4709 // Stability: experimental
4710 // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
4711 K8SNodeUIDKey = attribute.Key("k8s.node.uid")
4712
4713 // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
4714 // semantic conventions. It represents the name of the Pod.
4715 //
4716 // Type: string
4717 // RequirementLevel: Optional
4718 // Stability: experimental
4719 // Examples: 'opentelemetry-pod-autoconf'
4720 K8SPodNameKey = attribute.Key("k8s.pod.name")
4721
4722 // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
4723 // semantic conventions. It represents the UID of the Pod.
4724 //
4725 // Type: string
4726 // RequirementLevel: Optional
4727 // Stability: experimental
4728 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4729 K8SPodUIDKey = attribute.Key("k8s.pod.uid")
4730
4731 // K8SReplicaSetNameKey is the attribute Key conforming to the
4732 // "k8s.replicaset.name" semantic conventions. It represents the name of
4733 // the ReplicaSet.
4734 //
4735 // Type: string
4736 // RequirementLevel: Optional
4737 // Stability: experimental
4738 // Examples: 'opentelemetry'
4739 K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
4740
4741 // K8SReplicaSetUIDKey is the attribute Key conforming to the
4742 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
4743 // ReplicaSet.
4744 //
4745 // Type: string
4746 // RequirementLevel: Optional
4747 // Stability: experimental
4748 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4749 K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
4750
4751 // K8SStatefulSetNameKey is the attribute Key conforming to the
4752 // "k8s.statefulset.name" semantic conventions. It represents the name of
4753 // the StatefulSet.
4754 //
4755 // Type: string
4756 // RequirementLevel: Optional
4757 // Stability: experimental
4758 // Examples: 'opentelemetry'
4759 K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
4760
4761 // K8SStatefulSetUIDKey is the attribute Key conforming to the
4762 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
4763 // StatefulSet.
4764 //
4765 // Type: string
4766 // RequirementLevel: Optional
4767 // Stability: experimental
4768 // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
4769 K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
4770 )
4771
4772 // K8SClusterName returns an attribute KeyValue conforming to the
4773 // "k8s.cluster.name" semantic conventions. It represents the name of the
4774 // cluster.
4775 func K8SClusterName(val string) attribute.KeyValue {
4776 return K8SClusterNameKey.String(val)
4777 }
4778
4779 // K8SClusterUID returns an attribute KeyValue conforming to the
4780 // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
4781 // cluster, set to the UID of the `kube-system` namespace.
4782 func K8SClusterUID(val string) attribute.KeyValue {
4783 return K8SClusterUIDKey.String(val)
4784 }
4785
4786 // K8SContainerName returns an attribute KeyValue conforming to the
4787 // "k8s.container.name" semantic conventions. It represents the name of the
4788 // Container from Pod specification, must be unique within a Pod. Container
4789 // runtime usually uses different globally unique name (`container.name`).
4790 func K8SContainerName(val string) attribute.KeyValue {
4791 return K8SContainerNameKey.String(val)
4792 }
4793
4794 // K8SContainerRestartCount returns an attribute KeyValue conforming to the
4795 // "k8s.container.restart_count" semantic conventions. It represents the number
4796 // of times the container was restarted. This attribute can be used to identify
4797 // a particular container (running or stopped) within a container spec.
4798 func K8SContainerRestartCount(val int) attribute.KeyValue {
4799 return K8SContainerRestartCountKey.Int(val)
4800 }
4801
4802 // K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
4803 // conforming to the "k8s.container.status.last_terminated_reason" semantic
4804 // conventions. It represents the last terminated reason of the Container.
4805 func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
4806 return K8SContainerStatusLastTerminatedReasonKey.String(val)
4807 }
4808
4809 // K8SCronJobName returns an attribute KeyValue conforming to the
4810 // "k8s.cronjob.name" semantic conventions. It represents the name of the
4811 // CronJob.
4812 func K8SCronJobName(val string) attribute.KeyValue {
4813 return K8SCronJobNameKey.String(val)
4814 }
4815
4816 // K8SCronJobUID returns an attribute KeyValue conforming to the
4817 // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
4818 // CronJob.
4819 func K8SCronJobUID(val string) attribute.KeyValue {
4820 return K8SCronJobUIDKey.String(val)
4821 }
4822
4823 // K8SDaemonSetName returns an attribute KeyValue conforming to the
4824 // "k8s.daemonset.name" semantic conventions. It represents the name of the
4825 // DaemonSet.
4826 func K8SDaemonSetName(val string) attribute.KeyValue {
4827 return K8SDaemonSetNameKey.String(val)
4828 }
4829
4830 // K8SDaemonSetUID returns an attribute KeyValue conforming to the
4831 // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
4832 // DaemonSet.
4833 func K8SDaemonSetUID(val string) attribute.KeyValue {
4834 return K8SDaemonSetUIDKey.String(val)
4835 }
4836
4837 // K8SDeploymentName returns an attribute KeyValue conforming to the
4838 // "k8s.deployment.name" semantic conventions. It represents the name of the
4839 // Deployment.
4840 func K8SDeploymentName(val string) attribute.KeyValue {
4841 return K8SDeploymentNameKey.String(val)
4842 }
4843
4844 // K8SDeploymentUID returns an attribute KeyValue conforming to the
4845 // "k8s.deployment.uid" semantic conventions. It represents the UID of the
4846 // Deployment.
4847 func K8SDeploymentUID(val string) attribute.KeyValue {
4848 return K8SDeploymentUIDKey.String(val)
4849 }
4850
4851 // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
4852 // semantic conventions. It represents the name of the Job.
4853 func K8SJobName(val string) attribute.KeyValue {
4854 return K8SJobNameKey.String(val)
4855 }
4856
4857 // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
4858 // semantic conventions. It represents the UID of the Job.
4859 func K8SJobUID(val string) attribute.KeyValue {
4860 return K8SJobUIDKey.String(val)
4861 }
4862
4863 // K8SNamespaceName returns an attribute KeyValue conforming to the
4864 // "k8s.namespace.name" semantic conventions. It represents the name of the
4865 // namespace that the pod is running in.
4866 func K8SNamespaceName(val string) attribute.KeyValue {
4867 return K8SNamespaceNameKey.String(val)
4868 }
4869
4870 // K8SNodeName returns an attribute KeyValue conforming to the
4871 // "k8s.node.name" semantic conventions. It represents the name of the Node.
4872 func K8SNodeName(val string) attribute.KeyValue {
4873 return K8SNodeNameKey.String(val)
4874 }
4875
4876 // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
4877 // semantic conventions. It represents the UID of the Node.
4878 func K8SNodeUID(val string) attribute.KeyValue {
4879 return K8SNodeUIDKey.String(val)
4880 }
4881
4882 // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
4883 // semantic conventions. It represents the name of the Pod.
4884 func K8SPodName(val string) attribute.KeyValue {
4885 return K8SPodNameKey.String(val)
4886 }
4887
4888 // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
4889 // semantic conventions. It represents the UID of the Pod.
4890 func K8SPodUID(val string) attribute.KeyValue {
4891 return K8SPodUIDKey.String(val)
4892 }
4893
4894 // K8SReplicaSetName returns an attribute KeyValue conforming to the
4895 // "k8s.replicaset.name" semantic conventions. It represents the name of the
4896 // ReplicaSet.
4897 func K8SReplicaSetName(val string) attribute.KeyValue {
4898 return K8SReplicaSetNameKey.String(val)
4899 }
4900
4901 // K8SReplicaSetUID returns an attribute KeyValue conforming to the
4902 // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
4903 // ReplicaSet.
4904 func K8SReplicaSetUID(val string) attribute.KeyValue {
4905 return K8SReplicaSetUIDKey.String(val)
4906 }
4907
4908 // K8SStatefulSetName returns an attribute KeyValue conforming to the
4909 // "k8s.statefulset.name" semantic conventions. It represents the name of the
4910 // StatefulSet.
4911 func K8SStatefulSetName(val string) attribute.KeyValue {
4912 return K8SStatefulSetNameKey.String(val)
4913 }
4914
4915 // K8SStatefulSetUID returns an attribute KeyValue conforming to the
4916 // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
4917 // StatefulSet.
4918 func K8SStatefulSetUID(val string) attribute.KeyValue {
4919 return K8SStatefulSetUIDKey.String(val)
4920 }
4921
4922 // Log attributes
4923 const (
4924 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
4925 // semantic conventions. It represents the stream associated with the log.
4926 // See below for a list of well-known values.
4927 //
4928 // Type: Enum
4929 // RequirementLevel: Optional
4930 // Stability: experimental
4931 LogIostreamKey = attribute.Key("log.iostream")
4932 )
4933
4934 var (
4935 // Logs from stdout stream
4936 LogIostreamStdout = LogIostreamKey.String("stdout")
4937 // Events from stderr stream
4938 LogIostreamStderr = LogIostreamKey.String("stderr")
4939 )
4940
4941 // Attributes for a file to which log was emitted.
4942 const (
4943 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
4944 // semantic conventions. It represents the basename of the file.
4945 //
4946 // Type: string
4947 // RequirementLevel: Optional
4948 // Stability: experimental
4949 // Examples: 'audit.log'
4950 LogFileNameKey = attribute.Key("log.file.name")
4951
4952 // LogFileNameResolvedKey is the attribute Key conforming to the
4953 // "log.file.name_resolved" semantic conventions. It represents the
4954 // basename of the file, with symlinks resolved.
4955 //
4956 // Type: string
4957 // RequirementLevel: Optional
4958 // Stability: experimental
4959 // Examples: 'uuid.log'
4960 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
4961
4962 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
4963 // semantic conventions. It represents the full path to the file.
4964 //
4965 // Type: string
4966 // RequirementLevel: Optional
4967 // Stability: experimental
4968 // Examples: '/var/log/mysql/audit.log'
4969 LogFilePathKey = attribute.Key("log.file.path")
4970
4971 // LogFilePathResolvedKey is the attribute Key conforming to the
4972 // "log.file.path_resolved" semantic conventions. It represents the full
4973 // path to the file, with symlinks resolved.
4974 //
4975 // Type: string
4976 // RequirementLevel: Optional
4977 // Stability: experimental
4978 // Examples: '/var/lib/docker/uuid.log'
4979 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
4980 )
4981
4982 // LogFileName returns an attribute KeyValue conforming to the
4983 // "log.file.name" semantic conventions. It represents the basename of the
4984 // file.
4985 func LogFileName(val string) attribute.KeyValue {
4986 return LogFileNameKey.String(val)
4987 }
4988
4989 // LogFileNameResolved returns an attribute KeyValue conforming to the
4990 // "log.file.name_resolved" semantic conventions. It represents the basename of
4991 // the file, with symlinks resolved.
4992 func LogFileNameResolved(val string) attribute.KeyValue {
4993 return LogFileNameResolvedKey.String(val)
4994 }
4995
4996 // LogFilePath returns an attribute KeyValue conforming to the
4997 // "log.file.path" semantic conventions. It represents the full path to the
4998 // file.
4999 func LogFilePath(val string) attribute.KeyValue {
5000 return LogFilePathKey.String(val)
5001 }
5002
5003 // LogFilePathResolved returns an attribute KeyValue conforming to the
5004 // "log.file.path_resolved" semantic conventions. It represents the full path
5005 // to the file, with symlinks resolved.
5006 func LogFilePathResolved(val string) attribute.KeyValue {
5007 return LogFilePathResolvedKey.String(val)
5008 }
5009
5010 // The generic attributes that may be used in any Log Record.
5011 const (
5012 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
5013 // semantic conventions. It represents a unique identifier for the Log
5014 // Record.
5015 //
5016 // Type: string
5017 // RequirementLevel: Optional
5018 // Stability: experimental
5019 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
5020 // Note: If an id is provided, other log records with the same id will be
5021 // considered duplicates and can be removed safely. This means, that two
5022 // distinguishable log records MUST have different values.
5023 // The id MAY be an [Universally Unique Lexicographically Sortable
5024 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
5025 // (e.g. UUID) may be used as needed.
5026 LogRecordUIDKey = attribute.Key("log.record.uid")
5027 )
5028
5029 // LogRecordUID returns an attribute KeyValue conforming to the
5030 // "log.record.uid" semantic conventions. It represents a unique identifier for
5031 // the Log Record.
5032 func LogRecordUID(val string) attribute.KeyValue {
5033 return LogRecordUIDKey.String(val)
5034 }
5035
5036 // Attributes describing telemetry around messaging systems and messaging
5037 // activities.
5038 const (
5039 // MessagingBatchMessageCountKey is the attribute Key conforming to the
5040 // "messaging.batch.message_count" semantic conventions. It represents the
5041 // number of messages sent, received, or processed in the scope of the
5042 // batching operation.
5043 //
5044 // Type: int
5045 // RequirementLevel: Optional
5046 // Stability: experimental
5047 // Examples: 0, 1, 2
5048 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
5049 // spans that operate with a single message. When a messaging client
5050 // library supports both batch and single-message API for the same
5051 // operation, instrumentations SHOULD use `messaging.batch.message_count`
5052 // for batching APIs and SHOULD NOT use it for single-message APIs.
5053 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
5054
5055 // MessagingClientIDKey is the attribute Key conforming to the
5056 // "messaging.client.id" semantic conventions. It represents a unique
5057 // identifier for the client that consumes or produces a message.
5058 //
5059 // Type: string
5060 // RequirementLevel: Optional
5061 // Stability: experimental
5062 // Examples: 'client-5', 'myhost@8742@s8083jm'
5063 MessagingClientIDKey = attribute.Key("messaging.client.id")
5064
5065 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
5066 // "messaging.destination.anonymous" semantic conventions. It represents a
5067 // boolean that is true if the message destination is anonymous (could be
5068 // unnamed or have auto-generated name).
5069 //
5070 // Type: boolean
5071 // RequirementLevel: Optional
5072 // Stability: experimental
5073 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
5074
5075 // MessagingDestinationNameKey is the attribute Key conforming to the
5076 // "messaging.destination.name" semantic conventions. It represents the
5077 // message destination name
5078 //
5079 // Type: string
5080 // RequirementLevel: Optional
5081 // Stability: experimental
5082 // Examples: 'MyQueue', 'MyTopic'
5083 // Note: Destination name SHOULD uniquely identify a specific queue, topic
5084 // or other entity within the broker. If
5085 // the broker doesn't have such notion, the destination name SHOULD
5086 // uniquely identify the broker.
5087 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
5088
5089 // MessagingDestinationPartitionIDKey is the attribute Key conforming to
5090 // the "messaging.destination.partition.id" semantic conventions. It
5091 // represents the identifier of the partition messages are sent to or
5092 // received from, unique within the `messaging.destination.name`.
5093 //
5094 // Type: string
5095 // RequirementLevel: Optional
5096 // Stability: experimental
5097 // Examples: '1'
5098 MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
5099
5100 // MessagingDestinationTemplateKey is the attribute Key conforming to the
5101 // "messaging.destination.template" semantic conventions. It represents the
5102 // low cardinality representation of the messaging destination name
5103 //
5104 // Type: string
5105 // RequirementLevel: Optional
5106 // Stability: experimental
5107 // Examples: '/customers/{customerID}'
5108 // Note: Destination names could be constructed from templates. An example
5109 // would be a destination name involving a user name or product id.
5110 // Although the destination name in this case is of high cardinality, the
5111 // underlying template is of low cardinality and can be effectively used
5112 // for grouping and aggregation.
5113 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
5114
5115 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
5116 // "messaging.destination.temporary" semantic conventions. It represents a
5117 // boolean that is true if the message destination is temporary and might
5118 // not exist anymore after messages are processed.
5119 //
5120 // Type: boolean
5121 // RequirementLevel: Optional
5122 // Stability: experimental
5123 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
5124
5125 // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
5126 // to the "messaging.destination_publish.anonymous" semantic conventions.
5127 // It represents a boolean that is true if the publish message destination
5128 // is anonymous (could be unnamed or have auto-generated name).
5129 //
5130 // Type: boolean
5131 // RequirementLevel: Optional
5132 // Stability: experimental
5133 MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
5134
5135 // MessagingDestinationPublishNameKey is the attribute Key conforming to
5136 // the "messaging.destination_publish.name" semantic conventions. It
5137 // represents the name of the original destination the message was
5138 // published to
5139 //
5140 // Type: string
5141 // RequirementLevel: Optional
5142 // Stability: experimental
5143 // Examples: 'MyQueue', 'MyTopic'
5144 // Note: The name SHOULD uniquely identify a specific queue, topic, or
5145 // other entity within the broker. If
5146 // the broker doesn't have such notion, the original destination name
5147 // SHOULD uniquely identify the broker.
5148 MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
5149
5150 // MessagingMessageBodySizeKey is the attribute Key conforming to the
5151 // "messaging.message.body.size" semantic conventions. It represents the
5152 // size of the message body in bytes.
5153 //
5154 // Type: int
5155 // RequirementLevel: Optional
5156 // Stability: experimental
5157 // Examples: 1439
5158 // Note: This can refer to both the compressed or uncompressed body size.
5159 // If both sizes are known, the uncompressed
5160 // body size should be used.
5161 MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
5162
5163 // MessagingMessageConversationIDKey is the attribute Key conforming to the
5164 // "messaging.message.conversation_id" semantic conventions. It represents
5165 // the conversation ID identifying the conversation to which the message
5166 // belongs, represented as a string. Sometimes called "Correlation ID".
5167 //
5168 // Type: string
5169 // RequirementLevel: Optional
5170 // Stability: experimental
5171 // Examples: 'MyConversationID'
5172 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
5173
5174 // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
5175 // "messaging.message.envelope.size" semantic conventions. It represents
5176 // the size of the message body and metadata in bytes.
5177 //
5178 // Type: int
5179 // RequirementLevel: Optional
5180 // Stability: experimental
5181 // Examples: 2738
5182 // Note: This can refer to both the compressed or uncompressed size. If
5183 // both sizes are known, the uncompressed
5184 // size should be used.
5185 MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
5186
5187 // MessagingMessageIDKey is the attribute Key conforming to the
5188 // "messaging.message.id" semantic conventions. It represents a value used
5189 // by the messaging system as an identifier for the message, represented as
5190 // a string.
5191 //
5192 // Type: string
5193 // RequirementLevel: Optional
5194 // Stability: experimental
5195 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
5196 MessagingMessageIDKey = attribute.Key("messaging.message.id")
5197
5198 // MessagingOperationNameKey is the attribute Key conforming to the
5199 // "messaging.operation.name" semantic conventions. It represents the
5200 // system-specific name of the messaging operation.
5201 //
5202 // Type: string
5203 // RequirementLevel: Optional
5204 // Stability: experimental
5205 // Examples: 'ack', 'nack', 'send'
5206 MessagingOperationNameKey = attribute.Key("messaging.operation.name")
5207
5208 // MessagingOperationTypeKey is the attribute Key conforming to the
5209 // "messaging.operation.type" semantic conventions. It represents a string
5210 // identifying the type of the messaging operation.
5211 //
5212 // Type: Enum
5213 // RequirementLevel: Optional
5214 // Stability: experimental
5215 // Note: If a custom value is used, it MUST be of low cardinality.
5216 MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
5217
5218 // MessagingSystemKey is the attribute Key conforming to the
5219 // "messaging.system" semantic conventions. It represents the messaging
5220 // system as identified by the client instrumentation.
5221 //
5222 // Type: Enum
5223 // RequirementLevel: Optional
5224 // Stability: experimental
5225 // Note: The actual messaging system may differ from the one known by the
5226 // client. For example, when using Kafka client libraries to communicate
5227 // with Azure Event Hubs, the `messaging.system` is set to `kafka` based on
5228 // the instrumentation's best knowledge.
5229 MessagingSystemKey = attribute.Key("messaging.system")
5230 )
5231
5232 var (
5233 // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created
5234 MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish")
5235 // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios
5236 MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
5237 // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages
5238 MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
5239 // One or more messages are delivered to or processed by a consumer
5240 MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("process")
5241 // One or more messages are settled
5242 MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
5243 )
5244
5245 var (
5246 // Apache ActiveMQ
5247 MessagingSystemActivemq = MessagingSystemKey.String("activemq")
5248 // Amazon Simple Queue Service (SQS)
5249 MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs")
5250 // Azure Event Grid
5251 MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid")
5252 // Azure Event Hubs
5253 MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs")
5254 // Azure Service Bus
5255 MessagingSystemServicebus = MessagingSystemKey.String("servicebus")
5256 // Google Cloud Pub/Sub
5257 MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub")
5258 // Java Message Service
5259 MessagingSystemJms = MessagingSystemKey.String("jms")
5260 // Apache Kafka
5261 MessagingSystemKafka = MessagingSystemKey.String("kafka")
5262 // RabbitMQ
5263 MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq")
5264 // Apache RocketMQ
5265 MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq")
5266 )
5267
5268 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
5269 // the "messaging.batch.message_count" semantic conventions. It represents the
5270 // number of messages sent, received, or processed in the scope of the batching
5271 // operation.
5272 func MessagingBatchMessageCount(val int) attribute.KeyValue {
5273 return MessagingBatchMessageCountKey.Int(val)
5274 }
5275
5276 // MessagingClientID returns an attribute KeyValue conforming to the
5277 // "messaging.client.id" semantic conventions. It represents a unique
5278 // identifier for the client that consumes or produces a message.
5279 func MessagingClientID(val string) attribute.KeyValue {
5280 return MessagingClientIDKey.String(val)
5281 }
5282
5283 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
5284 // the "messaging.destination.anonymous" semantic conventions. It represents a
5285 // boolean that is true if the message destination is anonymous (could be
5286 // unnamed or have auto-generated name).
5287 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
5288 return MessagingDestinationAnonymousKey.Bool(val)
5289 }
5290
5291 // MessagingDestinationName returns an attribute KeyValue conforming to the
5292 // "messaging.destination.name" semantic conventions. It represents the message
5293 // destination name
5294 func MessagingDestinationName(val string) attribute.KeyValue {
5295 return MessagingDestinationNameKey.String(val)
5296 }
5297
5298 // MessagingDestinationPartitionID returns an attribute KeyValue conforming
5299 // to the "messaging.destination.partition.id" semantic conventions. It
5300 // represents the identifier of the partition messages are sent to or received
5301 // from, unique within the `messaging.destination.name`.
5302 func MessagingDestinationPartitionID(val string) attribute.KeyValue {
5303 return MessagingDestinationPartitionIDKey.String(val)
5304 }
5305
5306 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
5307 // the "messaging.destination.template" semantic conventions. It represents the
5308 // low cardinality representation of the messaging destination name
5309 func MessagingDestinationTemplate(val string) attribute.KeyValue {
5310 return MessagingDestinationTemplateKey.String(val)
5311 }
5312
5313 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
5314 // the "messaging.destination.temporary" semantic conventions. It represents a
5315 // boolean that is true if the message destination is temporary and might not
5316 // exist anymore after messages are processed.
5317 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
5318 return MessagingDestinationTemporaryKey.Bool(val)
5319 }
5320
5321 // MessagingDestinationPublishAnonymous returns an attribute KeyValue
5322 // conforming to the "messaging.destination_publish.anonymous" semantic
5323 // conventions. It represents a boolean that is true if the publish message
5324 // destination is anonymous (could be unnamed or have auto-generated name).
5325 func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
5326 return MessagingDestinationPublishAnonymousKey.Bool(val)
5327 }
5328
5329 // MessagingDestinationPublishName returns an attribute KeyValue conforming
5330 // to the "messaging.destination_publish.name" semantic conventions. It
5331 // represents the name of the original destination the message was published to
5332 func MessagingDestinationPublishName(val string) attribute.KeyValue {
5333 return MessagingDestinationPublishNameKey.String(val)
5334 }
5335
5336 // MessagingMessageBodySize returns an attribute KeyValue conforming to the
5337 // "messaging.message.body.size" semantic conventions. It represents the size
5338 // of the message body in bytes.
5339 func MessagingMessageBodySize(val int) attribute.KeyValue {
5340 return MessagingMessageBodySizeKey.Int(val)
5341 }
5342
5343 // MessagingMessageConversationID returns an attribute KeyValue conforming
5344 // to the "messaging.message.conversation_id" semantic conventions. It
5345 // represents the conversation ID identifying the conversation to which the
5346 // message belongs, represented as a string. Sometimes called "Correlation ID".
5347 func MessagingMessageConversationID(val string) attribute.KeyValue {
5348 return MessagingMessageConversationIDKey.String(val)
5349 }
5350
5351 // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
5352 // the "messaging.message.envelope.size" semantic conventions. It represents
5353 // the size of the message body and metadata in bytes.
5354 func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
5355 return MessagingMessageEnvelopeSizeKey.Int(val)
5356 }
5357
5358 // MessagingMessageID returns an attribute KeyValue conforming to the
5359 // "messaging.message.id" semantic conventions. It represents a value used by
5360 // the messaging system as an identifier for the message, represented as a
5361 // string.
5362 func MessagingMessageID(val string) attribute.KeyValue {
5363 return MessagingMessageIDKey.String(val)
5364 }
5365
5366 // MessagingOperationName returns an attribute KeyValue conforming to the
5367 // "messaging.operation.name" semantic conventions. It represents the
5368 // system-specific name of the messaging operation.
5369 func MessagingOperationName(val string) attribute.KeyValue {
5370 return MessagingOperationNameKey.String(val)
5371 }
5372
5373 // This group describes attributes specific to Apache Kafka.
5374 const (
5375 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
5376 // "messaging.kafka.consumer.group" semantic conventions. It represents the
5377 // name of the Kafka Consumer Group that is handling the message. Only
5378 // applies to consumers, not producers.
5379 //
5380 // Type: string
5381 // RequirementLevel: Optional
5382 // Stability: experimental
5383 // Examples: 'my-group'
5384 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
5385
5386 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
5387 // "messaging.kafka.message.key" semantic conventions. It represents the
5388 // message keys in Kafka are used for grouping alike messages to ensure
5389 // they're processed on the same partition. They differ from
5390 // `messaging.message.id` in that they're not unique. If the key is `null`,
5391 // the attribute MUST NOT be set.
5392 //
5393 // Type: string
5394 // RequirementLevel: Optional
5395 // Stability: experimental
5396 // Examples: 'myKey'
5397 // Note: If the key type is not string, it's string representation has to
5398 // be supplied for the attribute. If the key has no unambiguous, canonical
5399 // string form, don't include its value.
5400 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
5401
5402 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
5403 // "messaging.kafka.message.offset" semantic conventions. It represents the
5404 // offset of a record in the corresponding Kafka partition.
5405 //
5406 // Type: int
5407 // RequirementLevel: Optional
5408 // Stability: experimental
5409 // Examples: 42
5410 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
5411
5412 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
5413 // "messaging.kafka.message.tombstone" semantic conventions. It represents
5414 // a boolean that is true if the message is a tombstone.
5415 //
5416 // Type: boolean
5417 // RequirementLevel: Optional
5418 // Stability: experimental
5419 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
5420 )
5421
5422 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
5423 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
5424 // name of the Kafka Consumer Group that is handling the message. Only applies
5425 // to consumers, not producers.
5426 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
5427 return MessagingKafkaConsumerGroupKey.String(val)
5428 }
5429
5430 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
5431 // "messaging.kafka.message.key" semantic conventions. It represents the
5432 // message keys in Kafka are used for grouping alike messages to ensure they're
5433 // processed on the same partition. They differ from `messaging.message.id` in
5434 // that they're not unique. If the key is `null`, the attribute MUST NOT be
5435 // set.
5436 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
5437 return MessagingKafkaMessageKeyKey.String(val)
5438 }
5439
5440 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
5441 // the "messaging.kafka.message.offset" semantic conventions. It represents the
5442 // offset of a record in the corresponding Kafka partition.
5443 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
5444 return MessagingKafkaMessageOffsetKey.Int(val)
5445 }
5446
5447 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
5448 // to the "messaging.kafka.message.tombstone" semantic conventions. It
5449 // represents a boolean that is true if the message is a tombstone.
5450 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
5451 return MessagingKafkaMessageTombstoneKey.Bool(val)
5452 }
5453
5454 // This group describes attributes specific to RabbitMQ.
5455 const (
5456 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
5457 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
5458 // conventions. It represents the rabbitMQ message routing key.
5459 //
5460 // Type: string
5461 // RequirementLevel: Optional
5462 // Stability: experimental
5463 // Examples: 'myKey'
5464 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
5465
5466 // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming
5467 // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions.
5468 // It represents the rabbitMQ message delivery tag
5469 //
5470 // Type: int
5471 // RequirementLevel: Optional
5472 // Stability: experimental
5473 // Examples: 123
5474 MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
5475 )
5476
5477 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
5478 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
5479 // conventions. It represents the rabbitMQ message routing key.
5480 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
5481 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
5482 }
5483
5484 // MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue
5485 // conforming to the "messaging.rabbitmq.message.delivery_tag" semantic
5486 // conventions. It represents the rabbitMQ message delivery tag
5487 func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue {
5488 return MessagingRabbitmqMessageDeliveryTagKey.Int(val)
5489 }
5490
5491 // This group describes attributes specific to RocketMQ.
5492 const (
5493 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
5494 // "messaging.rocketmq.client_group" semantic conventions. It represents
5495 // the name of the RocketMQ producer/consumer group that is handling the
5496 // message. The client type is identified by the SpanKind.
5497 //
5498 // Type: string
5499 // RequirementLevel: Optional
5500 // Stability: experimental
5501 // Examples: 'myConsumerGroup'
5502 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
5503
5504 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
5505 // the "messaging.rocketmq.consumption_model" semantic conventions. It
5506 // represents the model of message consumption. This only applies to
5507 // consumer spans.
5508 //
5509 // Type: Enum
5510 // RequirementLevel: Optional
5511 // Stability: experimental
5512 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
5513
5514 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
5515 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
5516 // conventions. It represents the delay time level for delay message, which
5517 // determines the message delay time.
5518 //
5519 // Type: int
5520 // RequirementLevel: Optional
5521 // Stability: experimental
5522 // Examples: 3
5523 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
5524
5525 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
5526 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
5527 // semantic conventions. It represents the timestamp in milliseconds that
5528 // the delay message is expected to be delivered to consumer.
5529 //
5530 // Type: int
5531 // RequirementLevel: Optional
5532 // Stability: experimental
5533 // Examples: 1665987217045
5534 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
5535
5536 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
5537 // "messaging.rocketmq.message.group" semantic conventions. It represents
5538 // the it is essential for FIFO message. Messages that belong to the same
5539 // message group are always processed one by one within the same consumer
5540 // group.
5541 //
5542 // Type: string
5543 // RequirementLevel: Optional
5544 // Stability: experimental
5545 // Examples: 'myMessageGroup'
5546 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
5547
5548 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
5549 // "messaging.rocketmq.message.keys" semantic conventions. It represents
5550 // the key(s) of message, another way to mark message besides message id.
5551 //
5552 // Type: string[]
5553 // RequirementLevel: Optional
5554 // Stability: experimental
5555 // Examples: 'keyA', 'keyB'
5556 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
5557
5558 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
5559 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
5560 // secondary classifier of message besides topic.
5561 //
5562 // Type: string
5563 // RequirementLevel: Optional
5564 // Stability: experimental
5565 // Examples: 'tagA'
5566 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
5567
5568 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
5569 // "messaging.rocketmq.message.type" semantic conventions. It represents
5570 // the type of message.
5571 //
5572 // Type: Enum
5573 // RequirementLevel: Optional
5574 // Stability: experimental
5575 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
5576
5577 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
5578 // "messaging.rocketmq.namespace" semantic conventions. It represents the
5579 // namespace of RocketMQ resources, resources in different namespaces are
5580 // individual.
5581 //
5582 // Type: string
5583 // RequirementLevel: Optional
5584 // Stability: experimental
5585 // Examples: 'myNamespace'
5586 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
5587 )
5588
5589 var (
5590 // Clustering consumption model
5591 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
5592 // Broadcasting consumption model
5593 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
5594 )
5595
5596 var (
5597 // Normal message
5598 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
5599 // FIFO message
5600 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
5601 // Delay message
5602 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
5603 // Transaction message
5604 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
5605 )
5606
5607 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
5608 // the "messaging.rocketmq.client_group" semantic conventions. It represents
5609 // the name of the RocketMQ producer/consumer group that is handling the
5610 // message. The client type is identified by the SpanKind.
5611 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
5612 return MessagingRocketmqClientGroupKey.String(val)
5613 }
5614
5615 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
5616 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
5617 // conventions. It represents the delay time level for delay message, which
5618 // determines the message delay time.
5619 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
5620 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
5621 }
5622
5623 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
5624 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
5625 // conventions. It represents the timestamp in milliseconds that the delay
5626 // message is expected to be delivered to consumer.
5627 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
5628 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
5629 }
5630
5631 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
5632 // the "messaging.rocketmq.message.group" semantic conventions. It represents
5633 // the it is essential for FIFO message. Messages that belong to the same
5634 // message group are always processed one by one within the same consumer
5635 // group.
5636 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
5637 return MessagingRocketmqMessageGroupKey.String(val)
5638 }
5639
5640 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
5641 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
5642 // the key(s) of message, another way to mark message besides message id.
5643 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
5644 return MessagingRocketmqMessageKeysKey.StringSlice(val)
5645 }
5646
5647 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
5648 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
5649 // secondary classifier of message besides topic.
5650 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
5651 return MessagingRocketmqMessageTagKey.String(val)
5652 }
5653
5654 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
5655 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
5656 // namespace of RocketMQ resources, resources in different namespaces are
5657 // individual.
5658 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
5659 return MessagingRocketmqNamespaceKey.String(val)
5660 }
5661
5662 // This group describes attributes specific to GCP Pub/Sub.
5663 const (
5664 // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming
5665 // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions.
5666 // It represents the ack deadline in seconds set for the modify ack
5667 // deadline request.
5668 //
5669 // Type: int
5670 // RequirementLevel: Optional
5671 // Stability: experimental
5672 // Examples: 10
5673 MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
5674
5675 // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the
5676 // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
5677 // represents the ack id for a given message.
5678 //
5679 // Type: string
5680 // RequirementLevel: Optional
5681 // Stability: experimental
5682 // Examples: 'ack_id'
5683 MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
5684
5685 // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key
5686 // conforming to the "messaging.gcp_pubsub.message.delivery_attempt"
5687 // semantic conventions. It represents the delivery attempt for a given
5688 // message.
5689 //
5690 // Type: int
5691 // RequirementLevel: Optional
5692 // Stability: experimental
5693 // Examples: 2
5694 MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
5695
5696 // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming
5697 // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions.
5698 // It represents the ordering key for a given message. If the attribute is
5699 // not present, the message does not have an ordering key.
5700 //
5701 // Type: string
5702 // RequirementLevel: Optional
5703 // Stability: experimental
5704 // Examples: 'ordering_key'
5705 MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
5706 )
5707
5708 // MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue
5709 // conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic
5710 // conventions. It represents the ack deadline in seconds set for the modify
5711 // ack deadline request.
5712 func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue {
5713 return MessagingGCPPubsubMessageAckDeadlineKey.Int(val)
5714 }
5715
5716 // MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming
5717 // to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
5718 // represents the ack id for a given message.
5719 func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue {
5720 return MessagingGCPPubsubMessageAckIDKey.String(val)
5721 }
5722
5723 // MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue
5724 // conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
5725 // conventions. It represents the delivery attempt for a given message.
5726 func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue {
5727 return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val)
5728 }
5729
5730 // MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue
5731 // conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic
5732 // conventions. It represents the ordering key for a given message. If the
5733 // attribute is not present, the message does not have an ordering key.
5734 func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue {
5735 return MessagingGCPPubsubMessageOrderingKeyKey.String(val)
5736 }
5737
5738 // This group describes attributes specific to Azure Service Bus.
5739 const (
5740 // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key
5741 // conforming to the "messaging.servicebus.destination.subscription_name"
5742 // semantic conventions. It represents the name of the subscription in the
5743 // topic messages are received from.
5744 //
5745 // Type: string
5746 // RequirementLevel: Optional
5747 // Stability: experimental
5748 // Examples: 'mySubscription'
5749 MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name")
5750
5751 // MessagingServicebusDispositionStatusKey is the attribute Key conforming
5752 // to the "messaging.servicebus.disposition_status" semantic conventions.
5753 // It represents the describes the [settlement
5754 // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock).
5755 //
5756 // Type: Enum
5757 // RequirementLevel: Optional
5758 // Stability: experimental
5759 MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
5760
5761 // MessagingServicebusMessageDeliveryCountKey is the attribute Key
5762 // conforming to the "messaging.servicebus.message.delivery_count" semantic
5763 // conventions. It represents the number of deliveries that have been
5764 // attempted for this message.
5765 //
5766 // Type: int
5767 // RequirementLevel: Optional
5768 // Stability: experimental
5769 // Examples: 2
5770 MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
5771
5772 // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key
5773 // conforming to the "messaging.servicebus.message.enqueued_time" semantic
5774 // conventions. It represents the UTC epoch seconds at which the message
5775 // has been accepted and stored in the entity.
5776 //
5777 // Type: int
5778 // RequirementLevel: Optional
5779 // Stability: experimental
5780 // Examples: 1701393730
5781 MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
5782 )
5783
5784 var (
5785 // Message is completed
5786 MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete")
5787 // Message is abandoned
5788 MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon")
5789 // Message is sent to dead letter queue
5790 MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter")
5791 // Message is deferred
5792 MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer")
5793 )
5794
5795 // MessagingServicebusDestinationSubscriptionName returns an attribute
5796 // KeyValue conforming to the
5797 // "messaging.servicebus.destination.subscription_name" semantic conventions.
5798 // It represents the name of the subscription in the topic messages are
5799 // received from.
5800 func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue {
5801 return MessagingServicebusDestinationSubscriptionNameKey.String(val)
5802 }
5803
5804 // MessagingServicebusMessageDeliveryCount returns an attribute KeyValue
5805 // conforming to the "messaging.servicebus.message.delivery_count" semantic
5806 // conventions. It represents the number of deliveries that have been attempted
5807 // for this message.
5808 func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue {
5809 return MessagingServicebusMessageDeliveryCountKey.Int(val)
5810 }
5811
5812 // MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue
5813 // conforming to the "messaging.servicebus.message.enqueued_time" semantic
5814 // conventions. It represents the UTC epoch seconds at which the message has
5815 // been accepted and stored in the entity.
5816 func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue {
5817 return MessagingServicebusMessageEnqueuedTimeKey.Int(val)
5818 }
5819
5820 // This group describes attributes specific to Azure Event Hubs.
5821 const (
5822 // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to
5823 // the "messaging.eventhubs.consumer.group" semantic conventions. It
5824 // represents the name of the consumer group the event consumer is
5825 // associated with.
5826 //
5827 // Type: string
5828 // RequirementLevel: Optional
5829 // Stability: experimental
5830 // Examples: 'indexer'
5831 MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group")
5832
5833 // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming
5834 // to the "messaging.eventhubs.message.enqueued_time" semantic conventions.
5835 // It represents the UTC epoch seconds at which the message has been
5836 // accepted and stored in the entity.
5837 //
5838 // Type: int
5839 // RequirementLevel: Optional
5840 // Stability: experimental
5841 // Examples: 1701393730
5842 MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
5843 )
5844
5845 // MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming
5846 // to the "messaging.eventhubs.consumer.group" semantic conventions. It
5847 // represents the name of the consumer group the event consumer is associated
5848 // with.
5849 func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue {
5850 return MessagingEventhubsConsumerGroupKey.String(val)
5851 }
5852
5853 // MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue
5854 // conforming to the "messaging.eventhubs.message.enqueued_time" semantic
5855 // conventions. It represents the UTC epoch seconds at which the message has
5856 // been accepted and stored in the entity.
5857 func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue {
5858 return MessagingEventhubsMessageEnqueuedTimeKey.Int(val)
5859 }
5860
5861 // These attributes may be used for any network related operation.
5862 const (
5863 // NetworkCarrierIccKey is the attribute Key conforming to the
5864 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
5865 // alpha-2 2-character country code associated with the mobile carrier
5866 // network.
5867 //
5868 // Type: string
5869 // RequirementLevel: Optional
5870 // Stability: experimental
5871 // Examples: 'DE'
5872 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
5873
5874 // NetworkCarrierMccKey is the attribute Key conforming to the
5875 // "network.carrier.mcc" semantic conventions. It represents the mobile
5876 // carrier country code.
5877 //
5878 // Type: string
5879 // RequirementLevel: Optional
5880 // Stability: experimental
5881 // Examples: '310'
5882 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
5883
5884 // NetworkCarrierMncKey is the attribute Key conforming to the
5885 // "network.carrier.mnc" semantic conventions. It represents the mobile
5886 // carrier network code.
5887 //
5888 // Type: string
5889 // RequirementLevel: Optional
5890 // Stability: experimental
5891 // Examples: '001'
5892 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
5893
5894 // NetworkCarrierNameKey is the attribute Key conforming to the
5895 // "network.carrier.name" semantic conventions. It represents the name of
5896 // the mobile carrier.
5897 //
5898 // Type: string
5899 // RequirementLevel: Optional
5900 // Stability: experimental
5901 // Examples: 'sprint'
5902 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
5903
5904 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
5905 // "network.connection.subtype" semantic conventions. It represents the
5906 // this describes more details regarding the connection.type. It may be the
5907 // type of cell technology connection, but it could be used for describing
5908 // details about a wifi connection.
5909 //
5910 // Type: Enum
5911 // RequirementLevel: Optional
5912 // Stability: experimental
5913 // Examples: 'LTE'
5914 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
5915
5916 // NetworkConnectionTypeKey is the attribute Key conforming to the
5917 // "network.connection.type" semantic conventions. It represents the
5918 // internet connection type.
5919 //
5920 // Type: Enum
5921 // RequirementLevel: Optional
5922 // Stability: experimental
5923 // Examples: 'wifi'
5924 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
5925
5926 // NetworkIoDirectionKey is the attribute Key conforming to the
5927 // "network.io.direction" semantic conventions. It represents the network
5928 // IO operation direction.
5929 //
5930 // Type: Enum
5931 // RequirementLevel: Optional
5932 // Stability: experimental
5933 // Examples: 'transmit'
5934 NetworkIoDirectionKey = attribute.Key("network.io.direction")
5935
5936 // NetworkLocalAddressKey is the attribute Key conforming to the
5937 // "network.local.address" semantic conventions. It represents the local
5938 // address of the network connection - IP address or Unix domain socket
5939 // name.
5940 //
5941 // Type: string
5942 // RequirementLevel: Optional
5943 // Stability: stable
5944 // Examples: '10.1.2.80', '/tmp/my.sock'
5945 NetworkLocalAddressKey = attribute.Key("network.local.address")
5946
5947 // NetworkLocalPortKey is the attribute Key conforming to the
5948 // "network.local.port" semantic conventions. It represents the local port
5949 // number of the network connection.
5950 //
5951 // Type: int
5952 // RequirementLevel: Optional
5953 // Stability: stable
5954 // Examples: 65123
5955 NetworkLocalPortKey = attribute.Key("network.local.port")
5956
5957 // NetworkPeerAddressKey is the attribute Key conforming to the
5958 // "network.peer.address" semantic conventions. It represents the peer
5959 // address of the network connection - IP address or Unix domain socket
5960 // name.
5961 //
5962 // Type: string
5963 // RequirementLevel: Optional
5964 // Stability: stable
5965 // Examples: '10.1.2.80', '/tmp/my.sock'
5966 NetworkPeerAddressKey = attribute.Key("network.peer.address")
5967
5968 // NetworkPeerPortKey is the attribute Key conforming to the
5969 // "network.peer.port" semantic conventions. It represents the peer port
5970 // number of the network connection.
5971 //
5972 // Type: int
5973 // RequirementLevel: Optional
5974 // Stability: stable
5975 // Examples: 65123
5976 NetworkPeerPortKey = attribute.Key("network.peer.port")
5977
5978 // NetworkProtocolNameKey is the attribute Key conforming to the
5979 // "network.protocol.name" semantic conventions. It represents the [OSI
5980 // application layer](https://osi-model.com/application-layer/) or non-OSI
5981 // equivalent.
5982 //
5983 // Type: string
5984 // RequirementLevel: Optional
5985 // Stability: stable
5986 // Examples: 'amqp', 'http', 'mqtt'
5987 // Note: The value SHOULD be normalized to lowercase.
5988 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
5989
5990 // NetworkProtocolVersionKey is the attribute Key conforming to the
5991 // "network.protocol.version" semantic conventions. It represents the
5992 // actual version of the protocol used for network communication.
5993 //
5994 // Type: string
5995 // RequirementLevel: Optional
5996 // Stability: stable
5997 // Examples: '1.1', '2'
5998 // Note: If protocol version is subject to negotiation (for example using
5999 // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute
6000 // SHOULD be set to the negotiated version. If the actual protocol version
6001 // is not known, this attribute SHOULD NOT be set.
6002 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
6003
6004 // NetworkTransportKey is the attribute Key conforming to the
6005 // "network.transport" semantic conventions. It represents the [OSI
6006 // transport layer](https://osi-model.com/transport-layer/) or
6007 // [inter-process communication
6008 // method](https://wikipedia.org/wiki/Inter-process_communication).
6009 //
6010 // Type: Enum
6011 // RequirementLevel: Optional
6012 // Stability: stable
6013 // Examples: 'tcp', 'udp'
6014 // Note: The value SHOULD be normalized to lowercase.
6015 //
6016 // Consider always setting the transport when setting a port number, since
6017 // a port number is ambiguous without knowing the transport. For example
6018 // different processes could be listening on TCP port 12345 and UDP port
6019 // 12345.
6020 NetworkTransportKey = attribute.Key("network.transport")
6021
6022 // NetworkTypeKey is the attribute Key conforming to the "network.type"
6023 // semantic conventions. It represents the [OSI network
6024 // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
6025 //
6026 // Type: Enum
6027 // RequirementLevel: Optional
6028 // Stability: stable
6029 // Examples: 'ipv4', 'ipv6'
6030 // Note: The value SHOULD be normalized to lowercase.
6031 NetworkTypeKey = attribute.Key("network.type")
6032 )
6033
6034 var (
6035 // GPRS
6036 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
6037 // EDGE
6038 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
6039 // UMTS
6040 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
6041 // CDMA
6042 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
6043 // EVDO Rel. 0
6044 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
6045 // EVDO Rev. A
6046 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
6047 // CDMA2000 1XRTT
6048 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
6049 // HSDPA
6050 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
6051 // HSUPA
6052 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
6053 // HSPA
6054 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
6055 // IDEN
6056 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
6057 // EVDO Rev. B
6058 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
6059 // LTE
6060 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
6061 // EHRPD
6062 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
6063 // HSPAP
6064 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
6065 // GSM
6066 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
6067 // TD-SCDMA
6068 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
6069 // IWLAN
6070 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
6071 // 5G NR (New Radio)
6072 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
6073 // 5G NRNSA (New Radio Non-Standalone)
6074 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
6075 // LTE CA
6076 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
6077 )
6078
6079 var (
6080 // wifi
6081 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
6082 // wired
6083 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
6084 // cell
6085 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
6086 // unavailable
6087 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
6088 // unknown
6089 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
6090 )
6091
6092 var (
6093 // transmit
6094 NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit")
6095 // receive
6096 NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive")
6097 )
6098
6099 var (
6100 // TCP
6101 NetworkTransportTCP = NetworkTransportKey.String("tcp")
6102 // UDP
6103 NetworkTransportUDP = NetworkTransportKey.String("udp")
6104 // Named or anonymous pipe
6105 NetworkTransportPipe = NetworkTransportKey.String("pipe")
6106 // Unix domain socket
6107 NetworkTransportUnix = NetworkTransportKey.String("unix")
6108 )
6109
6110 var (
6111 // IPv4
6112 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
6113 // IPv6
6114 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
6115 )
6116
6117 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
6118 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
6119 // alpha-2 2-character country code associated with the mobile carrier network.
6120 func NetworkCarrierIcc(val string) attribute.KeyValue {
6121 return NetworkCarrierIccKey.String(val)
6122 }
6123
6124 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
6125 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
6126 // country code.
6127 func NetworkCarrierMcc(val string) attribute.KeyValue {
6128 return NetworkCarrierMccKey.String(val)
6129 }
6130
6131 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
6132 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
6133 // network code.
6134 func NetworkCarrierMnc(val string) attribute.KeyValue {
6135 return NetworkCarrierMncKey.String(val)
6136 }
6137
6138 // NetworkCarrierName returns an attribute KeyValue conforming to the
6139 // "network.carrier.name" semantic conventions. It represents the name of the
6140 // mobile carrier.
6141 func NetworkCarrierName(val string) attribute.KeyValue {
6142 return NetworkCarrierNameKey.String(val)
6143 }
6144
6145 // NetworkLocalAddress returns an attribute KeyValue conforming to the
6146 // "network.local.address" semantic conventions. It represents the local
6147 // address of the network connection - IP address or Unix domain socket name.
6148 func NetworkLocalAddress(val string) attribute.KeyValue {
6149 return NetworkLocalAddressKey.String(val)
6150 }
6151
6152 // NetworkLocalPort returns an attribute KeyValue conforming to the
6153 // "network.local.port" semantic conventions. It represents the local port
6154 // number of the network connection.
6155 func NetworkLocalPort(val int) attribute.KeyValue {
6156 return NetworkLocalPortKey.Int(val)
6157 }
6158
6159 // NetworkPeerAddress returns an attribute KeyValue conforming to the
6160 // "network.peer.address" semantic conventions. It represents the peer address
6161 // of the network connection - IP address or Unix domain socket name.
6162 func NetworkPeerAddress(val string) attribute.KeyValue {
6163 return NetworkPeerAddressKey.String(val)
6164 }
6165
6166 // NetworkPeerPort returns an attribute KeyValue conforming to the
6167 // "network.peer.port" semantic conventions. It represents the peer port number
6168 // of the network connection.
6169 func NetworkPeerPort(val int) attribute.KeyValue {
6170 return NetworkPeerPortKey.Int(val)
6171 }
6172
6173 // NetworkProtocolName returns an attribute KeyValue conforming to the
6174 // "network.protocol.name" semantic conventions. It represents the [OSI
6175 // application layer](https://osi-model.com/application-layer/) or non-OSI
6176 // equivalent.
6177 func NetworkProtocolName(val string) attribute.KeyValue {
6178 return NetworkProtocolNameKey.String(val)
6179 }
6180
6181 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
6182 // "network.protocol.version" semantic conventions. It represents the actual
6183 // version of the protocol used for network communication.
6184 func NetworkProtocolVersion(val string) attribute.KeyValue {
6185 return NetworkProtocolVersionKey.String(val)
6186 }
6187
6188 // An OCI image manifest.
6189 const (
6190 // OciManifestDigestKey is the attribute Key conforming to the
6191 // "oci.manifest.digest" semantic conventions. It represents the digest of
6192 // the OCI image manifest. For container images specifically is the digest
6193 // by which the container image is known.
6194 //
6195 // Type: string
6196 // RequirementLevel: Optional
6197 // Stability: experimental
6198 // Examples:
6199 // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
6200 // Note: Follows [OCI Image Manifest
6201 // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
6202 // and specifically the [Digest
6203 // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
6204 // An example can be found in [Example Image
6205 // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
6206 OciManifestDigestKey = attribute.Key("oci.manifest.digest")
6207 )
6208
6209 // OciManifestDigest returns an attribute KeyValue conforming to the
6210 // "oci.manifest.digest" semantic conventions. It represents the digest of the
6211 // OCI image manifest. For container images specifically is the digest by which
6212 // the container image is known.
6213 func OciManifestDigest(val string) attribute.KeyValue {
6214 return OciManifestDigestKey.String(val)
6215 }
6216
6217 // Attributes used by the OpenTracing Shim layer.
6218 const (
6219 // OpentracingRefTypeKey is the attribute Key conforming to the
6220 // "opentracing.ref_type" semantic conventions. It represents the
6221 // parent-child Reference type
6222 //
6223 // Type: Enum
6224 // RequirementLevel: Optional
6225 // Stability: experimental
6226 // Note: The causal relationship between a child Span and a parent Span.
6227 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
6228 )
6229
6230 var (
6231 // The parent Span depends on the child Span in some capacity
6232 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
6233 // The parent Span doesn't depend in any way on the result of the child Span
6234 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
6235 )
6236
6237 // The operating system (OS) on which the process represented by this resource
6238 // is running.
6239 const (
6240 // OSBuildIDKey is the attribute Key conforming to the "os.build_id"
6241 // semantic conventions. It represents the unique identifier for a
6242 // particular build or compilation of the operating system.
6243 //
6244 // Type: string
6245 // RequirementLevel: Optional
6246 // Stability: experimental
6247 // Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
6248 OSBuildIDKey = attribute.Key("os.build_id")
6249
6250 // OSDescriptionKey is the attribute Key conforming to the "os.description"
6251 // semantic conventions. It represents the human readable (not intended to
6252 // be parsed) OS version information, like e.g. reported by `ver` or
6253 // `lsb_release -a` commands.
6254 //
6255 // Type: string
6256 // RequirementLevel: Optional
6257 // Stability: experimental
6258 // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
6259 // LTS'
6260 OSDescriptionKey = attribute.Key("os.description")
6261
6262 // OSNameKey is the attribute Key conforming to the "os.name" semantic
6263 // conventions. It represents the human readable operating system name.
6264 //
6265 // Type: string
6266 // RequirementLevel: Optional
6267 // Stability: experimental
6268 // Examples: 'iOS', 'Android', 'Ubuntu'
6269 OSNameKey = attribute.Key("os.name")
6270
6271 // OSTypeKey is the attribute Key conforming to the "os.type" semantic
6272 // conventions. It represents the operating system type.
6273 //
6274 // Type: Enum
6275 // RequirementLevel: Optional
6276 // Stability: experimental
6277 OSTypeKey = attribute.Key("os.type")
6278
6279 // OSVersionKey is the attribute Key conforming to the "os.version"
6280 // semantic conventions. It represents the version string of the operating
6281 // system as defined in [Version
6282 // Attributes](/docs/resource/README.md#version-attributes).
6283 //
6284 // Type: string
6285 // RequirementLevel: Optional
6286 // Stability: experimental
6287 // Examples: '14.2.1', '18.04.1'
6288 OSVersionKey = attribute.Key("os.version")
6289 )
6290
6291 var (
6292 // Microsoft Windows
6293 OSTypeWindows = OSTypeKey.String("windows")
6294 // Linux
6295 OSTypeLinux = OSTypeKey.String("linux")
6296 // Apple Darwin
6297 OSTypeDarwin = OSTypeKey.String("darwin")
6298 // FreeBSD
6299 OSTypeFreeBSD = OSTypeKey.String("freebsd")
6300 // NetBSD
6301 OSTypeNetBSD = OSTypeKey.String("netbsd")
6302 // OpenBSD
6303 OSTypeOpenBSD = OSTypeKey.String("openbsd")
6304 // DragonFly BSD
6305 OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
6306 // HP-UX (Hewlett Packard Unix)
6307 OSTypeHPUX = OSTypeKey.String("hpux")
6308 // AIX (Advanced Interactive eXecutive)
6309 OSTypeAIX = OSTypeKey.String("aix")
6310 // SunOS, Oracle Solaris
6311 OSTypeSolaris = OSTypeKey.String("solaris")
6312 // IBM z/OS
6313 OSTypeZOS = OSTypeKey.String("z_os")
6314 )
6315
6316 // OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
6317 // semantic conventions. It represents the unique identifier for a particular
6318 // build or compilation of the operating system.
6319 func OSBuildID(val string) attribute.KeyValue {
6320 return OSBuildIDKey.String(val)
6321 }
6322
6323 // OSDescription returns an attribute KeyValue conforming to the
6324 // "os.description" semantic conventions. It represents the human readable (not
6325 // intended to be parsed) OS version information, like e.g. reported by `ver`
6326 // or `lsb_release -a` commands.
6327 func OSDescription(val string) attribute.KeyValue {
6328 return OSDescriptionKey.String(val)
6329 }
6330
6331 // OSName returns an attribute KeyValue conforming to the "os.name" semantic
6332 // conventions. It represents the human readable operating system name.
6333 func OSName(val string) attribute.KeyValue {
6334 return OSNameKey.String(val)
6335 }
6336
6337 // OSVersion returns an attribute KeyValue conforming to the "os.version"
6338 // semantic conventions. It represents the version string of the operating
6339 // system as defined in [Version
6340 // Attributes](/docs/resource/README.md#version-attributes).
6341 func OSVersion(val string) attribute.KeyValue {
6342 return OSVersionKey.String(val)
6343 }
6344
6345 // Attributes reserved for OpenTelemetry
6346 const (
6347 // OTelStatusCodeKey is the attribute Key conforming to the
6348 // "otel.status_code" semantic conventions. It represents the name of the
6349 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
6350 // UNSET.
6351 //
6352 // Type: Enum
6353 // RequirementLevel: Optional
6354 // Stability: stable
6355 OTelStatusCodeKey = attribute.Key("otel.status_code")
6356
6357 // OTelStatusDescriptionKey is the attribute Key conforming to the
6358 // "otel.status_description" semantic conventions. It represents the
6359 // description of the Status if it has a value, otherwise not set.
6360 //
6361 // Type: string
6362 // RequirementLevel: Optional
6363 // Stability: stable
6364 // Examples: 'resource not found'
6365 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
6366 )
6367
6368 var (
6369 // The operation has been validated by an Application developer or Operator to have completed successfully
6370 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
6371 // The operation contains an error
6372 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
6373 )
6374
6375 // OTelStatusDescription returns an attribute KeyValue conforming to the
6376 // "otel.status_description" semantic conventions. It represents the
6377 // description of the Status if it has a value, otherwise not set.
6378 func OTelStatusDescription(val string) attribute.KeyValue {
6379 return OTelStatusDescriptionKey.String(val)
6380 }
6381
6382 // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
6383 // concepts.
6384 const (
6385 // OTelScopeNameKey is the attribute Key conforming to the
6386 // "otel.scope.name" semantic conventions. It represents the name of the
6387 // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
6388 //
6389 // Type: string
6390 // RequirementLevel: Optional
6391 // Stability: stable
6392 // Examples: 'io.opentelemetry.contrib.mongodb'
6393 OTelScopeNameKey = attribute.Key("otel.scope.name")
6394
6395 // OTelScopeVersionKey is the attribute Key conforming to the
6396 // "otel.scope.version" semantic conventions. It represents the version of
6397 // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
6398 //
6399 // Type: string
6400 // RequirementLevel: Optional
6401 // Stability: stable
6402 // Examples: '1.0.0'
6403 OTelScopeVersionKey = attribute.Key("otel.scope.version")
6404 )
6405
6406 // OTelScopeName returns an attribute KeyValue conforming to the
6407 // "otel.scope.name" semantic conventions. It represents the name of the
6408 // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
6409 func OTelScopeName(val string) attribute.KeyValue {
6410 return OTelScopeNameKey.String(val)
6411 }
6412
6413 // OTelScopeVersion returns an attribute KeyValue conforming to the
6414 // "otel.scope.version" semantic conventions. It represents the version of the
6415 // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
6416 func OTelScopeVersion(val string) attribute.KeyValue {
6417 return OTelScopeVersionKey.String(val)
6418 }
6419
6420 // Operations that access some remote service.
6421 const (
6422 // PeerServiceKey is the attribute Key conforming to the "peer.service"
6423 // semantic conventions. It represents the
6424 // [`service.name`](/docs/resource/README.md#service) of the remote
6425 // service. SHOULD be equal to the actual `service.name` resource attribute
6426 // of the remote service if any.
6427 //
6428 // Type: string
6429 // RequirementLevel: Optional
6430 // Stability: experimental
6431 // Examples: 'AuthTokenCache'
6432 PeerServiceKey = attribute.Key("peer.service")
6433 )
6434
6435 // PeerService returns an attribute KeyValue conforming to the
6436 // "peer.service" semantic conventions. It represents the
6437 // [`service.name`](/docs/resource/README.md#service) of the remote service.
6438 // SHOULD be equal to the actual `service.name` resource attribute of the
6439 // remote service if any.
6440 func PeerService(val string) attribute.KeyValue {
6441 return PeerServiceKey.String(val)
6442 }
6443
6444 // An operating system process.
6445 const (
6446 // ProcessCommandKey is the attribute Key conforming to the
6447 // "process.command" semantic conventions. It represents the command used
6448 // to launch the process (i.e. the command name). On Linux based systems,
6449 // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
6450 // be set to the first parameter extracted from `GetCommandLineW`.
6451 //
6452 // Type: string
6453 // RequirementLevel: Optional
6454 // Stability: experimental
6455 // Examples: 'cmd/otelcol'
6456 ProcessCommandKey = attribute.Key("process.command")
6457
6458 // ProcessCommandArgsKey is the attribute Key conforming to the
6459 // "process.command_args" semantic conventions. It represents the all the
6460 // command arguments (including the command/executable itself) as received
6461 // by the process. On Linux-based systems (and some other Unixoid systems
6462 // supporting procfs), can be set according to the list of null-delimited
6463 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
6464 // this would be the full argv vector passed to `main`.
6465 //
6466 // Type: string[]
6467 // RequirementLevel: Optional
6468 // Stability: experimental
6469 // Examples: 'cmd/otecol', '--config=config.yaml'
6470 ProcessCommandArgsKey = attribute.Key("process.command_args")
6471
6472 // ProcessCommandLineKey is the attribute Key conforming to the
6473 // "process.command_line" semantic conventions. It represents the full
6474 // command used to launch the process as a single string representing the
6475 // full command. On Windows, can be set to the result of `GetCommandLineW`.
6476 // Do not set this if you have to assemble it just for monitoring; use
6477 // `process.command_args` instead.
6478 //
6479 // Type: string
6480 // RequirementLevel: Optional
6481 // Stability: experimental
6482 // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
6483 ProcessCommandLineKey = attribute.Key("process.command_line")
6484
6485 // ProcessContextSwitchTypeKey is the attribute Key conforming to the
6486 // "process.context_switch_type" semantic conventions. It represents the
6487 // specifies whether the context switches for this data point were
6488 // voluntary or involuntary.
6489 //
6490 // Type: Enum
6491 // RequirementLevel: Optional
6492 // Stability: experimental
6493 ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type")
6494
6495 // ProcessCreationTimeKey is the attribute Key conforming to the
6496 // "process.creation.time" semantic conventions. It represents the date and
6497 // time the process was created, in ISO 8601 format.
6498 //
6499 // Type: string
6500 // RequirementLevel: Optional
6501 // Stability: experimental
6502 // Examples: '2023-11-21T09:25:34.853Z'
6503 ProcessCreationTimeKey = attribute.Key("process.creation.time")
6504
6505 // ProcessExecutableNameKey is the attribute Key conforming to the
6506 // "process.executable.name" semantic conventions. It represents the name
6507 // of the process executable. On Linux based systems, can be set to the
6508 // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
6509 // of `GetProcessImageFileNameW`.
6510 //
6511 // Type: string
6512 // RequirementLevel: Optional
6513 // Stability: experimental
6514 // Examples: 'otelcol'
6515 ProcessExecutableNameKey = attribute.Key("process.executable.name")
6516
6517 // ProcessExecutablePathKey is the attribute Key conforming to the
6518 // "process.executable.path" semantic conventions. It represents the full
6519 // path to the process executable. On Linux based systems, can be set to
6520 // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
6521 // `GetProcessImageFileNameW`.
6522 //
6523 // Type: string
6524 // RequirementLevel: Optional
6525 // Stability: experimental
6526 // Examples: '/usr/bin/cmd/otelcol'
6527 ProcessExecutablePathKey = attribute.Key("process.executable.path")
6528
6529 // ProcessExitCodeKey is the attribute Key conforming to the
6530 // "process.exit.code" semantic conventions. It represents the exit code of
6531 // the process.
6532 //
6533 // Type: int
6534 // RequirementLevel: Optional
6535 // Stability: experimental
6536 // Examples: 127
6537 ProcessExitCodeKey = attribute.Key("process.exit.code")
6538
6539 // ProcessExitTimeKey is the attribute Key conforming to the
6540 // "process.exit.time" semantic conventions. It represents the date and
6541 // time the process exited, in ISO 8601 format.
6542 //
6543 // Type: string
6544 // RequirementLevel: Optional
6545 // Stability: experimental
6546 // Examples: '2023-11-21T09:26:12.315Z'
6547 ProcessExitTimeKey = attribute.Key("process.exit.time")
6548
6549 // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
6550 // "process.group_leader.pid" semantic conventions. It represents the PID
6551 // of the process's group leader. This is also the process group ID (PGID)
6552 // of the process.
6553 //
6554 // Type: int
6555 // RequirementLevel: Optional
6556 // Stability: experimental
6557 // Examples: 23
6558 ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
6559
6560 // ProcessInteractiveKey is the attribute Key conforming to the
6561 // "process.interactive" semantic conventions. It represents the whether
6562 // the process is connected to an interactive shell.
6563 //
6564 // Type: boolean
6565 // RequirementLevel: Optional
6566 // Stability: experimental
6567 ProcessInteractiveKey = attribute.Key("process.interactive")
6568
6569 // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
6570 // semantic conventions. It represents the username of the user that owns
6571 // the process.
6572 //
6573 // Type: string
6574 // RequirementLevel: Optional
6575 // Stability: experimental
6576 // Examples: 'root'
6577 ProcessOwnerKey = attribute.Key("process.owner")
6578
6579 // ProcessPagingFaultTypeKey is the attribute Key conforming to the
6580 // "process.paging.fault_type" semantic conventions. It represents the type
6581 // of page fault for this data point. Type `major` is for major/hard page
6582 // faults, and `minor` is for minor/soft page faults.
6583 //
6584 // Type: Enum
6585 // RequirementLevel: Optional
6586 // Stability: experimental
6587 ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type")
6588
6589 // ProcessParentPIDKey is the attribute Key conforming to the
6590 // "process.parent_pid" semantic conventions. It represents the parent
6591 // Process identifier (PPID).
6592 //
6593 // Type: int
6594 // RequirementLevel: Optional
6595 // Stability: experimental
6596 // Examples: 111
6597 ProcessParentPIDKey = attribute.Key("process.parent_pid")
6598
6599 // ProcessPIDKey is the attribute Key conforming to the "process.pid"
6600 // semantic conventions. It represents the process identifier (PID).
6601 //
6602 // Type: int
6603 // RequirementLevel: Optional
6604 // Stability: experimental
6605 // Examples: 1234
6606 ProcessPIDKey = attribute.Key("process.pid")
6607
6608 // ProcessRealUserIDKey is the attribute Key conforming to the
6609 // "process.real_user.id" semantic conventions. It represents the real user
6610 // ID (RUID) of the process.
6611 //
6612 // Type: int
6613 // RequirementLevel: Optional
6614 // Stability: experimental
6615 // Examples: 1000
6616 ProcessRealUserIDKey = attribute.Key("process.real_user.id")
6617
6618 // ProcessRealUserNameKey is the attribute Key conforming to the
6619 // "process.real_user.name" semantic conventions. It represents the
6620 // username of the real user of the process.
6621 //
6622 // Type: string
6623 // RequirementLevel: Optional
6624 // Stability: experimental
6625 // Examples: 'operator'
6626 ProcessRealUserNameKey = attribute.Key("process.real_user.name")
6627
6628 // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
6629 // "process.runtime.description" semantic conventions. It represents an
6630 // additional description about the runtime of the process, for example a
6631 // specific vendor customization of the runtime environment.
6632 //
6633 // Type: string
6634 // RequirementLevel: Optional
6635 // Stability: experimental
6636 // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
6637 ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
6638
6639 // ProcessRuntimeNameKey is the attribute Key conforming to the
6640 // "process.runtime.name" semantic conventions. It represents the name of
6641 // the runtime of this process. For compiled native binaries, this SHOULD
6642 // be the name of the compiler.
6643 //
6644 // Type: string
6645 // RequirementLevel: Optional
6646 // Stability: experimental
6647 // Examples: 'OpenJDK Runtime Environment'
6648 ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
6649
6650 // ProcessRuntimeVersionKey is the attribute Key conforming to the
6651 // "process.runtime.version" semantic conventions. It represents the
6652 // version of the runtime of this process, as returned by the runtime
6653 // without modification.
6654 //
6655 // Type: string
6656 // RequirementLevel: Optional
6657 // Stability: experimental
6658 // Examples: '14.0.2'
6659 ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
6660
6661 // ProcessSavedUserIDKey is the attribute Key conforming to the
6662 // "process.saved_user.id" semantic conventions. It represents the saved
6663 // user ID (SUID) of the process.
6664 //
6665 // Type: int
6666 // RequirementLevel: Optional
6667 // Stability: experimental
6668 // Examples: 1002
6669 ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
6670
6671 // ProcessSavedUserNameKey is the attribute Key conforming to the
6672 // "process.saved_user.name" semantic conventions. It represents the
6673 // username of the saved user.
6674 //
6675 // Type: string
6676 // RequirementLevel: Optional
6677 // Stability: experimental
6678 // Examples: 'operator'
6679 ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
6680
6681 // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
6682 // "process.session_leader.pid" semantic conventions. It represents the PID
6683 // of the process's session leader. This is also the session ID (SID) of
6684 // the process.
6685 //
6686 // Type: int
6687 // RequirementLevel: Optional
6688 // Stability: experimental
6689 // Examples: 14
6690 ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
6691
6692 // ProcessUserIDKey is the attribute Key conforming to the
6693 // "process.user.id" semantic conventions. It represents the effective user
6694 // ID (EUID) of the process.
6695 //
6696 // Type: int
6697 // RequirementLevel: Optional
6698 // Stability: experimental
6699 // Examples: 1001
6700 ProcessUserIDKey = attribute.Key("process.user.id")
6701
6702 // ProcessUserNameKey is the attribute Key conforming to the
6703 // "process.user.name" semantic conventions. It represents the username of
6704 // the effective user of the process.
6705 //
6706 // Type: string
6707 // RequirementLevel: Optional
6708 // Stability: experimental
6709 // Examples: 'root'
6710 ProcessUserNameKey = attribute.Key("process.user.name")
6711
6712 // ProcessVpidKey is the attribute Key conforming to the "process.vpid"
6713 // semantic conventions. It represents the virtual process identifier.
6714 //
6715 // Type: int
6716 // RequirementLevel: Optional
6717 // Stability: experimental
6718 // Examples: 12
6719 // Note: The process ID within a PID namespace. This is not necessarily
6720 // unique across all processes on the host but it is unique within the
6721 // process namespace that the process exists within.
6722 ProcessVpidKey = attribute.Key("process.vpid")
6723 )
6724
6725 var (
6726 // voluntary
6727 ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
6728 // involuntary
6729 ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
6730 )
6731
6732 var (
6733 // major
6734 ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major")
6735 // minor
6736 ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor")
6737 )
6738
6739 // ProcessCommand returns an attribute KeyValue conforming to the
6740 // "process.command" semantic conventions. It represents the command used to
6741 // launch the process (i.e. the command name). On Linux based systems, can be
6742 // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
6743 // the first parameter extracted from `GetCommandLineW`.
6744 func ProcessCommand(val string) attribute.KeyValue {
6745 return ProcessCommandKey.String(val)
6746 }
6747
6748 // ProcessCommandArgs returns an attribute KeyValue conforming to the
6749 // "process.command_args" semantic conventions. It represents the all the
6750 // command arguments (including the command/executable itself) as received by
6751 // the process. On Linux-based systems (and some other Unixoid systems
6752 // supporting procfs), can be set according to the list of null-delimited
6753 // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
6754 // this would be the full argv vector passed to `main`.
6755 func ProcessCommandArgs(val ...string) attribute.KeyValue {
6756 return ProcessCommandArgsKey.StringSlice(val)
6757 }
6758
6759 // ProcessCommandLine returns an attribute KeyValue conforming to the
6760 // "process.command_line" semantic conventions. It represents the full command
6761 // used to launch the process as a single string representing the full command.
6762 // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
6763 // if you have to assemble it just for monitoring; use `process.command_args`
6764 // instead.
6765 func ProcessCommandLine(val string) attribute.KeyValue {
6766 return ProcessCommandLineKey.String(val)
6767 }
6768
6769 // ProcessCreationTime returns an attribute KeyValue conforming to the
6770 // "process.creation.time" semantic conventions. It represents the date and
6771 // time the process was created, in ISO 8601 format.
6772 func ProcessCreationTime(val string) attribute.KeyValue {
6773 return ProcessCreationTimeKey.String(val)
6774 }
6775
6776 // ProcessExecutableName returns an attribute KeyValue conforming to the
6777 // "process.executable.name" semantic conventions. It represents the name of
6778 // the process executable. On Linux based systems, can be set to the `Name` in
6779 // `proc/[pid]/status`. On Windows, can be set to the base name of
6780 // `GetProcessImageFileNameW`.
6781 func ProcessExecutableName(val string) attribute.KeyValue {
6782 return ProcessExecutableNameKey.String(val)
6783 }
6784
6785 // ProcessExecutablePath returns an attribute KeyValue conforming to the
6786 // "process.executable.path" semantic conventions. It represents the full path
6787 // to the process executable. On Linux based systems, can be set to the target
6788 // of `proc/[pid]/exe`. On Windows, can be set to the result of
6789 // `GetProcessImageFileNameW`.
6790 func ProcessExecutablePath(val string) attribute.KeyValue {
6791 return ProcessExecutablePathKey.String(val)
6792 }
6793
6794 // ProcessExitCode returns an attribute KeyValue conforming to the
6795 // "process.exit.code" semantic conventions. It represents the exit code of the
6796 // process.
6797 func ProcessExitCode(val int) attribute.KeyValue {
6798 return ProcessExitCodeKey.Int(val)
6799 }
6800
6801 // ProcessExitTime returns an attribute KeyValue conforming to the
6802 // "process.exit.time" semantic conventions. It represents the date and time
6803 // the process exited, in ISO 8601 format.
6804 func ProcessExitTime(val string) attribute.KeyValue {
6805 return ProcessExitTimeKey.String(val)
6806 }
6807
6808 // ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
6809 // "process.group_leader.pid" semantic conventions. It represents the PID of
6810 // the process's group leader. This is also the process group ID (PGID) of the
6811 // process.
6812 func ProcessGroupLeaderPID(val int) attribute.KeyValue {
6813 return ProcessGroupLeaderPIDKey.Int(val)
6814 }
6815
6816 // ProcessInteractive returns an attribute KeyValue conforming to the
6817 // "process.interactive" semantic conventions. It represents the whether the
6818 // process is connected to an interactive shell.
6819 func ProcessInteractive(val bool) attribute.KeyValue {
6820 return ProcessInteractiveKey.Bool(val)
6821 }
6822
6823 // ProcessOwner returns an attribute KeyValue conforming to the
6824 // "process.owner" semantic conventions. It represents the username of the user
6825 // that owns the process.
6826 func ProcessOwner(val string) attribute.KeyValue {
6827 return ProcessOwnerKey.String(val)
6828 }
6829
6830 // ProcessParentPID returns an attribute KeyValue conforming to the
6831 // "process.parent_pid" semantic conventions. It represents the parent Process
6832 // identifier (PPID).
6833 func ProcessParentPID(val int) attribute.KeyValue {
6834 return ProcessParentPIDKey.Int(val)
6835 }
6836
6837 // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
6838 // semantic conventions. It represents the process identifier (PID).
6839 func ProcessPID(val int) attribute.KeyValue {
6840 return ProcessPIDKey.Int(val)
6841 }
6842
6843 // ProcessRealUserID returns an attribute KeyValue conforming to the
6844 // "process.real_user.id" semantic conventions. It represents the real user ID
6845 // (RUID) of the process.
6846 func ProcessRealUserID(val int) attribute.KeyValue {
6847 return ProcessRealUserIDKey.Int(val)
6848 }
6849
6850 // ProcessRealUserName returns an attribute KeyValue conforming to the
6851 // "process.real_user.name" semantic conventions. It represents the username of
6852 // the real user of the process.
6853 func ProcessRealUserName(val string) attribute.KeyValue {
6854 return ProcessRealUserNameKey.String(val)
6855 }
6856
6857 // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
6858 // "process.runtime.description" semantic conventions. It represents an
6859 // additional description about the runtime of the process, for example a
6860 // specific vendor customization of the runtime environment.
6861 func ProcessRuntimeDescription(val string) attribute.KeyValue {
6862 return ProcessRuntimeDescriptionKey.String(val)
6863 }
6864
6865 // ProcessRuntimeName returns an attribute KeyValue conforming to the
6866 // "process.runtime.name" semantic conventions. It represents the name of the
6867 // runtime of this process. For compiled native binaries, this SHOULD be the
6868 // name of the compiler.
6869 func ProcessRuntimeName(val string) attribute.KeyValue {
6870 return ProcessRuntimeNameKey.String(val)
6871 }
6872
6873 // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
6874 // "process.runtime.version" semantic conventions. It represents the version of
6875 // the runtime of this process, as returned by the runtime without
6876 // modification.
6877 func ProcessRuntimeVersion(val string) attribute.KeyValue {
6878 return ProcessRuntimeVersionKey.String(val)
6879 }
6880
6881 // ProcessSavedUserID returns an attribute KeyValue conforming to the
6882 // "process.saved_user.id" semantic conventions. It represents the saved user
6883 // ID (SUID) of the process.
6884 func ProcessSavedUserID(val int) attribute.KeyValue {
6885 return ProcessSavedUserIDKey.Int(val)
6886 }
6887
6888 // ProcessSavedUserName returns an attribute KeyValue conforming to the
6889 // "process.saved_user.name" semantic conventions. It represents the username
6890 // of the saved user.
6891 func ProcessSavedUserName(val string) attribute.KeyValue {
6892 return ProcessSavedUserNameKey.String(val)
6893 }
6894
6895 // ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
6896 // "process.session_leader.pid" semantic conventions. It represents the PID of
6897 // the process's session leader. This is also the session ID (SID) of the
6898 // process.
6899 func ProcessSessionLeaderPID(val int) attribute.KeyValue {
6900 return ProcessSessionLeaderPIDKey.Int(val)
6901 }
6902
6903 // ProcessUserID returns an attribute KeyValue conforming to the
6904 // "process.user.id" semantic conventions. It represents the effective user ID
6905 // (EUID) of the process.
6906 func ProcessUserID(val int) attribute.KeyValue {
6907 return ProcessUserIDKey.Int(val)
6908 }
6909
6910 // ProcessUserName returns an attribute KeyValue conforming to the
6911 // "process.user.name" semantic conventions. It represents the username of the
6912 // effective user of the process.
6913 func ProcessUserName(val string) attribute.KeyValue {
6914 return ProcessUserNameKey.String(val)
6915 }
6916
6917 // ProcessVpid returns an attribute KeyValue conforming to the
6918 // "process.vpid" semantic conventions. It represents the virtual process
6919 // identifier.
6920 func ProcessVpid(val int) attribute.KeyValue {
6921 return ProcessVpidKey.Int(val)
6922 }
6923
6924 // Attributes for process CPU
6925 const (
6926 // ProcessCPUStateKey is the attribute Key conforming to the
6927 // "process.cpu.state" semantic conventions. It represents the CPU state of
6928 // the process.
6929 //
6930 // Type: Enum
6931 // RequirementLevel: Optional
6932 // Stability: experimental
6933 ProcessCPUStateKey = attribute.Key("process.cpu.state")
6934 )
6935
6936 var (
6937 // system
6938 ProcessCPUStateSystem = ProcessCPUStateKey.String("system")
6939 // user
6940 ProcessCPUStateUser = ProcessCPUStateKey.String("user")
6941 // wait
6942 ProcessCPUStateWait = ProcessCPUStateKey.String("wait")
6943 )
6944
6945 // Attributes for remote procedure calls.
6946 const (
6947 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
6948 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
6949 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
6950 // Connect request. Error codes are always string values.
6951 //
6952 // Type: Enum
6953 // RequirementLevel: Optional
6954 // Stability: experimental
6955 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
6956
6957 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
6958 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
6959 // status
6960 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
6961 // the gRPC request.
6962 //
6963 // Type: Enum
6964 // RequirementLevel: Optional
6965 // Stability: experimental
6966 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
6967
6968 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
6969 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
6970 // `error.code` property of response if it is an error response.
6971 //
6972 // Type: int
6973 // RequirementLevel: Optional
6974 // Stability: experimental
6975 // Examples: -32700, 100
6976 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
6977
6978 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
6979 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
6980 // `error.message` property of response if it is an error response.
6981 //
6982 // Type: string
6983 // RequirementLevel: Optional
6984 // Stability: experimental
6985 // Examples: 'Parse error', 'User already exists'
6986 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
6987
6988 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
6989 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
6990 // property of request or response. Since protocol allows id to be int,
6991 // string, `null` or missing (for notifications), value is expected to be
6992 // cast to string for simplicity. Use empty string in case of `null` value.
6993 // Omit entirely if this is a notification.
6994 //
6995 // Type: string
6996 // RequirementLevel: Optional
6997 // Stability: experimental
6998 // Examples: '10', 'request-7', ''
6999 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
7000
7001 // RPCJsonrpcVersionKey is the attribute Key conforming to the
7002 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
7003 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
7004 // doesn't specify this, the value can be omitted.
7005 //
7006 // Type: string
7007 // RequirementLevel: Optional
7008 // Stability: experimental
7009 // Examples: '2.0', '1.0'
7010 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
7011
7012 // RPCMessageCompressedSizeKey is the attribute Key conforming to the
7013 // "rpc.message.compressed_size" semantic conventions. It represents the
7014 // compressed size of the message in bytes.
7015 //
7016 // Type: int
7017 // RequirementLevel: Optional
7018 // Stability: experimental
7019 RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size")
7020
7021 // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id"
7022 // semantic conventions. It represents the mUST be calculated as two
7023 // different counters starting from `1` one for sent messages and one for
7024 // received message.
7025 //
7026 // Type: int
7027 // RequirementLevel: Optional
7028 // Stability: experimental
7029 // Note: This way we guarantee that the values will be consistent between
7030 // different implementations.
7031 RPCMessageIDKey = attribute.Key("rpc.message.id")
7032
7033 // RPCMessageTypeKey is the attribute Key conforming to the
7034 // "rpc.message.type" semantic conventions. It represents the whether this
7035 // is a received or sent message.
7036 //
7037 // Type: Enum
7038 // RequirementLevel: Optional
7039 // Stability: experimental
7040 RPCMessageTypeKey = attribute.Key("rpc.message.type")
7041
7042 // RPCMessageUncompressedSizeKey is the attribute Key conforming to the
7043 // "rpc.message.uncompressed_size" semantic conventions. It represents the
7044 // uncompressed size of the message in bytes.
7045 //
7046 // Type: int
7047 // RequirementLevel: Optional
7048 // Stability: experimental
7049 RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size")
7050
7051 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
7052 // semantic conventions. It represents the name of the (logical) method
7053 // being called, must be equal to the $method part in the span name.
7054 //
7055 // Type: string
7056 // RequirementLevel: Optional
7057 // Stability: experimental
7058 // Examples: 'exampleMethod'
7059 // Note: This is the logical name of the method from the RPC interface
7060 // perspective, which can be different from the name of any implementing
7061 // method/function. The `code.function` attribute may be used to store the
7062 // latter (e.g., method actually executing the call on the server side, RPC
7063 // client stub method on the client side).
7064 RPCMethodKey = attribute.Key("rpc.method")
7065
7066 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
7067 // semantic conventions. It represents the full (logical) name of the
7068 // service being called, including its package name, if applicable.
7069 //
7070 // Type: string
7071 // RequirementLevel: Optional
7072 // Stability: experimental
7073 // Examples: 'myservice.EchoService'
7074 // Note: This is the logical name of the service from the RPC interface
7075 // perspective, which can be different from the name of any implementing
7076 // class. The `code.namespace` attribute may be used to store the latter
7077 // (despite the attribute name, it may include a class name; e.g., class
7078 // with method actually executing the call on the server side, RPC client
7079 // stub class on the client side).
7080 RPCServiceKey = attribute.Key("rpc.service")
7081
7082 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
7083 // semantic conventions. It represents a string identifying the remoting
7084 // system. See below for a list of well-known identifiers.
7085 //
7086 // Type: Enum
7087 // RequirementLevel: Optional
7088 // Stability: experimental
7089 RPCSystemKey = attribute.Key("rpc.system")
7090 )
7091
7092 var (
7093 // cancelled
7094 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
7095 // unknown
7096 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
7097 // invalid_argument
7098 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
7099 // deadline_exceeded
7100 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
7101 // not_found
7102 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
7103 // already_exists
7104 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
7105 // permission_denied
7106 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
7107 // resource_exhausted
7108 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
7109 // failed_precondition
7110 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
7111 // aborted
7112 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
7113 // out_of_range
7114 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
7115 // unimplemented
7116 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
7117 // internal
7118 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
7119 // unavailable
7120 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
7121 // data_loss
7122 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
7123 // unauthenticated
7124 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
7125 )
7126
7127 var (
7128 // OK
7129 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
7130 // CANCELLED
7131 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
7132 // UNKNOWN
7133 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
7134 // INVALID_ARGUMENT
7135 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
7136 // DEADLINE_EXCEEDED
7137 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
7138 // NOT_FOUND
7139 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
7140 // ALREADY_EXISTS
7141 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
7142 // PERMISSION_DENIED
7143 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
7144 // RESOURCE_EXHAUSTED
7145 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
7146 // FAILED_PRECONDITION
7147 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
7148 // ABORTED
7149 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
7150 // OUT_OF_RANGE
7151 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
7152 // UNIMPLEMENTED
7153 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
7154 // INTERNAL
7155 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
7156 // UNAVAILABLE
7157 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
7158 // DATA_LOSS
7159 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
7160 // UNAUTHENTICATED
7161 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
7162 )
7163
7164 var (
7165 // sent
7166 RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
7167 // received
7168 RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
7169 )
7170
7171 var (
7172 // gRPC
7173 RPCSystemGRPC = RPCSystemKey.String("grpc")
7174 // Java RMI
7175 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
7176 // .NET WCF
7177 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
7178 // Apache Dubbo
7179 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
7180 // Connect RPC
7181 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
7182 )
7183
7184 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
7185 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
7186 // `error.code` property of response if it is an error response.
7187 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
7188 return RPCJsonrpcErrorCodeKey.Int(val)
7189 }
7190
7191 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
7192 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
7193 // `error.message` property of response if it is an error response.
7194 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
7195 return RPCJsonrpcErrorMessageKey.String(val)
7196 }
7197
7198 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
7199 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
7200 // property of request or response. Since protocol allows id to be int, string,
7201 // `null` or missing (for notifications), value is expected to be cast to
7202 // string for simplicity. Use empty string in case of `null` value. Omit
7203 // entirely if this is a notification.
7204 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
7205 return RPCJsonrpcRequestIDKey.String(val)
7206 }
7207
7208 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
7209 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
7210 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
7211 // doesn't specify this, the value can be omitted.
7212 func RPCJsonrpcVersion(val string) attribute.KeyValue {
7213 return RPCJsonrpcVersionKey.String(val)
7214 }
7215
7216 // RPCMessageCompressedSize returns an attribute KeyValue conforming to the
7217 // "rpc.message.compressed_size" semantic conventions. It represents the
7218 // compressed size of the message in bytes.
7219 func RPCMessageCompressedSize(val int) attribute.KeyValue {
7220 return RPCMessageCompressedSizeKey.Int(val)
7221 }
7222
7223 // RPCMessageID returns an attribute KeyValue conforming to the
7224 // "rpc.message.id" semantic conventions. It represents the mUST be calculated
7225 // as two different counters starting from `1` one for sent messages and one
7226 // for received message.
7227 func RPCMessageID(val int) attribute.KeyValue {
7228 return RPCMessageIDKey.Int(val)
7229 }
7230
7231 // RPCMessageUncompressedSize returns an attribute KeyValue conforming to
7232 // the "rpc.message.uncompressed_size" semantic conventions. It represents the
7233 // uncompressed size of the message in bytes.
7234 func RPCMessageUncompressedSize(val int) attribute.KeyValue {
7235 return RPCMessageUncompressedSizeKey.Int(val)
7236 }
7237
7238 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
7239 // semantic conventions. It represents the name of the (logical) method being
7240 // called, must be equal to the $method part in the span name.
7241 func RPCMethod(val string) attribute.KeyValue {
7242 return RPCMethodKey.String(val)
7243 }
7244
7245 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
7246 // semantic conventions. It represents the full (logical) name of the service
7247 // being called, including its package name, if applicable.
7248 func RPCService(val string) attribute.KeyValue {
7249 return RPCServiceKey.String(val)
7250 }
7251
7252 // These attributes may be used to describe the server in a connection-based
7253 // network interaction where there is one side that initiates the connection
7254 // (the client is the side that initiates the connection). This covers all TCP
7255 // network interactions since TCP is connection-based and one side initiates
7256 // the connection (an exception is made for peer-to-peer communication over TCP
7257 // where the "user-facing" surface of the protocol / API doesn't expose a clear
7258 // notion of client and server). This also covers UDP network interactions
7259 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
7260 const (
7261 // ServerAddressKey is the attribute Key conforming to the "server.address"
7262 // semantic conventions. It represents the server domain name if available
7263 // without reverse DNS lookup; otherwise, IP address or Unix domain socket
7264 // name.
7265 //
7266 // Type: string
7267 // RequirementLevel: Optional
7268 // Stability: stable
7269 // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
7270 // Note: When observed from the client side, and when communicating through
7271 // an intermediary, `server.address` SHOULD represent the server address
7272 // behind any intermediaries, for example proxies, if it's available.
7273 ServerAddressKey = attribute.Key("server.address")
7274
7275 // ServerPortKey is the attribute Key conforming to the "server.port"
7276 // semantic conventions. It represents the server port number.
7277 //
7278 // Type: int
7279 // RequirementLevel: Optional
7280 // Stability: stable
7281 // Examples: 80, 8080, 443
7282 // Note: When observed from the client side, and when communicating through
7283 // an intermediary, `server.port` SHOULD represent the server port behind
7284 // any intermediaries, for example proxies, if it's available.
7285 ServerPortKey = attribute.Key("server.port")
7286 )
7287
7288 // ServerAddress returns an attribute KeyValue conforming to the
7289 // "server.address" semantic conventions. It represents the server domain name
7290 // if available without reverse DNS lookup; otherwise, IP address or Unix
7291 // domain socket name.
7292 func ServerAddress(val string) attribute.KeyValue {
7293 return ServerAddressKey.String(val)
7294 }
7295
7296 // ServerPort returns an attribute KeyValue conforming to the "server.port"
7297 // semantic conventions. It represents the server port number.
7298 func ServerPort(val int) attribute.KeyValue {
7299 return ServerPortKey.Int(val)
7300 }
7301
7302 // A service instance.
7303 const (
7304 // ServiceInstanceIDKey is the attribute Key conforming to the
7305 // "service.instance.id" semantic conventions. It represents the string ID
7306 // of the service instance.
7307 //
7308 // Type: string
7309 // RequirementLevel: Optional
7310 // Stability: experimental
7311 // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
7312 // Note: MUST be unique for each instance of the same
7313 // `service.namespace,service.name` pair (in other words
7314 // `service.namespace,service.name,service.instance.id` triplet MUST be
7315 // globally unique). The ID helps to
7316 // distinguish instances of the same service that exist at the same time
7317 // (e.g. instances of a horizontally scaled
7318 // service).
7319 //
7320 // Implementations, such as SDKs, are recommended to generate a random
7321 // Version 1 or Version 4 [RFC
7322 // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an
7323 // inherent unique ID as the source of
7324 // this value if stability is desirable. In that case, the ID SHOULD be
7325 // used as source of a UUID Version 5 and
7326 // SHOULD use the following UUID as the namespace:
7327 // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
7328 //
7329 // UUIDs are typically recommended, as only an opaque value for the
7330 // purposes of identifying a service instance is
7331 // needed. Similar to what can be seen in the man page for the
7332 // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html)
7333 // file, the underlying
7334 // data, such as pod name and namespace should be treated as confidential,
7335 // being the user's choice to expose it
7336 // or not via another resource attribute.
7337 //
7338 // For applications running behind an application server (like unicorn), we
7339 // do not recommend using one identifier
7340 // for all processes participating in the application. Instead, it's
7341 // recommended each division (e.g. a worker
7342 // thread in unicorn) to have its own instance.id.
7343 //
7344 // It's not recommended for a Collector to set `service.instance.id` if it
7345 // can't unambiguously determine the
7346 // service instance that is generating that telemetry. For instance,
7347 // creating an UUID based on `pod.name` will
7348 // likely be wrong, as the Collector might not know from which container
7349 // within that pod the telemetry originated.
7350 // However, Collectors can set the `service.instance.id` if they can
7351 // unambiguously determine the service instance
7352 // for that telemetry. This is typically the case for scraping receivers,
7353 // as they know the target address and
7354 // port.
7355 ServiceInstanceIDKey = attribute.Key("service.instance.id")
7356
7357 // ServiceNameKey is the attribute Key conforming to the "service.name"
7358 // semantic conventions. It represents the logical name of the service.
7359 //
7360 // Type: string
7361 // RequirementLevel: Optional
7362 // Stability: stable
7363 // Examples: 'shoppingcart'
7364 // Note: MUST be the same for all instances of horizontally scaled
7365 // services. If the value was not specified, SDKs MUST fallback to
7366 // `unknown_service:` concatenated with
7367 // [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If
7368 // `process.executable.name` is not available, the value MUST be set to
7369 // `unknown_service`.
7370 ServiceNameKey = attribute.Key("service.name")
7371
7372 // ServiceNamespaceKey is the attribute Key conforming to the
7373 // "service.namespace" semantic conventions. It represents a namespace for
7374 // `service.name`.
7375 //
7376 // Type: string
7377 // RequirementLevel: Optional
7378 // Stability: experimental
7379 // Examples: 'Shop'
7380 // Note: A string value having a meaning that helps to distinguish a group
7381 // of services, for example the team name that owns a group of services.
7382 // `service.name` is expected to be unique within the same namespace. If
7383 // `service.namespace` is not specified in the Resource then `service.name`
7384 // is expected to be unique for all services that have no explicit
7385 // namespace defined (so the empty/unspecified namespace is simply one more
7386 // valid namespace). Zero-length namespace string is assumed equal to
7387 // unspecified namespace.
7388 ServiceNamespaceKey = attribute.Key("service.namespace")
7389
7390 // ServiceVersionKey is the attribute Key conforming to the
7391 // "service.version" semantic conventions. It represents the version string
7392 // of the service API or implementation. The format is not defined by these
7393 // conventions.
7394 //
7395 // Type: string
7396 // RequirementLevel: Optional
7397 // Stability: stable
7398 // Examples: '2.0.0', 'a01dbef8a'
7399 ServiceVersionKey = attribute.Key("service.version")
7400 )
7401
7402 // ServiceInstanceID returns an attribute KeyValue conforming to the
7403 // "service.instance.id" semantic conventions. It represents the string ID of
7404 // the service instance.
7405 func ServiceInstanceID(val string) attribute.KeyValue {
7406 return ServiceInstanceIDKey.String(val)
7407 }
7408
7409 // ServiceName returns an attribute KeyValue conforming to the
7410 // "service.name" semantic conventions. It represents the logical name of the
7411 // service.
7412 func ServiceName(val string) attribute.KeyValue {
7413 return ServiceNameKey.String(val)
7414 }
7415
7416 // ServiceNamespace returns an attribute KeyValue conforming to the
7417 // "service.namespace" semantic conventions. It represents a namespace for
7418 // `service.name`.
7419 func ServiceNamespace(val string) attribute.KeyValue {
7420 return ServiceNamespaceKey.String(val)
7421 }
7422
7423 // ServiceVersion returns an attribute KeyValue conforming to the
7424 // "service.version" semantic conventions. It represents the version string of
7425 // the service API or implementation. The format is not defined by these
7426 // conventions.
7427 func ServiceVersion(val string) attribute.KeyValue {
7428 return ServiceVersionKey.String(val)
7429 }
7430
7431 // Session is defined as the period of time encompassing all activities
7432 // performed by the application and the actions executed by the end user.
7433 // Consequently, a Session is represented as a collection of Logs, Events, and
7434 // Spans emitted by the Client Application throughout the Session's duration.
7435 // Each Session is assigned a unique identifier, which is included as an
7436 // attribute in the Logs, Events, and Spans generated during the Session's
7437 // lifecycle.
7438 // When a session reaches end of life, typically due to user inactivity or
7439 // session timeout, a new session identifier will be assigned. The previous
7440 // session identifier may be provided by the instrumentation so that telemetry
7441 // backends can link the two sessions.
7442 const (
7443 // SessionIDKey is the attribute Key conforming to the "session.id"
7444 // semantic conventions. It represents a unique id to identify a session.
7445 //
7446 // Type: string
7447 // RequirementLevel: Optional
7448 // Stability: experimental
7449 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
7450 SessionIDKey = attribute.Key("session.id")
7451
7452 // SessionPreviousIDKey is the attribute Key conforming to the
7453 // "session.previous_id" semantic conventions. It represents the previous
7454 // `session.id` for this user, when known.
7455 //
7456 // Type: string
7457 // RequirementLevel: Optional
7458 // Stability: experimental
7459 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
7460 SessionPreviousIDKey = attribute.Key("session.previous_id")
7461 )
7462
7463 // SessionID returns an attribute KeyValue conforming to the "session.id"
7464 // semantic conventions. It represents a unique id to identify a session.
7465 func SessionID(val string) attribute.KeyValue {
7466 return SessionIDKey.String(val)
7467 }
7468
7469 // SessionPreviousID returns an attribute KeyValue conforming to the
7470 // "session.previous_id" semantic conventions. It represents the previous
7471 // `session.id` for this user, when known.
7472 func SessionPreviousID(val string) attribute.KeyValue {
7473 return SessionPreviousIDKey.String(val)
7474 }
7475
7476 // SignalR attributes
7477 const (
7478 // SignalrConnectionStatusKey is the attribute Key conforming to the
7479 // "signalr.connection.status" semantic conventions. It represents the
7480 // signalR HTTP connection closure status.
7481 //
7482 // Type: Enum
7483 // RequirementLevel: Optional
7484 // Stability: stable
7485 // Examples: 'app_shutdown', 'timeout'
7486 SignalrConnectionStatusKey = attribute.Key("signalr.connection.status")
7487
7488 // SignalrTransportKey is the attribute Key conforming to the
7489 // "signalr.transport" semantic conventions. It represents the [SignalR
7490 // transport
7491 // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)
7492 //
7493 // Type: Enum
7494 // RequirementLevel: Optional
7495 // Stability: stable
7496 // Examples: 'web_sockets', 'long_polling'
7497 SignalrTransportKey = attribute.Key("signalr.transport")
7498 )
7499
7500 var (
7501 // The connection was closed normally
7502 SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure")
7503 // The connection was closed due to a timeout
7504 SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout")
7505 // The connection was closed because the app is shutting down
7506 SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown")
7507 )
7508
7509 var (
7510 // ServerSentEvents protocol
7511 SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events")
7512 // LongPolling protocol
7513 SignalrTransportLongPolling = SignalrTransportKey.String("long_polling")
7514 // WebSockets protocol
7515 SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets")
7516 )
7517
7518 // These attributes may be used to describe the sender of a network
7519 // exchange/packet. These should be used when there is no client/server
7520 // relationship between the two sides, or when that relationship is unknown.
7521 // This covers low-level network interactions (e.g. packet tracing) where you
7522 // don't know if there was a connection or which side initiated it. This also
7523 // covers unidirectional UDP flows and peer-to-peer communication where the
7524 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
7525 // client and server.
7526 const (
7527 // SourceAddressKey is the attribute Key conforming to the "source.address"
7528 // semantic conventions. It represents the source address - domain name if
7529 // available without reverse DNS lookup; otherwise, IP address or Unix
7530 // domain socket name.
7531 //
7532 // Type: string
7533 // RequirementLevel: Optional
7534 // Stability: experimental
7535 // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
7536 // Note: When observed from the destination side, and when communicating
7537 // through an intermediary, `source.address` SHOULD represent the source
7538 // address behind any intermediaries, for example proxies, if it's
7539 // available.
7540 SourceAddressKey = attribute.Key("source.address")
7541
7542 // SourcePortKey is the attribute Key conforming to the "source.port"
7543 // semantic conventions. It represents the source port number
7544 //
7545 // Type: int
7546 // RequirementLevel: Optional
7547 // Stability: experimental
7548 // Examples: 3389, 2888
7549 SourcePortKey = attribute.Key("source.port")
7550 )
7551
7552 // SourceAddress returns an attribute KeyValue conforming to the
7553 // "source.address" semantic conventions. It represents the source address -
7554 // domain name if available without reverse DNS lookup; otherwise, IP address
7555 // or Unix domain socket name.
7556 func SourceAddress(val string) attribute.KeyValue {
7557 return SourceAddressKey.String(val)
7558 }
7559
7560 // SourcePort returns an attribute KeyValue conforming to the "source.port"
7561 // semantic conventions. It represents the source port number
7562 func SourcePort(val int) attribute.KeyValue {
7563 return SourcePortKey.Int(val)
7564 }
7565
7566 // Describes System attributes
7567 const (
7568 // SystemDeviceKey is the attribute Key conforming to the "system.device"
7569 // semantic conventions. It represents the device identifier
7570 //
7571 // Type: string
7572 // RequirementLevel: Optional
7573 // Stability: experimental
7574 // Examples: '(identifier)'
7575 SystemDeviceKey = attribute.Key("system.device")
7576 )
7577
7578 // SystemDevice returns an attribute KeyValue conforming to the
7579 // "system.device" semantic conventions. It represents the device identifier
7580 func SystemDevice(val string) attribute.KeyValue {
7581 return SystemDeviceKey.String(val)
7582 }
7583
7584 // Describes System CPU attributes
7585 const (
7586 // SystemCPULogicalNumberKey is the attribute Key conforming to the
7587 // "system.cpu.logical_number" semantic conventions. It represents the
7588 // logical CPU number [0..n-1]
7589 //
7590 // Type: int
7591 // RequirementLevel: Optional
7592 // Stability: experimental
7593 // Examples: 1
7594 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
7595
7596 // SystemCPUStateKey is the attribute Key conforming to the
7597 // "system.cpu.state" semantic conventions. It represents the state of the
7598 // CPU
7599 //
7600 // Type: Enum
7601 // RequirementLevel: Optional
7602 // Stability: experimental
7603 // Examples: 'idle', 'interrupt'
7604 SystemCPUStateKey = attribute.Key("system.cpu.state")
7605 )
7606
7607 var (
7608 // user
7609 SystemCPUStateUser = SystemCPUStateKey.String("user")
7610 // system
7611 SystemCPUStateSystem = SystemCPUStateKey.String("system")
7612 // nice
7613 SystemCPUStateNice = SystemCPUStateKey.String("nice")
7614 // idle
7615 SystemCPUStateIdle = SystemCPUStateKey.String("idle")
7616 // iowait
7617 SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
7618 // interrupt
7619 SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
7620 // steal
7621 SystemCPUStateSteal = SystemCPUStateKey.String("steal")
7622 )
7623
7624 // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
7625 // "system.cpu.logical_number" semantic conventions. It represents the logical
7626 // CPU number [0..n-1]
7627 func SystemCPULogicalNumber(val int) attribute.KeyValue {
7628 return SystemCPULogicalNumberKey.Int(val)
7629 }
7630
7631 // Describes System Memory attributes
7632 const (
7633 // SystemMemoryStateKey is the attribute Key conforming to the
7634 // "system.memory.state" semantic conventions. It represents the memory
7635 // state
7636 //
7637 // Type: Enum
7638 // RequirementLevel: Optional
7639 // Stability: experimental
7640 // Examples: 'free', 'cached'
7641 SystemMemoryStateKey = attribute.Key("system.memory.state")
7642 )
7643
7644 var (
7645 // used
7646 SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
7647 // free
7648 SystemMemoryStateFree = SystemMemoryStateKey.String("free")
7649 // shared
7650 SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
7651 // buffers
7652 SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
7653 // cached
7654 SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
7655 )
7656
7657 // Describes System Memory Paging attributes
7658 const (
7659 // SystemPagingDirectionKey is the attribute Key conforming to the
7660 // "system.paging.direction" semantic conventions. It represents the paging
7661 // access direction
7662 //
7663 // Type: Enum
7664 // RequirementLevel: Optional
7665 // Stability: experimental
7666 // Examples: 'in'
7667 SystemPagingDirectionKey = attribute.Key("system.paging.direction")
7668
7669 // SystemPagingStateKey is the attribute Key conforming to the
7670 // "system.paging.state" semantic conventions. It represents the memory
7671 // paging state
7672 //
7673 // Type: Enum
7674 // RequirementLevel: Optional
7675 // Stability: experimental
7676 // Examples: 'free'
7677 SystemPagingStateKey = attribute.Key("system.paging.state")
7678
7679 // SystemPagingTypeKey is the attribute Key conforming to the
7680 // "system.paging.type" semantic conventions. It represents the memory
7681 // paging type
7682 //
7683 // Type: Enum
7684 // RequirementLevel: Optional
7685 // Stability: experimental
7686 // Examples: 'minor'
7687 SystemPagingTypeKey = attribute.Key("system.paging.type")
7688 )
7689
7690 var (
7691 // in
7692 SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
7693 // out
7694 SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
7695 )
7696
7697 var (
7698 // used
7699 SystemPagingStateUsed = SystemPagingStateKey.String("used")
7700 // free
7701 SystemPagingStateFree = SystemPagingStateKey.String("free")
7702 )
7703
7704 var (
7705 // major
7706 SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
7707 // minor
7708 SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
7709 )
7710
7711 // Describes Filesystem attributes
7712 const (
7713 // SystemFilesystemModeKey is the attribute Key conforming to the
7714 // "system.filesystem.mode" semantic conventions. It represents the
7715 // filesystem mode
7716 //
7717 // Type: string
7718 // RequirementLevel: Optional
7719 // Stability: experimental
7720 // Examples: 'rw, ro'
7721 SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
7722
7723 // SystemFilesystemMountpointKey is the attribute Key conforming to the
7724 // "system.filesystem.mountpoint" semantic conventions. It represents the
7725 // filesystem mount path
7726 //
7727 // Type: string
7728 // RequirementLevel: Optional
7729 // Stability: experimental
7730 // Examples: '/mnt/data'
7731 SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
7732
7733 // SystemFilesystemStateKey is the attribute Key conforming to the
7734 // "system.filesystem.state" semantic conventions. It represents the
7735 // filesystem state
7736 //
7737 // Type: Enum
7738 // RequirementLevel: Optional
7739 // Stability: experimental
7740 // Examples: 'used'
7741 SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
7742
7743 // SystemFilesystemTypeKey is the attribute Key conforming to the
7744 // "system.filesystem.type" semantic conventions. It represents the
7745 // filesystem type
7746 //
7747 // Type: Enum
7748 // RequirementLevel: Optional
7749 // Stability: experimental
7750 // Examples: 'ext4'
7751 SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
7752 )
7753
7754 var (
7755 // used
7756 SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
7757 // free
7758 SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
7759 // reserved
7760 SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
7761 )
7762
7763 var (
7764 // fat32
7765 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
7766 // exfat
7767 SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
7768 // ntfs
7769 SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
7770 // refs
7771 SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
7772 // hfsplus
7773 SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
7774 // ext4
7775 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
7776 )
7777
7778 // SystemFilesystemMode returns an attribute KeyValue conforming to the
7779 // "system.filesystem.mode" semantic conventions. It represents the filesystem
7780 // mode
7781 func SystemFilesystemMode(val string) attribute.KeyValue {
7782 return SystemFilesystemModeKey.String(val)
7783 }
7784
7785 // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
7786 // the "system.filesystem.mountpoint" semantic conventions. It represents the
7787 // filesystem mount path
7788 func SystemFilesystemMountpoint(val string) attribute.KeyValue {
7789 return SystemFilesystemMountpointKey.String(val)
7790 }
7791
7792 // Describes Network attributes
7793 const (
7794 // SystemNetworkStateKey is the attribute Key conforming to the
7795 // "system.network.state" semantic conventions. It represents a stateless
7796 // protocol MUST NOT set this attribute
7797 //
7798 // Type: Enum
7799 // RequirementLevel: Optional
7800 // Stability: experimental
7801 // Examples: 'close_wait'
7802 SystemNetworkStateKey = attribute.Key("system.network.state")
7803 )
7804
7805 var (
7806 // close
7807 SystemNetworkStateClose = SystemNetworkStateKey.String("close")
7808 // close_wait
7809 SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
7810 // closing
7811 SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
7812 // delete
7813 SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
7814 // established
7815 SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
7816 // fin_wait_1
7817 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
7818 // fin_wait_2
7819 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
7820 // last_ack
7821 SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
7822 // listen
7823 SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
7824 // syn_recv
7825 SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
7826 // syn_sent
7827 SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
7828 // time_wait
7829 SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
7830 )
7831
7832 // Describes System Process attributes
7833 const (
7834 // SystemProcessStatusKey is the attribute Key conforming to the
7835 // "system.process.status" semantic conventions. It represents the process
7836 // state, e.g., [Linux Process State
7837 // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
7838 //
7839 // Type: Enum
7840 // RequirementLevel: Optional
7841 // Stability: experimental
7842 // Examples: 'running'
7843 SystemProcessStatusKey = attribute.Key("system.process.status")
7844 )
7845
7846 var (
7847 // running
7848 SystemProcessStatusRunning = SystemProcessStatusKey.String("running")
7849 // sleeping
7850 SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping")
7851 // stopped
7852 SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped")
7853 // defunct
7854 SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct")
7855 )
7856
7857 // Attributes for telemetry SDK.
7858 const (
7859 // TelemetrySDKLanguageKey is the attribute Key conforming to the
7860 // "telemetry.sdk.language" semantic conventions. It represents the
7861 // language of the telemetry SDK.
7862 //
7863 // Type: Enum
7864 // RequirementLevel: Required
7865 // Stability: stable
7866 TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
7867
7868 // TelemetrySDKNameKey is the attribute Key conforming to the
7869 // "telemetry.sdk.name" semantic conventions. It represents the name of the
7870 // telemetry SDK as defined above.
7871 //
7872 // Type: string
7873 // RequirementLevel: Required
7874 // Stability: stable
7875 // Examples: 'opentelemetry'
7876 // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
7877 // to `opentelemetry`.
7878 // If another SDK, like a fork or a vendor-provided implementation, is
7879 // used, this SDK MUST set the
7880 // `telemetry.sdk.name` attribute to the fully-qualified class or module
7881 // name of this SDK's main entry point
7882 // or another suitable identifier depending on the language.
7883 // The identifier `opentelemetry` is reserved and MUST NOT be used in this
7884 // case.
7885 // All custom identifiers SHOULD be stable across different versions of an
7886 // implementation.
7887 TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
7888
7889 // TelemetrySDKVersionKey is the attribute Key conforming to the
7890 // "telemetry.sdk.version" semantic conventions. It represents the version
7891 // string of the telemetry SDK.
7892 //
7893 // Type: string
7894 // RequirementLevel: Required
7895 // Stability: stable
7896 // Examples: '1.2.3'
7897 TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
7898
7899 // TelemetryDistroNameKey is the attribute Key conforming to the
7900 // "telemetry.distro.name" semantic conventions. It represents the name of
7901 // the auto instrumentation agent or distribution, if used.
7902 //
7903 // Type: string
7904 // RequirementLevel: Optional
7905 // Stability: experimental
7906 // Examples: 'parts-unlimited-java'
7907 // Note: Official auto instrumentation agents and distributions SHOULD set
7908 // the `telemetry.distro.name` attribute to
7909 // a string starting with `opentelemetry-`, e.g.
7910 // `opentelemetry-java-instrumentation`.
7911 TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
7912
7913 // TelemetryDistroVersionKey is the attribute Key conforming to the
7914 // "telemetry.distro.version" semantic conventions. It represents the
7915 // version string of the auto instrumentation agent or distribution, if
7916 // used.
7917 //
7918 // Type: string
7919 // RequirementLevel: Optional
7920 // Stability: experimental
7921 // Examples: '1.2.3'
7922 TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
7923 )
7924
7925 var (
7926 // cpp
7927 TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
7928 // dotnet
7929 TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
7930 // erlang
7931 TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
7932 // go
7933 TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
7934 // java
7935 TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
7936 // nodejs
7937 TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
7938 // php
7939 TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
7940 // python
7941 TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
7942 // ruby
7943 TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
7944 // rust
7945 TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
7946 // swift
7947 TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
7948 // webjs
7949 TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
7950 )
7951
7952 // TelemetrySDKName returns an attribute KeyValue conforming to the
7953 // "telemetry.sdk.name" semantic conventions. It represents the name of the
7954 // telemetry SDK as defined above.
7955 func TelemetrySDKName(val string) attribute.KeyValue {
7956 return TelemetrySDKNameKey.String(val)
7957 }
7958
7959 // TelemetrySDKVersion returns an attribute KeyValue conforming to the
7960 // "telemetry.sdk.version" semantic conventions. It represents the version
7961 // string of the telemetry SDK.
7962 func TelemetrySDKVersion(val string) attribute.KeyValue {
7963 return TelemetrySDKVersionKey.String(val)
7964 }
7965
7966 // TelemetryDistroName returns an attribute KeyValue conforming to the
7967 // "telemetry.distro.name" semantic conventions. It represents the name of the
7968 // auto instrumentation agent or distribution, if used.
7969 func TelemetryDistroName(val string) attribute.KeyValue {
7970 return TelemetryDistroNameKey.String(val)
7971 }
7972
7973 // TelemetryDistroVersion returns an attribute KeyValue conforming to the
7974 // "telemetry.distro.version" semantic conventions. It represents the version
7975 // string of the auto instrumentation agent or distribution, if used.
7976 func TelemetryDistroVersion(val string) attribute.KeyValue {
7977 return TelemetryDistroVersionKey.String(val)
7978 }
7979
7980 // These attributes may be used for any operation to store information about a
7981 // thread that started a span.
7982 const (
7983 // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
7984 // conventions. It represents the current "managed" thread ID (as opposed
7985 // to OS thread ID).
7986 //
7987 // Type: int
7988 // RequirementLevel: Optional
7989 // Stability: experimental
7990 // Examples: 42
7991 ThreadIDKey = attribute.Key("thread.id")
7992
7993 // ThreadNameKey is the attribute Key conforming to the "thread.name"
7994 // semantic conventions. It represents the current thread name.
7995 //
7996 // Type: string
7997 // RequirementLevel: Optional
7998 // Stability: experimental
7999 // Examples: 'main'
8000 ThreadNameKey = attribute.Key("thread.name")
8001 )
8002
8003 // ThreadID returns an attribute KeyValue conforming to the "thread.id"
8004 // semantic conventions. It represents the current "managed" thread ID (as
8005 // opposed to OS thread ID).
8006 func ThreadID(val int) attribute.KeyValue {
8007 return ThreadIDKey.Int(val)
8008 }
8009
8010 // ThreadName returns an attribute KeyValue conforming to the "thread.name"
8011 // semantic conventions. It represents the current thread name.
8012 func ThreadName(val string) attribute.KeyValue {
8013 return ThreadNameKey.String(val)
8014 }
8015
8016 // Semantic convention attributes in the TLS namespace.
8017 const (
8018 // TLSCipherKey is the attribute Key conforming to the "tls.cipher"
8019 // semantic conventions. It represents the string indicating the
8020 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5)
8021 // used during the current connection.
8022 //
8023 // Type: string
8024 // RequirementLevel: Optional
8025 // Stability: experimental
8026 // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',
8027 // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
8028 // Note: The values allowed for `tls.cipher` MUST be one of the
8029 // `Descriptions` of the [registered TLS Cipher
8030 // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).
8031 TLSCipherKey = attribute.Key("tls.cipher")
8032
8033 // TLSClientCertificateKey is the attribute Key conforming to the
8034 // "tls.client.certificate" semantic conventions. It represents the
8035 // pEM-encoded stand-alone certificate offered by the client. This is
8036 // usually mutually-exclusive of `client.certificate_chain` since this
8037 // value also exists in that list.
8038 //
8039 // Type: string
8040 // RequirementLevel: Optional
8041 // Stability: experimental
8042 // Examples: 'MII...'
8043 TLSClientCertificateKey = attribute.Key("tls.client.certificate")
8044
8045 // TLSClientCertificateChainKey is the attribute Key conforming to the
8046 // "tls.client.certificate_chain" semantic conventions. It represents the
8047 // array of PEM-encoded certificates that make up the certificate chain
8048 // offered by the client. This is usually mutually-exclusive of
8049 // `client.certificate` since that value should be the first certificate in
8050 // the chain.
8051 //
8052 // Type: string[]
8053 // RequirementLevel: Optional
8054 // Stability: experimental
8055 // Examples: 'MII...', 'MI...'
8056 TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
8057
8058 // TLSClientHashMd5Key is the attribute Key conforming to the
8059 // "tls.client.hash.md5" semantic conventions. It represents the
8060 // certificate fingerprint using the MD5 digest of DER-encoded version of
8061 // certificate offered by the client. For consistency with other hash
8062 // values, this value should be formatted as an uppercase hash.
8063 //
8064 // Type: string
8065 // RequirementLevel: Optional
8066 // Stability: experimental
8067 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
8068 TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
8069
8070 // TLSClientHashSha1Key is the attribute Key conforming to the
8071 // "tls.client.hash.sha1" semantic conventions. It represents the
8072 // certificate fingerprint using the SHA1 digest of DER-encoded version of
8073 // certificate offered by the client. For consistency with other hash
8074 // values, this value should be formatted as an uppercase hash.
8075 //
8076 // Type: string
8077 // RequirementLevel: Optional
8078 // Stability: experimental
8079 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
8080 TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
8081
8082 // TLSClientHashSha256Key is the attribute Key conforming to the
8083 // "tls.client.hash.sha256" semantic conventions. It represents the
8084 // certificate fingerprint using the SHA256 digest of DER-encoded version
8085 // of certificate offered by the client. For consistency with other hash
8086 // values, this value should be formatted as an uppercase hash.
8087 //
8088 // Type: string
8089 // RequirementLevel: Optional
8090 // Stability: experimental
8091 // Examples:
8092 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
8093 TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
8094
8095 // TLSClientIssuerKey is the attribute Key conforming to the
8096 // "tls.client.issuer" semantic conventions. It represents the
8097 // distinguished name of
8098 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
8099 // of the issuer of the x.509 certificate presented by the client.
8100 //
8101 // Type: string
8102 // RequirementLevel: Optional
8103 // Stability: experimental
8104 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
8105 // DC=com'
8106 TLSClientIssuerKey = attribute.Key("tls.client.issuer")
8107
8108 // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
8109 // semantic conventions. It represents a hash that identifies clients based
8110 // on how they perform an SSL/TLS handshake.
8111 //
8112 // Type: string
8113 // RequirementLevel: Optional
8114 // Stability: experimental
8115 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
8116 TLSClientJa3Key = attribute.Key("tls.client.ja3")
8117
8118 // TLSClientNotAfterKey is the attribute Key conforming to the
8119 // "tls.client.not_after" semantic conventions. It represents the date/Time
8120 // indicating when client certificate is no longer considered valid.
8121 //
8122 // Type: string
8123 // RequirementLevel: Optional
8124 // Stability: experimental
8125 // Examples: '2021-01-01T00:00:00.000Z'
8126 TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
8127
8128 // TLSClientNotBeforeKey is the attribute Key conforming to the
8129 // "tls.client.not_before" semantic conventions. It represents the
8130 // date/Time indicating when client certificate is first considered valid.
8131 //
8132 // Type: string
8133 // RequirementLevel: Optional
8134 // Stability: experimental
8135 // Examples: '1970-01-01T00:00:00.000Z'
8136 TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
8137
8138 // TLSClientServerNameKey is the attribute Key conforming to the
8139 // "tls.client.server_name" semantic conventions. It represents the also
8140 // called an SNI, this tells the server which hostname to which the client
8141 // is attempting to connect to.
8142 //
8143 // Type: string
8144 // RequirementLevel: Optional
8145 // Stability: experimental
8146 // Examples: 'opentelemetry.io'
8147 TLSClientServerNameKey = attribute.Key("tls.client.server_name")
8148
8149 // TLSClientSubjectKey is the attribute Key conforming to the
8150 // "tls.client.subject" semantic conventions. It represents the
8151 // distinguished name of subject of the x.509 certificate presented by the
8152 // client.
8153 //
8154 // Type: string
8155 // RequirementLevel: Optional
8156 // Stability: experimental
8157 // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com'
8158 TLSClientSubjectKey = attribute.Key("tls.client.subject")
8159
8160 // TLSClientSupportedCiphersKey is the attribute Key conforming to the
8161 // "tls.client.supported_ciphers" semantic conventions. It represents the
8162 // array of ciphers offered by the client during the client hello.
8163 //
8164 // Type: string[]
8165 // RequirementLevel: Optional
8166 // Stability: experimental
8167 // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
8168 // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."'
8169 TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
8170
8171 // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
8172 // conventions. It represents the string indicating the curve used for the
8173 // given cipher, when applicable
8174 //
8175 // Type: string
8176 // RequirementLevel: Optional
8177 // Stability: experimental
8178 // Examples: 'secp256r1'
8179 TLSCurveKey = attribute.Key("tls.curve")
8180
8181 // TLSEstablishedKey is the attribute Key conforming to the
8182 // "tls.established" semantic conventions. It represents the boolean flag
8183 // indicating if the TLS negotiation was successful and transitioned to an
8184 // encrypted tunnel.
8185 //
8186 // Type: boolean
8187 // RequirementLevel: Optional
8188 // Stability: experimental
8189 // Examples: True
8190 TLSEstablishedKey = attribute.Key("tls.established")
8191
8192 // TLSNextProtocolKey is the attribute Key conforming to the
8193 // "tls.next_protocol" semantic conventions. It represents the string
8194 // indicating the protocol being tunneled. Per the values in the [IANA
8195 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
8196 // this string should be lower case.
8197 //
8198 // Type: string
8199 // RequirementLevel: Optional
8200 // Stability: experimental
8201 // Examples: 'http/1.1'
8202 TLSNextProtocolKey = attribute.Key("tls.next_protocol")
8203
8204 // TLSProtocolNameKey is the attribute Key conforming to the
8205 // "tls.protocol.name" semantic conventions. It represents the normalized
8206 // lowercase protocol name parsed from original string of the negotiated
8207 // [SSL/TLS protocol
8208 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
8209 //
8210 // Type: Enum
8211 // RequirementLevel: Optional
8212 // Stability: experimental
8213 TLSProtocolNameKey = attribute.Key("tls.protocol.name")
8214
8215 // TLSProtocolVersionKey is the attribute Key conforming to the
8216 // "tls.protocol.version" semantic conventions. It represents the numeric
8217 // part of the version parsed from the original string of the negotiated
8218 // [SSL/TLS protocol
8219 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
8220 //
8221 // Type: string
8222 // RequirementLevel: Optional
8223 // Stability: experimental
8224 // Examples: '1.2', '3'
8225 TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
8226
8227 // TLSResumedKey is the attribute Key conforming to the "tls.resumed"
8228 // semantic conventions. It represents the boolean flag indicating if this
8229 // TLS connection was resumed from an existing TLS negotiation.
8230 //
8231 // Type: boolean
8232 // RequirementLevel: Optional
8233 // Stability: experimental
8234 // Examples: True
8235 TLSResumedKey = attribute.Key("tls.resumed")
8236
8237 // TLSServerCertificateKey is the attribute Key conforming to the
8238 // "tls.server.certificate" semantic conventions. It represents the
8239 // pEM-encoded stand-alone certificate offered by the server. This is
8240 // usually mutually-exclusive of `server.certificate_chain` since this
8241 // value also exists in that list.
8242 //
8243 // Type: string
8244 // RequirementLevel: Optional
8245 // Stability: experimental
8246 // Examples: 'MII...'
8247 TLSServerCertificateKey = attribute.Key("tls.server.certificate")
8248
8249 // TLSServerCertificateChainKey is the attribute Key conforming to the
8250 // "tls.server.certificate_chain" semantic conventions. It represents the
8251 // array of PEM-encoded certificates that make up the certificate chain
8252 // offered by the server. This is usually mutually-exclusive of
8253 // `server.certificate` since that value should be the first certificate in
8254 // the chain.
8255 //
8256 // Type: string[]
8257 // RequirementLevel: Optional
8258 // Stability: experimental
8259 // Examples: 'MII...', 'MI...'
8260 TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
8261
8262 // TLSServerHashMd5Key is the attribute Key conforming to the
8263 // "tls.server.hash.md5" semantic conventions. It represents the
8264 // certificate fingerprint using the MD5 digest of DER-encoded version of
8265 // certificate offered by the server. For consistency with other hash
8266 // values, this value should be formatted as an uppercase hash.
8267 //
8268 // Type: string
8269 // RequirementLevel: Optional
8270 // Stability: experimental
8271 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
8272 TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
8273
8274 // TLSServerHashSha1Key is the attribute Key conforming to the
8275 // "tls.server.hash.sha1" semantic conventions. It represents the
8276 // certificate fingerprint using the SHA1 digest of DER-encoded version of
8277 // certificate offered by the server. For consistency with other hash
8278 // values, this value should be formatted as an uppercase hash.
8279 //
8280 // Type: string
8281 // RequirementLevel: Optional
8282 // Stability: experimental
8283 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
8284 TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
8285
8286 // TLSServerHashSha256Key is the attribute Key conforming to the
8287 // "tls.server.hash.sha256" semantic conventions. It represents the
8288 // certificate fingerprint using the SHA256 digest of DER-encoded version
8289 // of certificate offered by the server. For consistency with other hash
8290 // values, this value should be formatted as an uppercase hash.
8291 //
8292 // Type: string
8293 // RequirementLevel: Optional
8294 // Stability: experimental
8295 // Examples:
8296 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
8297 TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
8298
8299 // TLSServerIssuerKey is the attribute Key conforming to the
8300 // "tls.server.issuer" semantic conventions. It represents the
8301 // distinguished name of
8302 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
8303 // of the issuer of the x.509 certificate presented by the client.
8304 //
8305 // Type: string
8306 // RequirementLevel: Optional
8307 // Stability: experimental
8308 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
8309 // DC=com'
8310 TLSServerIssuerKey = attribute.Key("tls.server.issuer")
8311
8312 // TLSServerJa3sKey is the attribute Key conforming to the
8313 // "tls.server.ja3s" semantic conventions. It represents a hash that
8314 // identifies servers based on how they perform an SSL/TLS handshake.
8315 //
8316 // Type: string
8317 // RequirementLevel: Optional
8318 // Stability: experimental
8319 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
8320 TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
8321
8322 // TLSServerNotAfterKey is the attribute Key conforming to the
8323 // "tls.server.not_after" semantic conventions. It represents the date/Time
8324 // indicating when server certificate is no longer considered valid.
8325 //
8326 // Type: string
8327 // RequirementLevel: Optional
8328 // Stability: experimental
8329 // Examples: '2021-01-01T00:00:00.000Z'
8330 TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
8331
8332 // TLSServerNotBeforeKey is the attribute Key conforming to the
8333 // "tls.server.not_before" semantic conventions. It represents the
8334 // date/Time indicating when server certificate is first considered valid.
8335 //
8336 // Type: string
8337 // RequirementLevel: Optional
8338 // Stability: experimental
8339 // Examples: '1970-01-01T00:00:00.000Z'
8340 TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
8341
8342 // TLSServerSubjectKey is the attribute Key conforming to the
8343 // "tls.server.subject" semantic conventions. It represents the
8344 // distinguished name of subject of the x.509 certificate presented by the
8345 // server.
8346 //
8347 // Type: string
8348 // RequirementLevel: Optional
8349 // Stability: experimental
8350 // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com'
8351 TLSServerSubjectKey = attribute.Key("tls.server.subject")
8352 )
8353
8354 var (
8355 // ssl
8356 TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
8357 // tls
8358 TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
8359 )
8360
8361 // TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
8362 // semantic conventions. It represents the string indicating the
8363 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used
8364 // during the current connection.
8365 func TLSCipher(val string) attribute.KeyValue {
8366 return TLSCipherKey.String(val)
8367 }
8368
8369 // TLSClientCertificate returns an attribute KeyValue conforming to the
8370 // "tls.client.certificate" semantic conventions. It represents the pEM-encoded
8371 // stand-alone certificate offered by the client. This is usually
8372 // mutually-exclusive of `client.certificate_chain` since this value also
8373 // exists in that list.
8374 func TLSClientCertificate(val string) attribute.KeyValue {
8375 return TLSClientCertificateKey.String(val)
8376 }
8377
8378 // TLSClientCertificateChain returns an attribute KeyValue conforming to the
8379 // "tls.client.certificate_chain" semantic conventions. It represents the array
8380 // of PEM-encoded certificates that make up the certificate chain offered by
8381 // the client. This is usually mutually-exclusive of `client.certificate` since
8382 // that value should be the first certificate in the chain.
8383 func TLSClientCertificateChain(val ...string) attribute.KeyValue {
8384 return TLSClientCertificateChainKey.StringSlice(val)
8385 }
8386
8387 // TLSClientHashMd5 returns an attribute KeyValue conforming to the
8388 // "tls.client.hash.md5" semantic conventions. It represents the certificate
8389 // fingerprint using the MD5 digest of DER-encoded version of certificate
8390 // offered by the client. For consistency with other hash values, this value
8391 // should be formatted as an uppercase hash.
8392 func TLSClientHashMd5(val string) attribute.KeyValue {
8393 return TLSClientHashMd5Key.String(val)
8394 }
8395
8396 // TLSClientHashSha1 returns an attribute KeyValue conforming to the
8397 // "tls.client.hash.sha1" semantic conventions. It represents the certificate
8398 // fingerprint using the SHA1 digest of DER-encoded version of certificate
8399 // offered by the client. For consistency with other hash values, this value
8400 // should be formatted as an uppercase hash.
8401 func TLSClientHashSha1(val string) attribute.KeyValue {
8402 return TLSClientHashSha1Key.String(val)
8403 }
8404
8405 // TLSClientHashSha256 returns an attribute KeyValue conforming to the
8406 // "tls.client.hash.sha256" semantic conventions. It represents the certificate
8407 // fingerprint using the SHA256 digest of DER-encoded version of certificate
8408 // offered by the client. For consistency with other hash values, this value
8409 // should be formatted as an uppercase hash.
8410 func TLSClientHashSha256(val string) attribute.KeyValue {
8411 return TLSClientHashSha256Key.String(val)
8412 }
8413
8414 // TLSClientIssuer returns an attribute KeyValue conforming to the
8415 // "tls.client.issuer" semantic conventions. It represents the distinguished
8416 // name of
8417 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
8418 // the issuer of the x.509 certificate presented by the client.
8419 func TLSClientIssuer(val string) attribute.KeyValue {
8420 return TLSClientIssuerKey.String(val)
8421 }
8422
8423 // TLSClientJa3 returns an attribute KeyValue conforming to the
8424 // "tls.client.ja3" semantic conventions. It represents a hash that identifies
8425 // clients based on how they perform an SSL/TLS handshake.
8426 func TLSClientJa3(val string) attribute.KeyValue {
8427 return TLSClientJa3Key.String(val)
8428 }
8429
8430 // TLSClientNotAfter returns an attribute KeyValue conforming to the
8431 // "tls.client.not_after" semantic conventions. It represents the date/Time
8432 // indicating when client certificate is no longer considered valid.
8433 func TLSClientNotAfter(val string) attribute.KeyValue {
8434 return TLSClientNotAfterKey.String(val)
8435 }
8436
8437 // TLSClientNotBefore returns an attribute KeyValue conforming to the
8438 // "tls.client.not_before" semantic conventions. It represents the date/Time
8439 // indicating when client certificate is first considered valid.
8440 func TLSClientNotBefore(val string) attribute.KeyValue {
8441 return TLSClientNotBeforeKey.String(val)
8442 }
8443
8444 // TLSClientServerName returns an attribute KeyValue conforming to the
8445 // "tls.client.server_name" semantic conventions. It represents the also called
8446 // an SNI, this tells the server which hostname to which the client is
8447 // attempting to connect to.
8448 func TLSClientServerName(val string) attribute.KeyValue {
8449 return TLSClientServerNameKey.String(val)
8450 }
8451
8452 // TLSClientSubject returns an attribute KeyValue conforming to the
8453 // "tls.client.subject" semantic conventions. It represents the distinguished
8454 // name of subject of the x.509 certificate presented by the client.
8455 func TLSClientSubject(val string) attribute.KeyValue {
8456 return TLSClientSubjectKey.String(val)
8457 }
8458
8459 // TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
8460 // "tls.client.supported_ciphers" semantic conventions. It represents the array
8461 // of ciphers offered by the client during the client hello.
8462 func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
8463 return TLSClientSupportedCiphersKey.StringSlice(val)
8464 }
8465
8466 // TLSCurve returns an attribute KeyValue conforming to the "tls.curve"
8467 // semantic conventions. It represents the string indicating the curve used for
8468 // the given cipher, when applicable
8469 func TLSCurve(val string) attribute.KeyValue {
8470 return TLSCurveKey.String(val)
8471 }
8472
8473 // TLSEstablished returns an attribute KeyValue conforming to the
8474 // "tls.established" semantic conventions. It represents the boolean flag
8475 // indicating if the TLS negotiation was successful and transitioned to an
8476 // encrypted tunnel.
8477 func TLSEstablished(val bool) attribute.KeyValue {
8478 return TLSEstablishedKey.Bool(val)
8479 }
8480
8481 // TLSNextProtocol returns an attribute KeyValue conforming to the
8482 // "tls.next_protocol" semantic conventions. It represents the string
8483 // indicating the protocol being tunneled. Per the values in the [IANA
8484 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
8485 // this string should be lower case.
8486 func TLSNextProtocol(val string) attribute.KeyValue {
8487 return TLSNextProtocolKey.String(val)
8488 }
8489
8490 // TLSProtocolVersion returns an attribute KeyValue conforming to the
8491 // "tls.protocol.version" semantic conventions. It represents the numeric part
8492 // of the version parsed from the original string of the negotiated [SSL/TLS
8493 // protocol
8494 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
8495 func TLSProtocolVersion(val string) attribute.KeyValue {
8496 return TLSProtocolVersionKey.String(val)
8497 }
8498
8499 // TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
8500 // semantic conventions. It represents the boolean flag indicating if this TLS
8501 // connection was resumed from an existing TLS negotiation.
8502 func TLSResumed(val bool) attribute.KeyValue {
8503 return TLSResumedKey.Bool(val)
8504 }
8505
8506 // TLSServerCertificate returns an attribute KeyValue conforming to the
8507 // "tls.server.certificate" semantic conventions. It represents the pEM-encoded
8508 // stand-alone certificate offered by the server. This is usually
8509 // mutually-exclusive of `server.certificate_chain` since this value also
8510 // exists in that list.
8511 func TLSServerCertificate(val string) attribute.KeyValue {
8512 return TLSServerCertificateKey.String(val)
8513 }
8514
8515 // TLSServerCertificateChain returns an attribute KeyValue conforming to the
8516 // "tls.server.certificate_chain" semantic conventions. It represents the array
8517 // of PEM-encoded certificates that make up the certificate chain offered by
8518 // the server. This is usually mutually-exclusive of `server.certificate` since
8519 // that value should be the first certificate in the chain.
8520 func TLSServerCertificateChain(val ...string) attribute.KeyValue {
8521 return TLSServerCertificateChainKey.StringSlice(val)
8522 }
8523
8524 // TLSServerHashMd5 returns an attribute KeyValue conforming to the
8525 // "tls.server.hash.md5" semantic conventions. It represents the certificate
8526 // fingerprint using the MD5 digest of DER-encoded version of certificate
8527 // offered by the server. For consistency with other hash values, this value
8528 // should be formatted as an uppercase hash.
8529 func TLSServerHashMd5(val string) attribute.KeyValue {
8530 return TLSServerHashMd5Key.String(val)
8531 }
8532
8533 // TLSServerHashSha1 returns an attribute KeyValue conforming to the
8534 // "tls.server.hash.sha1" semantic conventions. It represents the certificate
8535 // fingerprint using the SHA1 digest of DER-encoded version of certificate
8536 // offered by the server. For consistency with other hash values, this value
8537 // should be formatted as an uppercase hash.
8538 func TLSServerHashSha1(val string) attribute.KeyValue {
8539 return TLSServerHashSha1Key.String(val)
8540 }
8541
8542 // TLSServerHashSha256 returns an attribute KeyValue conforming to the
8543 // "tls.server.hash.sha256" semantic conventions. It represents the certificate
8544 // fingerprint using the SHA256 digest of DER-encoded version of certificate
8545 // offered by the server. For consistency with other hash values, this value
8546 // should be formatted as an uppercase hash.
8547 func TLSServerHashSha256(val string) attribute.KeyValue {
8548 return TLSServerHashSha256Key.String(val)
8549 }
8550
8551 // TLSServerIssuer returns an attribute KeyValue conforming to the
8552 // "tls.server.issuer" semantic conventions. It represents the distinguished
8553 // name of
8554 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
8555 // the issuer of the x.509 certificate presented by the client.
8556 func TLSServerIssuer(val string) attribute.KeyValue {
8557 return TLSServerIssuerKey.String(val)
8558 }
8559
8560 // TLSServerJa3s returns an attribute KeyValue conforming to the
8561 // "tls.server.ja3s" semantic conventions. It represents a hash that identifies
8562 // servers based on how they perform an SSL/TLS handshake.
8563 func TLSServerJa3s(val string) attribute.KeyValue {
8564 return TLSServerJa3sKey.String(val)
8565 }
8566
8567 // TLSServerNotAfter returns an attribute KeyValue conforming to the
8568 // "tls.server.not_after" semantic conventions. It represents the date/Time
8569 // indicating when server certificate is no longer considered valid.
8570 func TLSServerNotAfter(val string) attribute.KeyValue {
8571 return TLSServerNotAfterKey.String(val)
8572 }
8573
8574 // TLSServerNotBefore returns an attribute KeyValue conforming to the
8575 // "tls.server.not_before" semantic conventions. It represents the date/Time
8576 // indicating when server certificate is first considered valid.
8577 func TLSServerNotBefore(val string) attribute.KeyValue {
8578 return TLSServerNotBeforeKey.String(val)
8579 }
8580
8581 // TLSServerSubject returns an attribute KeyValue conforming to the
8582 // "tls.server.subject" semantic conventions. It represents the distinguished
8583 // name of subject of the x.509 certificate presented by the server.
8584 func TLSServerSubject(val string) attribute.KeyValue {
8585 return TLSServerSubjectKey.String(val)
8586 }
8587
8588 // Attributes describing URL.
8589 const (
8590 // URLDomainKey is the attribute Key conforming to the "url.domain"
8591 // semantic conventions. It represents the domain extracted from the
8592 // `url.full`, such as "opentelemetry.io".
8593 //
8594 // Type: string
8595 // RequirementLevel: Optional
8596 // Stability: experimental
8597 // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2',
8598 // '[1080:0:0:0:8:800:200C:417A]'
8599 // Note: In some cases a URL may refer to an IP and/or port directly,
8600 // without a domain name. In this case, the IP address would go to the
8601 // domain field. If the URL contains a [literal IPv6
8602 // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by
8603 // `[` and `]`, the `[` and `]` characters should also be captured in the
8604 // domain field.
8605 URLDomainKey = attribute.Key("url.domain")
8606
8607 // URLExtensionKey is the attribute Key conforming to the "url.extension"
8608 // semantic conventions. It represents the file extension extracted from
8609 // the `url.full`, excluding the leading dot.
8610 //
8611 // Type: string
8612 // RequirementLevel: Optional
8613 // Stability: experimental
8614 // Examples: 'png', 'gz'
8615 // Note: The file extension is only set if it exists, as not every url has
8616 // a file extension. When the file name has multiple extensions
8617 // `example.tar.gz`, only the last one should be captured `gz`, not
8618 // `tar.gz`.
8619 URLExtensionKey = attribute.Key("url.extension")
8620
8621 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
8622 // semantic conventions. It represents the [URI
8623 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
8624 //
8625 // Type: string
8626 // RequirementLevel: Optional
8627 // Stability: stable
8628 // Examples: 'SemConv'
8629 URLFragmentKey = attribute.Key("url.fragment")
8630
8631 // URLFullKey is the attribute Key conforming to the "url.full" semantic
8632 // conventions. It represents the absolute URL describing a network
8633 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
8634 //
8635 // Type: string
8636 // RequirementLevel: Optional
8637 // Stability: stable
8638 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
8639 // '//localhost'
8640 // Note: For network calls, URL usually has
8641 // `scheme://host[:port][path][?query][#fragment]` format, where the
8642 // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
8643 // included nevertheless.
8644 // `url.full` MUST NOT contain credentials passed via URL in form of
8645 // `https://username:password@www.example.com/`. In such case username and
8646 // password SHOULD be redacted and attribute's value SHOULD be
8647 // `https://REDACTED:REDACTED@www.example.com/`.
8648 // `url.full` SHOULD capture the absolute URL when it is available (or can
8649 // be reconstructed). Sensitive content provided in `url.full` SHOULD be
8650 // scrubbed when instrumentations can identify it.
8651 URLFullKey = attribute.Key("url.full")
8652
8653 // URLOriginalKey is the attribute Key conforming to the "url.original"
8654 // semantic conventions. It represents the unmodified original URL as seen
8655 // in the event source.
8656 //
8657 // Type: string
8658 // RequirementLevel: Optional
8659 // Stability: experimental
8660 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
8661 // 'search?q=OpenTelemetry'
8662 // Note: In network monitoring, the observed URL may be a full URL, whereas
8663 // in access logs, the URL is often just represented as a path. This field
8664 // is meant to represent the URL as it was observed, complete or not.
8665 // `url.original` might contain credentials passed via URL in form of
8666 // `https://username:password@www.example.com/`. In such case password and
8667 // username SHOULD NOT be redacted and attribute's value SHOULD remain the
8668 // same.
8669 URLOriginalKey = attribute.Key("url.original")
8670
8671 // URLPathKey is the attribute Key conforming to the "url.path" semantic
8672 // conventions. It represents the [URI
8673 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
8674 //
8675 // Type: string
8676 // RequirementLevel: Optional
8677 // Stability: stable
8678 // Examples: '/search'
8679 // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
8680 // instrumentations can identify it.
8681 URLPathKey = attribute.Key("url.path")
8682
8683 // URLPortKey is the attribute Key conforming to the "url.port" semantic
8684 // conventions. It represents the port extracted from the `url.full`
8685 //
8686 // Type: int
8687 // RequirementLevel: Optional
8688 // Stability: experimental
8689 // Examples: 443
8690 URLPortKey = attribute.Key("url.port")
8691
8692 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
8693 // conventions. It represents the [URI
8694 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
8695 //
8696 // Type: string
8697 // RequirementLevel: Optional
8698 // Stability: stable
8699 // Examples: 'q=OpenTelemetry'
8700 // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
8701 // instrumentations can identify it.
8702 URLQueryKey = attribute.Key("url.query")
8703
8704 // URLRegisteredDomainKey is the attribute Key conforming to the
8705 // "url.registered_domain" semantic conventions. It represents the highest
8706 // registered url domain, stripped of the subdomain.
8707 //
8708 // Type: string
8709 // RequirementLevel: Optional
8710 // Stability: experimental
8711 // Examples: 'example.com', 'foo.co.uk'
8712 // Note: This value can be determined precisely with the [public suffix
8713 // list](http://publicsuffix.org). For example, the registered domain for
8714 // `foo.example.com` is `example.com`. Trying to approximate this by simply
8715 // taking the last two labels will not work well for TLDs such as `co.uk`.
8716 URLRegisteredDomainKey = attribute.Key("url.registered_domain")
8717
8718 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
8719 // semantic conventions. It represents the [URI
8720 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
8721 // identifying the used protocol.
8722 //
8723 // Type: string
8724 // RequirementLevel: Optional
8725 // Stability: stable
8726 // Examples: 'https', 'ftp', 'telnet'
8727 URLSchemeKey = attribute.Key("url.scheme")
8728
8729 // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
8730 // semantic conventions. It represents the subdomain portion of a fully
8731 // qualified domain name includes all of the names except the host name
8732 // under the registered_domain. In a partially qualified domain, or if the
8733 // qualification level of the full name cannot be determined, subdomain
8734 // contains all of the names below the registered domain.
8735 //
8736 // Type: string
8737 // RequirementLevel: Optional
8738 // Stability: experimental
8739 // Examples: 'east', 'sub2.sub1'
8740 // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If
8741 // the domain has multiple levels of subdomain, such as
8742 // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`,
8743 // with no trailing period.
8744 URLSubdomainKey = attribute.Key("url.subdomain")
8745
8746 // URLTemplateKey is the attribute Key conforming to the "url.template"
8747 // semantic conventions. It represents the low-cardinality template of an
8748 // [absolute path
8749 // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
8750 //
8751 // Type: string
8752 // RequirementLevel: Optional
8753 // Stability: experimental
8754 // Examples: '/users/{id}', '/users/:id', '/users?id={id}'
8755 URLTemplateKey = attribute.Key("url.template")
8756
8757 // URLTopLevelDomainKey is the attribute Key conforming to the
8758 // "url.top_level_domain" semantic conventions. It represents the effective
8759 // top level domain (eTLD), also known as the domain suffix, is the last
8760 // part of the domain name. For example, the top level domain for
8761 // example.com is `com`.
8762 //
8763 // Type: string
8764 // RequirementLevel: Optional
8765 // Stability: experimental
8766 // Examples: 'com', 'co.uk'
8767 // Note: This value can be determined precisely with the [public suffix
8768 // list](http://publicsuffix.org).
8769 URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
8770 )
8771
8772 // URLDomain returns an attribute KeyValue conforming to the "url.domain"
8773 // semantic conventions. It represents the domain extracted from the
8774 // `url.full`, such as "opentelemetry.io".
8775 func URLDomain(val string) attribute.KeyValue {
8776 return URLDomainKey.String(val)
8777 }
8778
8779 // URLExtension returns an attribute KeyValue conforming to the
8780 // "url.extension" semantic conventions. It represents the file extension
8781 // extracted from the `url.full`, excluding the leading dot.
8782 func URLExtension(val string) attribute.KeyValue {
8783 return URLExtensionKey.String(val)
8784 }
8785
8786 // URLFragment returns an attribute KeyValue conforming to the
8787 // "url.fragment" semantic conventions. It represents the [URI
8788 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
8789 func URLFragment(val string) attribute.KeyValue {
8790 return URLFragmentKey.String(val)
8791 }
8792
8793 // URLFull returns an attribute KeyValue conforming to the "url.full"
8794 // semantic conventions. It represents the absolute URL describing a network
8795 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
8796 func URLFull(val string) attribute.KeyValue {
8797 return URLFullKey.String(val)
8798 }
8799
8800 // URLOriginal returns an attribute KeyValue conforming to the
8801 // "url.original" semantic conventions. It represents the unmodified original
8802 // URL as seen in the event source.
8803 func URLOriginal(val string) attribute.KeyValue {
8804 return URLOriginalKey.String(val)
8805 }
8806
8807 // URLPath returns an attribute KeyValue conforming to the "url.path"
8808 // semantic conventions. It represents the [URI
8809 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
8810 func URLPath(val string) attribute.KeyValue {
8811 return URLPathKey.String(val)
8812 }
8813
8814 // URLPort returns an attribute KeyValue conforming to the "url.port"
8815 // semantic conventions. It represents the port extracted from the `url.full`
8816 func URLPort(val int) attribute.KeyValue {
8817 return URLPortKey.Int(val)
8818 }
8819
8820 // URLQuery returns an attribute KeyValue conforming to the "url.query"
8821 // semantic conventions. It represents the [URI
8822 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
8823 func URLQuery(val string) attribute.KeyValue {
8824 return URLQueryKey.String(val)
8825 }
8826
8827 // URLRegisteredDomain returns an attribute KeyValue conforming to the
8828 // "url.registered_domain" semantic conventions. It represents the highest
8829 // registered url domain, stripped of the subdomain.
8830 func URLRegisteredDomain(val string) attribute.KeyValue {
8831 return URLRegisteredDomainKey.String(val)
8832 }
8833
8834 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
8835 // semantic conventions. It represents the [URI
8836 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
8837 // identifying the used protocol.
8838 func URLScheme(val string) attribute.KeyValue {
8839 return URLSchemeKey.String(val)
8840 }
8841
8842 // URLSubdomain returns an attribute KeyValue conforming to the
8843 // "url.subdomain" semantic conventions. It represents the subdomain portion of
8844 // a fully qualified domain name includes all of the names except the host name
8845 // under the registered_domain. In a partially qualified domain, or if the
8846 // qualification level of the full name cannot be determined, subdomain
8847 // contains all of the names below the registered domain.
8848 func URLSubdomain(val string) attribute.KeyValue {
8849 return URLSubdomainKey.String(val)
8850 }
8851
8852 // URLTemplate returns an attribute KeyValue conforming to the
8853 // "url.template" semantic conventions. It represents the low-cardinality
8854 // template of an [absolute path
8855 // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
8856 func URLTemplate(val string) attribute.KeyValue {
8857 return URLTemplateKey.String(val)
8858 }
8859
8860 // URLTopLevelDomain returns an attribute KeyValue conforming to the
8861 // "url.top_level_domain" semantic conventions. It represents the effective top
8862 // level domain (eTLD), also known as the domain suffix, is the last part of
8863 // the domain name. For example, the top level domain for example.com is `com`.
8864 func URLTopLevelDomain(val string) attribute.KeyValue {
8865 return URLTopLevelDomainKey.String(val)
8866 }
8867
8868 // Describes user-agent attributes.
8869 const (
8870 // UserAgentNameKey is the attribute Key conforming to the
8871 // "user_agent.name" semantic conventions. It represents the name of the
8872 // user-agent extracted from original. Usually refers to the browser's
8873 // name.
8874 //
8875 // Type: string
8876 // RequirementLevel: Optional
8877 // Stability: experimental
8878 // Examples: 'Safari', 'YourApp'
8879 // Note: [Example](https://www.whatsmyua.info) of extracting browser's name
8880 // from original string. In the case of using a user-agent for non-browser
8881 // products, such as microservices with multiple names/versions inside the
8882 // `user_agent.original`, the most significant name SHOULD be selected. In
8883 // such a scenario it should align with `user_agent.version`
8884 UserAgentNameKey = attribute.Key("user_agent.name")
8885
8886 // UserAgentOriginalKey is the attribute Key conforming to the
8887 // "user_agent.original" semantic conventions. It represents the value of
8888 // the [HTTP
8889 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
8890 // header sent by the client.
8891 //
8892 // Type: string
8893 // RequirementLevel: Optional
8894 // Stability: stable
8895 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
8896 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
8897 // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0
8898 // grpc-java-okhttp/1.27.2'
8899 UserAgentOriginalKey = attribute.Key("user_agent.original")
8900
8901 // UserAgentVersionKey is the attribute Key conforming to the
8902 // "user_agent.version" semantic conventions. It represents the version of
8903 // the user-agent extracted from original. Usually refers to the browser's
8904 // version
8905 //
8906 // Type: string
8907 // RequirementLevel: Optional
8908 // Stability: experimental
8909 // Examples: '14.1.2', '1.0.0'
8910 // Note: [Example](https://www.whatsmyua.info) of extracting browser's
8911 // version from original string. In the case of using a user-agent for
8912 // non-browser products, such as microservices with multiple names/versions
8913 // inside the `user_agent.original`, the most significant version SHOULD be
8914 // selected. In such a scenario it should align with `user_agent.name`
8915 UserAgentVersionKey = attribute.Key("user_agent.version")
8916 )
8917
8918 // UserAgentName returns an attribute KeyValue conforming to the
8919 // "user_agent.name" semantic conventions. It represents the name of the
8920 // user-agent extracted from original. Usually refers to the browser's name.
8921 func UserAgentName(val string) attribute.KeyValue {
8922 return UserAgentNameKey.String(val)
8923 }
8924
8925 // UserAgentOriginal returns an attribute KeyValue conforming to the
8926 // "user_agent.original" semantic conventions. It represents the value of the
8927 // [HTTP
8928 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
8929 // header sent by the client.
8930 func UserAgentOriginal(val string) attribute.KeyValue {
8931 return UserAgentOriginalKey.String(val)
8932 }
8933
8934 // UserAgentVersion returns an attribute KeyValue conforming to the
8935 // "user_agent.version" semantic conventions. It represents the version of the
8936 // user-agent extracted from original. Usually refers to the browser's version
8937 func UserAgentVersion(val string) attribute.KeyValue {
8938 return UserAgentVersionKey.String(val)
8939 }
8940
8941 // The attributes used to describe the packaged software running the
8942 // application code.
8943 const (
8944 // WebEngineDescriptionKey is the attribute Key conforming to the
8945 // "webengine.description" semantic conventions. It represents the
8946 // additional description of the web engine (e.g. detailed version and
8947 // edition information).
8948 //
8949 // Type: string
8950 // RequirementLevel: Optional
8951 // Stability: experimental
8952 // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
8953 // 2.2.2.Final'
8954 WebEngineDescriptionKey = attribute.Key("webengine.description")
8955
8956 // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
8957 // semantic conventions. It represents the name of the web engine.
8958 //
8959 // Type: string
8960 // RequirementLevel: Optional
8961 // Stability: experimental
8962 // Examples: 'WildFly'
8963 WebEngineNameKey = attribute.Key("webengine.name")
8964
8965 // WebEngineVersionKey is the attribute Key conforming to the
8966 // "webengine.version" semantic conventions. It represents the version of
8967 // the web engine.
8968 //
8969 // Type: string
8970 // RequirementLevel: Optional
8971 // Stability: experimental
8972 // Examples: '21.0.0'
8973 WebEngineVersionKey = attribute.Key("webengine.version")
8974 )
8975
8976 // WebEngineDescription returns an attribute KeyValue conforming to the
8977 // "webengine.description" semantic conventions. It represents the additional
8978 // description of the web engine (e.g. detailed version and edition
8979 // information).
8980 func WebEngineDescription(val string) attribute.KeyValue {
8981 return WebEngineDescriptionKey.String(val)
8982 }
8983
8984 // WebEngineName returns an attribute KeyValue conforming to the
8985 // "webengine.name" semantic conventions. It represents the name of the web
8986 // engine.
8987 func WebEngineName(val string) attribute.KeyValue {
8988 return WebEngineNameKey.String(val)
8989 }
8990
8991 // WebEngineVersion returns an attribute KeyValue conforming to the
8992 // "webengine.version" semantic conventions. It represents the version of the
8993 // web engine.
8994 func WebEngineVersion(val string) attribute.KeyValue {
8995 return WebEngineVersionKey.String(val)
8996 }
8997