Debian Codegraph @

semconv/v1.24.0/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.24.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // Describes FaaS attributes.
11 const (
12 // FaaSInvokedNameKey is the attribute Key conforming to the
13 // "faas.invoked_name" semantic conventions. It represents the name of the
14 // invoked function.
15 //
16 // Type: string
17 // RequirementLevel: Required
18 // Stability: experimental
19 // Examples: 'my-function'
20 // Note: SHOULD be equal to the `faas.name` resource attribute of the
21 // invoked function.
22 FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
23
24 // FaaSInvokedProviderKey is the attribute Key conforming to the
25 // "faas.invoked_provider" semantic conventions. It represents the cloud
26 // provider of the invoked function.
27 //
28 // Type: Enum
29 // RequirementLevel: Required
30 // Stability: experimental
31 // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
32 // invoked function.
33 FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
34
35 // FaaSInvokedRegionKey is the attribute Key conforming to the
36 // "faas.invoked_region" semantic conventions. It represents the cloud
37 // region of the invoked function.
38 //
39 // Type: string
40 // RequirementLevel: ConditionallyRequired (For some cloud providers, like
41 // AWS or GCP, the region in which a function is hosted is essential to
42 // uniquely identify the function and also part of its endpoint. Since it's
43 // part of the endpoint being called, the region is always known to
44 // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
45 // If the region is unknown to the client or not required for identifying
46 // the invoked function, setting `faas.invoked_region` is optional.)
47 // Stability: experimental
48 // Examples: 'eu-central-1'
49 // Note: SHOULD be equal to the `cloud.region` resource attribute of the
50 // invoked function.
51 FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
52
53 // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
54 // semantic conventions. It represents the type of the trigger which caused
55 // this function invocation.
56 //
57 // Type: Enum
58 // RequirementLevel: Optional
59 // Stability: experimental
60 FaaSTriggerKey = attribute.Key("faas.trigger")
61 )
62
63 var (
64 // Alibaba Cloud
65 FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
66 // Amazon Web Services
67 FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
68 // Microsoft Azure
69 FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
70 // Google Cloud Platform
71 FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
72 // Tencent Cloud
73 FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
74 )
75
76 var (
77 // A response to some data source operation such as a database or filesystem read/write
78 FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
79 // To provide an answer to an inbound HTTP request
80 FaaSTriggerHTTP = FaaSTriggerKey.String("http")
81 // A function is set to be executed when messages are sent to a messaging system
82 FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
83 // A function is scheduled to be executed regularly
84 FaaSTriggerTimer = FaaSTriggerKey.String("timer")
85 // If none of the others apply
86 FaaSTriggerOther = FaaSTriggerKey.String("other")
87 )
88
89 // FaaSInvokedName returns an attribute KeyValue conforming to the
90 // "faas.invoked_name" semantic conventions. It represents the name of the
91 // invoked function.
92 func FaaSInvokedName(val string) attribute.KeyValue {
93 return FaaSInvokedNameKey.String(val)
94 }
95
96 // FaaSInvokedRegion returns an attribute KeyValue conforming to the
97 // "faas.invoked_region" semantic conventions. It represents the cloud region
98 // of the invoked function.
99 func FaaSInvokedRegion(val string) attribute.KeyValue {
100 return FaaSInvokedRegionKey.String(val)
101 }
102
103 // Attributes for Events represented using Log Records.
104 const (
105 // EventNameKey is the attribute Key conforming to the "event.name"
106 // semantic conventions. It represents the identifies the class / type of
107 // event.
108 //
109 // Type: string
110 // RequirementLevel: Required
111 // Stability: experimental
112 // Examples: 'browser.mouse.click', 'device.app.lifecycle'
113 // Note: Event names are subject to the same rules as [attribute
114 // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md).
115 // Notably, event names are namespaced to avoid collisions and provide a
116 // clean separation of semantics for events in separate domains like
117 // browser, mobile, and kubernetes.
118 EventNameKey = attribute.Key("event.name")
119 )
120
121 // EventName returns an attribute KeyValue conforming to the "event.name"
122 // semantic conventions. It represents the identifies the class / type of
123 // event.
124 func EventName(val string) attribute.KeyValue {
125 return EventNameKey.String(val)
126 }
127
128 // The attributes described in this section are rather generic. They may be
129 // used in any Log Record they apply to.
130 const (
131 // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
132 // semantic conventions. It represents a unique identifier for the Log
133 // Record.
134 //
135 // Type: string
136 // RequirementLevel: Optional
137 // Stability: experimental
138 // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
139 // Note: If an id is provided, other log records with the same id will be
140 // considered duplicates and can be removed safely. This means, that two
141 // distinguishable log records MUST have different values.
142 // The id MAY be an [Universally Unique Lexicographically Sortable
143 // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
144 // (e.g. UUID) may be used as needed.
145 LogRecordUIDKey = attribute.Key("log.record.uid")
146 )
147
148 // LogRecordUID returns an attribute KeyValue conforming to the
149 // "log.record.uid" semantic conventions. It represents a unique identifier for
150 // the Log Record.
151 func LogRecordUID(val string) attribute.KeyValue {
152 return LogRecordUIDKey.String(val)
153 }
154
155 // Describes Log attributes
156 const (
157 // LogIostreamKey is the attribute Key conforming to the "log.iostream"
158 // semantic conventions. It represents the stream associated with the log.
159 // See below for a list of well-known values.
160 //
161 // Type: Enum
162 // RequirementLevel: Optional
163 // Stability: experimental
164 LogIostreamKey = attribute.Key("log.iostream")
165 )
166
167 var (
168 // Logs from stdout stream
169 LogIostreamStdout = LogIostreamKey.String("stdout")
170 // Events from stderr stream
171 LogIostreamStderr = LogIostreamKey.String("stderr")
172 )
173
174 // A file to which log was emitted.
175 const (
176 // LogFileNameKey is the attribute Key conforming to the "log.file.name"
177 // semantic conventions. It represents the basename of the file.
178 //
179 // Type: string
180 // RequirementLevel: Recommended
181 // Stability: experimental
182 // Examples: 'audit.log'
183 LogFileNameKey = attribute.Key("log.file.name")
184
185 // LogFileNameResolvedKey is the attribute Key conforming to the
186 // "log.file.name_resolved" semantic conventions. It represents the
187 // basename of the file, with symlinks resolved.
188 //
189 // Type: string
190 // RequirementLevel: Optional
191 // Stability: experimental
192 // Examples: 'uuid.log'
193 LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
194
195 // LogFilePathKey is the attribute Key conforming to the "log.file.path"
196 // semantic conventions. It represents the full path to the file.
197 //
198 // Type: string
199 // RequirementLevel: Optional
200 // Stability: experimental
201 // Examples: '/var/log/mysql/audit.log'
202 LogFilePathKey = attribute.Key("log.file.path")
203
204 // LogFilePathResolvedKey is the attribute Key conforming to the
205 // "log.file.path_resolved" semantic conventions. It represents the full
206 // path to the file, with symlinks resolved.
207 //
208 // Type: string
209 // RequirementLevel: Optional
210 // Stability: experimental
211 // Examples: '/var/lib/docker/uuid.log'
212 LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
213 )
214
215 // LogFileName returns an attribute KeyValue conforming to the
216 // "log.file.name" semantic conventions. It represents the basename of the
217 // file.
218 func LogFileName(val string) attribute.KeyValue {
219 return LogFileNameKey.String(val)
220 }
221
222 // LogFileNameResolved returns an attribute KeyValue conforming to the
223 // "log.file.name_resolved" semantic conventions. It represents the basename of
224 // the file, with symlinks resolved.
225 func LogFileNameResolved(val string) attribute.KeyValue {
226 return LogFileNameResolvedKey.String(val)
227 }
228
229 // LogFilePath returns an attribute KeyValue conforming to the
230 // "log.file.path" semantic conventions. It represents the full path to the
231 // file.
232 func LogFilePath(val string) attribute.KeyValue {
233 return LogFilePathKey.String(val)
234 }
235
236 // LogFilePathResolved returns an attribute KeyValue conforming to the
237 // "log.file.path_resolved" semantic conventions. It represents the full path
238 // to the file, with symlinks resolved.
239 func LogFilePathResolved(val string) attribute.KeyValue {
240 return LogFilePathResolvedKey.String(val)
241 }
242
243 // Describes Database attributes
244 const (
245 // PoolNameKey is the attribute Key conforming to the "pool.name" semantic
246 // conventions. It represents the name of the connection pool; unique
247 // within the instrumented application. In case the connection pool
248 // implementation doesn't provide a name, then the
249 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
250 // should be used
251 //
252 // Type: string
253 // RequirementLevel: Required
254 // Stability: experimental
255 // Examples: 'myDataSource'
256 PoolNameKey = attribute.Key("pool.name")
257
258 // StateKey is the attribute Key conforming to the "state" semantic
259 // conventions. It represents the state of a connection in the pool
260 //
261 // Type: Enum
262 // RequirementLevel: Required
263 // Stability: experimental
264 // Examples: 'idle'
265 StateKey = attribute.Key("state")
266 )
267
268 var (
269 // idle
270 StateIdle = StateKey.String("idle")
271 // used
272 StateUsed = StateKey.String("used")
273 )
274
275 // PoolName returns an attribute KeyValue conforming to the "pool.name"
276 // semantic conventions. It represents the name of the connection pool; unique
277 // within the instrumented application. In case the connection pool
278 // implementation doesn't provide a name, then the
279 // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
280 // should be used
281 func PoolName(val string) attribute.KeyValue {
282 return PoolNameKey.String(val)
283 }
284
285 // ASP.NET Core attributes
286 const (
287 // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to
288 // the "aspnetcore.diagnostics.handler.type" semantic conventions. It
289 // represents the full type name of the
290 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
291 // implementation that handled the exception.
292 //
293 // Type: string
294 // RequirementLevel: ConditionallyRequired (if and only if the exception
295 // was handled by this handler.)
296 // Stability: experimental
297 // Examples: 'Contoso.MyHandler'
298 AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type")
299
300 // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the
301 // "aspnetcore.rate_limiting.policy" semantic conventions. It represents
302 // the rate limiting policy name.
303 //
304 // Type: string
305 // RequirementLevel: ConditionallyRequired (if the matched endpoint for the
306 // request had a rate-limiting policy.)
307 // Stability: experimental
308 // Examples: 'fixed', 'sliding', 'token'
309 AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy")
310
311 // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the
312 // "aspnetcore.rate_limiting.result" semantic conventions. It represents
313 // the rate-limiting result, shows whether the lease was acquired or
314 // contains a rejection reason
315 //
316 // Type: Enum
317 // RequirementLevel: Required
318 // Stability: experimental
319 // Examples: 'acquired', 'request_canceled'
320 AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result")
321
322 // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the
323 // "aspnetcore.request.is_unhandled" semantic conventions. It represents
324 // the flag indicating if request was handled by the application pipeline.
325 //
326 // Type: boolean
327 // RequirementLevel: ConditionallyRequired (if and only if the request was
328 // not handled.)
329 // Stability: experimental
330 // Examples: True
331 AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled")
332
333 // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the
334 // "aspnetcore.routing.is_fallback" semantic conventions. It represents a
335 // value that indicates whether the matched route is a fallback route.
336 //
337 // Type: boolean
338 // RequirementLevel: ConditionallyRequired (If and only if a route was
339 // successfully matched.)
340 // Stability: experimental
341 // Examples: True
342 AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback")
343 )
344
345 var (
346 // Lease was acquired
347 AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired")
348 // Lease request was rejected by the endpoint limiter
349 AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter")
350 // Lease request was rejected by the global limiter
351 AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter")
352 // Lease request was canceled
353 AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled")
354 )
355
356 // AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming
357 // to the "aspnetcore.diagnostics.handler.type" semantic conventions. It
358 // represents the full type name of the
359 // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
360 // implementation that handled the exception.
361 func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue {
362 return AspnetcoreDiagnosticsHandlerTypeKey.String(val)
363 }
364
365 // AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to
366 // the "aspnetcore.rate_limiting.policy" semantic conventions. It represents
367 // the rate limiting policy name.
368 func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue {
369 return AspnetcoreRateLimitingPolicyKey.String(val)
370 }
371
372 // AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to
373 // the "aspnetcore.request.is_unhandled" semantic conventions. It represents
374 // the flag indicating if request was handled by the application pipeline.
375 func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue {
376 return AspnetcoreRequestIsUnhandledKey.Bool(val)
377 }
378
379 // AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to
380 // the "aspnetcore.routing.is_fallback" semantic conventions. It represents a
381 // value that indicates whether the matched route is a fallback route.
382 func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue {
383 return AspnetcoreRoutingIsFallbackKey.Bool(val)
384 }
385
386 // SignalR attributes
387 const (
388 // SignalrConnectionStatusKey is the attribute Key conforming to the
389 // "signalr.connection.status" semantic conventions. It represents the
390 // signalR HTTP connection closure status.
391 //
392 // Type: Enum
393 // RequirementLevel: Optional
394 // Stability: experimental
395 // Examples: 'app_shutdown', 'timeout'
396 SignalrConnectionStatusKey = attribute.Key("signalr.connection.status")
397
398 // SignalrTransportKey is the attribute Key conforming to the
399 // "signalr.transport" semantic conventions. It represents the [SignalR
400 // transport
401 // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)
402 //
403 // Type: Enum
404 // RequirementLevel: Optional
405 // Stability: experimental
406 // Examples: 'web_sockets', 'long_polling'
407 SignalrTransportKey = attribute.Key("signalr.transport")
408 )
409
410 var (
411 // The connection was closed normally
412 SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure")
413 // The connection was closed due to a timeout
414 SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout")
415 // The connection was closed because the app is shutting down
416 SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown")
417 )
418
419 var (
420 // ServerSentEvents protocol
421 SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events")
422 // LongPolling protocol
423 SignalrTransportLongPolling = SignalrTransportKey.String("long_polling")
424 // WebSockets protocol
425 SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets")
426 )
427
428 // Describes JVM buffer metric attributes.
429 const (
430 // JvmBufferPoolNameKey is the attribute Key conforming to the
431 // "jvm.buffer.pool.name" semantic conventions. It represents the name of
432 // the buffer pool.
433 //
434 // Type: string
435 // RequirementLevel: Recommended
436 // Stability: experimental
437 // Examples: 'mapped', 'direct'
438 // Note: Pool names are generally obtained via
439 // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
440 JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
441 )
442
443 // JvmBufferPoolName returns an attribute KeyValue conforming to the
444 // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
445 // buffer pool.
446 func JvmBufferPoolName(val string) attribute.KeyValue {
447 return JvmBufferPoolNameKey.String(val)
448 }
449
450 // Describes JVM memory metric attributes.
451 const (
452 // JvmMemoryPoolNameKey is the attribute Key conforming to the
453 // "jvm.memory.pool.name" semantic conventions. It represents the name of
454 // the memory pool.
455 //
456 // Type: string
457 // RequirementLevel: Recommended
458 // Stability: stable
459 // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
460 // Note: Pool names are generally obtained via
461 // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
462 JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
463
464 // JvmMemoryTypeKey is the attribute Key conforming to the
465 // "jvm.memory.type" semantic conventions. It represents the type of
466 // memory.
467 //
468 // Type: Enum
469 // RequirementLevel: Recommended
470 // Stability: stable
471 // Examples: 'heap', 'non_heap'
472 JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
473 )
474
475 var (
476 // Heap memory
477 JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
478 // Non-heap memory
479 JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
480 )
481
482 // JvmMemoryPoolName returns an attribute KeyValue conforming to the
483 // "jvm.memory.pool.name" semantic conventions. It represents the name of the
484 // memory pool.
485 func JvmMemoryPoolName(val string) attribute.KeyValue {
486 return JvmMemoryPoolNameKey.String(val)
487 }
488
489 // Describes System metric attributes
490 const (
491 // SystemDeviceKey is the attribute Key conforming to the "system.device"
492 // semantic conventions. It represents the device identifier
493 //
494 // Type: string
495 // RequirementLevel: Optional
496 // Stability: experimental
497 // Examples: '(identifier)'
498 SystemDeviceKey = attribute.Key("system.device")
499 )
500
501 // SystemDevice returns an attribute KeyValue conforming to the
502 // "system.device" semantic conventions. It represents the device identifier
503 func SystemDevice(val string) attribute.KeyValue {
504 return SystemDeviceKey.String(val)
505 }
506
507 // Describes System CPU metric attributes
508 const (
509 // SystemCPULogicalNumberKey is the attribute Key conforming to the
510 // "system.cpu.logical_number" semantic conventions. It represents the
511 // logical CPU number [0..n-1]
512 //
513 // Type: int
514 // RequirementLevel: Optional
515 // Stability: experimental
516 // Examples: 1
517 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
518
519 // SystemCPUStateKey is the attribute Key conforming to the
520 // "system.cpu.state" semantic conventions. It represents the state of the
521 // CPU
522 //
523 // Type: Enum
524 // RequirementLevel: Optional
525 // Stability: experimental
526 // Examples: 'idle', 'interrupt'
527 SystemCPUStateKey = attribute.Key("system.cpu.state")
528 )
529
530 var (
531 // user
532 SystemCPUStateUser = SystemCPUStateKey.String("user")
533 // system
534 SystemCPUStateSystem = SystemCPUStateKey.String("system")
535 // nice
536 SystemCPUStateNice = SystemCPUStateKey.String("nice")
537 // idle
538 SystemCPUStateIdle = SystemCPUStateKey.String("idle")
539 // iowait
540 SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
541 // interrupt
542 SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
543 // steal
544 SystemCPUStateSteal = SystemCPUStateKey.String("steal")
545 )
546
547 // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
548 // "system.cpu.logical_number" semantic conventions. It represents the logical
549 // CPU number [0..n-1]
550 func SystemCPULogicalNumber(val int) attribute.KeyValue {
551 return SystemCPULogicalNumberKey.Int(val)
552 }
553
554 // Describes System Memory metric attributes
555 const (
556 // SystemMemoryStateKey is the attribute Key conforming to the
557 // "system.memory.state" semantic conventions. It represents the memory
558 // state
559 //
560 // Type: Enum
561 // RequirementLevel: Optional
562 // Stability: experimental
563 // Examples: 'free', 'cached'
564 SystemMemoryStateKey = attribute.Key("system.memory.state")
565 )
566
567 var (
568 // used
569 SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
570 // free
571 SystemMemoryStateFree = SystemMemoryStateKey.String("free")
572 // shared
573 SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
574 // buffers
575 SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
576 // cached
577 SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
578 )
579
580 // Describes System Memory Paging metric attributes
581 const (
582 // SystemPagingDirectionKey is the attribute Key conforming to the
583 // "system.paging.direction" semantic conventions. It represents the paging
584 // access direction
585 //
586 // Type: Enum
587 // RequirementLevel: Optional
588 // Stability: experimental
589 // Examples: 'in'
590 SystemPagingDirectionKey = attribute.Key("system.paging.direction")
591
592 // SystemPagingStateKey is the attribute Key conforming to the
593 // "system.paging.state" semantic conventions. It represents the memory
594 // paging state
595 //
596 // Type: Enum
597 // RequirementLevel: Optional
598 // Stability: experimental
599 // Examples: 'free'
600 SystemPagingStateKey = attribute.Key("system.paging.state")
601
602 // SystemPagingTypeKey is the attribute Key conforming to the
603 // "system.paging.type" semantic conventions. It represents the memory
604 // paging type
605 //
606 // Type: Enum
607 // RequirementLevel: Optional
608 // Stability: experimental
609 // Examples: 'minor'
610 SystemPagingTypeKey = attribute.Key("system.paging.type")
611 )
612
613 var (
614 // in
615 SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
616 // out
617 SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
618 )
619
620 var (
621 // used
622 SystemPagingStateUsed = SystemPagingStateKey.String("used")
623 // free
624 SystemPagingStateFree = SystemPagingStateKey.String("free")
625 )
626
627 var (
628 // major
629 SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
630 // minor
631 SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
632 )
633
634 // Describes Filesystem metric attributes
635 const (
636 // SystemFilesystemModeKey is the attribute Key conforming to the
637 // "system.filesystem.mode" semantic conventions. It represents the
638 // filesystem mode
639 //
640 // Type: string
641 // RequirementLevel: Optional
642 // Stability: experimental
643 // Examples: 'rw, ro'
644 SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
645
646 // SystemFilesystemMountpointKey is the attribute Key conforming to the
647 // "system.filesystem.mountpoint" semantic conventions. It represents the
648 // filesystem mount path
649 //
650 // Type: string
651 // RequirementLevel: Optional
652 // Stability: experimental
653 // Examples: '/mnt/data'
654 SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
655
656 // SystemFilesystemStateKey is the attribute Key conforming to the
657 // "system.filesystem.state" semantic conventions. It represents the
658 // filesystem state
659 //
660 // Type: Enum
661 // RequirementLevel: Optional
662 // Stability: experimental
663 // Examples: 'used'
664 SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
665
666 // SystemFilesystemTypeKey is the attribute Key conforming to the
667 // "system.filesystem.type" semantic conventions. It represents the
668 // filesystem type
669 //
670 // Type: Enum
671 // RequirementLevel: Optional
672 // Stability: experimental
673 // Examples: 'ext4'
674 SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
675 )
676
677 var (
678 // used
679 SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
680 // free
681 SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
682 // reserved
683 SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
684 )
685
686 var (
687 // fat32
688 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
689 // exfat
690 SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
691 // ntfs
692 SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
693 // refs
694 SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
695 // hfsplus
696 SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
697 // ext4
698 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
699 )
700
701 // SystemFilesystemMode returns an attribute KeyValue conforming to the
702 // "system.filesystem.mode" semantic conventions. It represents the filesystem
703 // mode
704 func SystemFilesystemMode(val string) attribute.KeyValue {
705 return SystemFilesystemModeKey.String(val)
706 }
707
708 // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
709 // the "system.filesystem.mountpoint" semantic conventions. It represents the
710 // filesystem mount path
711 func SystemFilesystemMountpoint(val string) attribute.KeyValue {
712 return SystemFilesystemMountpointKey.String(val)
713 }
714
715 // Describes Network metric attributes
716 const (
717 // SystemNetworkStateKey is the attribute Key conforming to the
718 // "system.network.state" semantic conventions. It represents a stateless
719 // protocol MUST NOT set this attribute
720 //
721 // Type: Enum
722 // RequirementLevel: Optional
723 // Stability: experimental
724 // Examples: 'close_wait'
725 SystemNetworkStateKey = attribute.Key("system.network.state")
726 )
727
728 var (
729 // close
730 SystemNetworkStateClose = SystemNetworkStateKey.String("close")
731 // close_wait
732 SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
733 // closing
734 SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
735 // delete
736 SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
737 // established
738 SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
739 // fin_wait_1
740 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
741 // fin_wait_2
742 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
743 // last_ack
744 SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
745 // listen
746 SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
747 // syn_recv
748 SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
749 // syn_sent
750 SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
751 // time_wait
752 SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
753 )
754
755 // Describes System Process metric attributes
756 const (
757 // SystemProcessesStatusKey is the attribute Key conforming to the
758 // "system.processes.status" semantic conventions. It represents the
759 // process state, e.g., [Linux Process State
760 // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
761 //
762 // Type: Enum
763 // RequirementLevel: Optional
764 // Stability: experimental
765 // Examples: 'running'
766 SystemProcessesStatusKey = attribute.Key("system.processes.status")
767 )
768
769 var (
770 // running
771 SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running")
772 // sleeping
773 SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping")
774 // stopped
775 SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped")
776 // defunct
777 SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct")
778 )
779
780 // These attributes may be used to describe the client in a connection-based
781 // network interaction where there is one side that initiates the connection
782 // (the client is the side that initiates the connection). This covers all TCP
783 // network interactions since TCP is connection-based and one side initiates
784 // the connection (an exception is made for peer-to-peer communication over TCP
785 // where the "user-facing" surface of the protocol / API doesn't expose a clear
786 // notion of client and server). This also covers UDP network interactions
787 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
788 const (
789 // ClientAddressKey is the attribute Key conforming to the "client.address"
790 // semantic conventions. It represents the client address - domain name if
791 // available without reverse DNS lookup; otherwise, IP address or Unix
792 // domain socket name.
793 //
794 // Type: string
795 // RequirementLevel: Optional
796 // Stability: stable
797 // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
798 // Note: When observed from the server side, and when communicating through
799 // an intermediary, `client.address` SHOULD represent the client address
800 // behind any intermediaries, for example proxies, if it's available.
801 ClientAddressKey = attribute.Key("client.address")
802
803 // ClientPortKey is the attribute Key conforming to the "client.port"
804 // semantic conventions. It represents the client port number.
805 //
806 // Type: int
807 // RequirementLevel: Optional
808 // Stability: stable
809 // Examples: 65123
810 // Note: When observed from the server side, and when communicating through
811 // an intermediary, `client.port` SHOULD represent the client port behind
812 // any intermediaries, for example proxies, if it's available.
813 ClientPortKey = attribute.Key("client.port")
814 )
815
816 // ClientAddress returns an attribute KeyValue conforming to the
817 // "client.address" semantic conventions. It represents the client address -
818 // domain name if available without reverse DNS lookup; otherwise, IP address
819 // or Unix domain socket name.
820 func ClientAddress(val string) attribute.KeyValue {
821 return ClientAddressKey.String(val)
822 }
823
824 // ClientPort returns an attribute KeyValue conforming to the "client.port"
825 // semantic conventions. It represents the client port number.
826 func ClientPort(val int) attribute.KeyValue {
827 return ClientPortKey.Int(val)
828 }
829
830 // The attributes used to describe telemetry in the context of databases.
831 const (
832 // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
833 // "db.cassandra.consistency_level" semantic conventions. It represents the
834 // consistency level of the query. Based on consistency values from
835 // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
836 //
837 // Type: Enum
838 // RequirementLevel: Optional
839 // Stability: experimental
840 DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
841
842 // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
843 // "db.cassandra.coordinator.dc" semantic conventions. It represents the
844 // data center of the coordinating node for a query.
845 //
846 // Type: string
847 // RequirementLevel: Optional
848 // Stability: experimental
849 // Examples: 'us-west-2'
850 DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
851
852 // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
853 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
854 // of the coordinating node for a query.
855 //
856 // Type: string
857 // RequirementLevel: Optional
858 // Stability: experimental
859 // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
860 DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
861
862 // DBCassandraIdempotenceKey is the attribute Key conforming to the
863 // "db.cassandra.idempotence" semantic conventions. It represents the
864 // whether or not the query is idempotent.
865 //
866 // Type: boolean
867 // RequirementLevel: Optional
868 // Stability: experimental
869 DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
870
871 // DBCassandraPageSizeKey is the attribute Key conforming to the
872 // "db.cassandra.page_size" semantic conventions. It represents the fetch
873 // size used for paging, i.e. how many rows will be returned at once.
874 //
875 // Type: int
876 // RequirementLevel: Optional
877 // Stability: experimental
878 // Examples: 5000
879 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
880
881 // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
882 // to the "db.cassandra.speculative_execution_count" semantic conventions.
883 // It represents the number of times a query was speculatively executed.
884 // Not set or `0` if the query was not executed speculatively.
885 //
886 // Type: int
887 // RequirementLevel: Optional
888 // Stability: experimental
889 // Examples: 0, 2
890 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
891
892 // DBCassandraTableKey is the attribute Key conforming to the
893 // "db.cassandra.table" semantic conventions. It represents the name of the
894 // primary Cassandra table that the operation is acting upon, including the
895 // keyspace name (if applicable).
896 //
897 // Type: string
898 // RequirementLevel: Optional
899 // Stability: experimental
900 // Examples: 'mytable'
901 // Note: This mirrors the db.sql.table attribute but references cassandra
902 // rather than sql. It is not recommended to attempt any client-side
903 // parsing of `db.statement` just to get this property, but it should be
904 // set if it is provided by the library being instrumented. If the
905 // operation is acting upon an anonymous table, or more than one table,
906 // this value MUST NOT be set.
907 DBCassandraTableKey = attribute.Key("db.cassandra.table")
908
909 // DBConnectionStringKey is the attribute Key conforming to the
910 // "db.connection_string" semantic conventions. It represents the
911 // connection string used to connect to the database. It is recommended to
912 // remove embedded credentials.
913 //
914 // Type: string
915 // RequirementLevel: Optional
916 // Stability: experimental
917 // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
918 DBConnectionStringKey = attribute.Key("db.connection_string")
919
920 // DBCosmosDBClientIDKey is the attribute Key conforming to the
921 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
922 // Cosmos client instance id.
923 //
924 // Type: string
925 // RequirementLevel: Optional
926 // Stability: experimental
927 // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
928 DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
929
930 // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
931 // "db.cosmosdb.connection_mode" semantic conventions. It represents the
932 // cosmos client connection mode.
933 //
934 // Type: Enum
935 // RequirementLevel: Optional
936 // Stability: experimental
937 DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
938
939 // DBCosmosDBContainerKey is the attribute Key conforming to the
940 // "db.cosmosdb.container" semantic conventions. It represents the cosmos
941 // DB container name.
942 //
943 // Type: string
944 // RequirementLevel: Optional
945 // Stability: experimental
946 // Examples: 'anystring'
947 DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container")
948
949 // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
950 // "db.cosmosdb.operation_type" semantic conventions. It represents the
951 // cosmosDB Operation Type.
952 //
953 // Type: Enum
954 // RequirementLevel: Optional
955 // Stability: experimental
956 DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
957
958 // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
959 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
960 // consumed for that operation
961 //
962 // Type: double
963 // RequirementLevel: Optional
964 // Stability: experimental
965 // Examples: 46.18, 1.0
966 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
967
968 // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
969 // "db.cosmosdb.request_content_length" semantic conventions. It represents
970 // the request payload size in bytes
971 //
972 // Type: int
973 // RequirementLevel: Optional
974 // Stability: experimental
975 DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
976
977 // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
978 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
979 // DB status code.
980 //
981 // Type: int
982 // RequirementLevel: Optional
983 // Stability: experimental
984 // Examples: 200, 201
985 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
986
987 // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
988 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
989 // cosmos DB sub status code.
990 //
991 // Type: int
992 // RequirementLevel: Optional
993 // Stability: experimental
994 // Examples: 1000, 1002
995 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
996
997 // DBElasticsearchClusterNameKey is the attribute Key conforming to the
998 // "db.elasticsearch.cluster.name" semantic conventions. It represents the
999 // represents the identifier of an Elasticsearch cluster.
1000 //
1001 // Type: string
1002 // RequirementLevel: Optional
1003 // Stability: experimental
1004 // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
1005 DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
1006
1007 // DBElasticsearchNodeNameKey is the attribute Key conforming to the
1008 // "db.elasticsearch.node.name" semantic conventions. It represents the
1009 // represents the human-readable identifier of the node/instance to which a
1010 // request was routed.
1011 //
1012 // Type: string
1013 // RequirementLevel: Optional
1014 // Stability: experimental
1015 // Examples: 'instance-0000000001'
1016 DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
1017
1018 // DBInstanceIDKey is the attribute Key conforming to the "db.instance.id"
1019 // semantic conventions. It represents an identifier (address, unique name,
1020 // or any other identifier) of the database instance that is executing
1021 // queries or mutations on the current connection. This is useful in cases
1022 // where the database is running in a clustered environment and the
1023 // instrumentation is able to record the node executing the query. The
1024 // client may obtain this value in databases like MySQL using queries like
1025 // `select @@hostname`.
1026 //
1027 // Type: string
1028 // RequirementLevel: Optional
1029 // Stability: experimental
1030 // Examples: 'mysql-e26b99z.example.com'
1031 DBInstanceIDKey = attribute.Key("db.instance.id")
1032
1033 // DBJDBCDriverClassnameKey is the attribute Key conforming to the
1034 // "db.jdbc.driver_classname" semantic conventions. It represents the
1035 // fully-qualified class name of the [Java Database Connectivity
1036 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
1037 // driver used to connect.
1038 //
1039 // Type: string
1040 // RequirementLevel: Optional
1041 // Stability: experimental
1042 // Examples: 'org.postgresql.Driver',
1043 // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
1044 DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
1045
1046 // DBMongoDBCollectionKey is the attribute Key conforming to the
1047 // "db.mongodb.collection" semantic conventions. It represents the MongoDB
1048 // collection being accessed within the database stated in `db.name`.
1049 //
1050 // Type: string
1051 // RequirementLevel: Optional
1052 // Stability: experimental
1053 // Examples: 'customers', 'products'
1054 DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
1055
1056 // DBMSSQLInstanceNameKey is the attribute Key conforming to the
1057 // "db.mssql.instance_name" semantic conventions. It represents the
1058 // Microsoft SQL Server [instance
1059 // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
1060 // connecting to. This name is used to determine the port of a named
1061 // instance.
1062 //
1063 // Type: string
1064 // RequirementLevel: Optional
1065 // Stability: experimental
1066 // Examples: 'MSSQLSERVER'
1067 // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer
1068 // required (but still recommended if non-standard).
1069 DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
1070
1071 // DBNameKey is the attribute Key conforming to the "db.name" semantic
1072 // conventions. It represents the this attribute is used to report the name
1073 // of the database being accessed. For commands that switch the database,
1074 // this should be set to the target database (even if the command fails).
1075 //
1076 // Type: string
1077 // RequirementLevel: Optional
1078 // Stability: experimental
1079 // Examples: 'customers', 'main'
1080 // Note: In some SQL databases, the database name to be used is called
1081 // "schema name". In case there are multiple layers that could be
1082 // considered for database name (e.g. Oracle instance name and schema
1083 // name), the database name to be used is the more specific layer (e.g.
1084 // Oracle schema name).
1085 DBNameKey = attribute.Key("db.name")
1086
1087 // DBOperationKey is the attribute Key conforming to the "db.operation"
1088 // semantic conventions. It represents the name of the operation being
1089 // executed, e.g. the [MongoDB command
1090 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
1091 // such as `findAndModify`, or the SQL keyword.
1092 //
1093 // Type: string
1094 // RequirementLevel: Optional
1095 // Stability: experimental
1096 // Examples: 'findAndModify', 'HMSET', 'SELECT'
1097 // Note: When setting this to an SQL keyword, it is not recommended to
1098 // attempt any client-side parsing of `db.statement` just to get this
1099 // property, but it should be set if the operation name is provided by the
1100 // library being instrumented. If the SQL statement has an ambiguous
1101 // operation, or performs more than one operation, this value may be
1102 // omitted.
1103 DBOperationKey = attribute.Key("db.operation")
1104
1105 // DBRedisDBIndexKey is the attribute Key conforming to the
1106 // "db.redis.database_index" semantic conventions. It represents the index
1107 // of the database being accessed as used in the [`SELECT`
1108 // command](https://redis.io/commands/select), provided as an integer. To
1109 // be used instead of the generic `db.name` attribute.
1110 //
1111 // Type: int
1112 // RequirementLevel: Optional
1113 // Stability: experimental
1114 // Examples: 0, 1, 15
1115 DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
1116
1117 // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
1118 // semantic conventions. It represents the name of the primary table that
1119 // the operation is acting upon, including the database name (if
1120 // applicable).
1121 //
1122 // Type: string
1123 // RequirementLevel: Optional
1124 // Stability: experimental
1125 // Examples: 'public.users', 'customers'
1126 // Note: It is not recommended to attempt any client-side parsing of
1127 // `db.statement` just to get this property, but it should be set if it is
1128 // provided by the library being instrumented. If the operation is acting
1129 // upon an anonymous table, or more than one table, this value MUST NOT be
1130 // set.
1131 DBSQLTableKey = attribute.Key("db.sql.table")
1132
1133 // DBStatementKey is the attribute Key conforming to the "db.statement"
1134 // semantic conventions. It represents the database statement being
1135 // executed.
1136 //
1137 // Type: string
1138 // RequirementLevel: Optional
1139 // Stability: experimental
1140 // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
1141 DBStatementKey = attribute.Key("db.statement")
1142
1143 // DBSystemKey is the attribute Key conforming to the "db.system" semantic
1144 // conventions. It represents an identifier for the database management
1145 // system (DBMS) product being used. See below for a list of well-known
1146 // identifiers.
1147 //
1148 // Type: Enum
1149 // RequirementLevel: Optional
1150 // Stability: experimental
1151 DBSystemKey = attribute.Key("db.system")
1152
1153 // DBUserKey is the attribute Key conforming to the "db.user" semantic
1154 // conventions. It represents the username for accessing the database.
1155 //
1156 // Type: string
1157 // RequirementLevel: Optional
1158 // Stability: experimental
1159 // Examples: 'readonly_user', 'reporting_user'
1160 DBUserKey = attribute.Key("db.user")
1161 )
1162
1163 var (
1164 // all
1165 DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
1166 // each_quorum
1167 DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
1168 // quorum
1169 DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
1170 // local_quorum
1171 DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
1172 // one
1173 DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
1174 // two
1175 DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
1176 // three
1177 DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
1178 // local_one
1179 DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
1180 // any
1181 DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
1182 // serial
1183 DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
1184 // local_serial
1185 DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
1186 )
1187
1188 var (
1189 // Gateway (HTTP) connections mode
1190 DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
1191 // Direct connection
1192 DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
1193 )
1194
1195 var (
1196 // invalid
1197 DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
1198 // create
1199 DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
1200 // patch
1201 DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
1202 // read
1203 DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
1204 // read_feed
1205 DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
1206 // delete
1207 DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
1208 // replace
1209 DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
1210 // execute
1211 DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
1212 // query
1213 DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
1214 // head
1215 DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
1216 // head_feed
1217 DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
1218 // upsert
1219 DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
1220 // batch
1221 DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
1222 // query_plan
1223 DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
1224 // execute_javascript
1225 DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
1226 )
1227
1228 var (
1229 // Some other SQL database. Fallback only. See notes
1230 DBSystemOtherSQL = DBSystemKey.String("other_sql")
1231 // Microsoft SQL Server
1232 DBSystemMSSQL = DBSystemKey.String("mssql")
1233 // Microsoft SQL Server Compact
1234 DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
1235 // MySQL
1236 DBSystemMySQL = DBSystemKey.String("mysql")
1237 // Oracle Database
1238 DBSystemOracle = DBSystemKey.String("oracle")
1239 // IBM DB2
1240 DBSystemDB2 = DBSystemKey.String("db2")
1241 // PostgreSQL
1242 DBSystemPostgreSQL = DBSystemKey.String("postgresql")
1243 // Amazon Redshift
1244 DBSystemRedshift = DBSystemKey.String("redshift")
1245 // Apache Hive
1246 DBSystemHive = DBSystemKey.String("hive")
1247 // Cloudscape
1248 DBSystemCloudscape = DBSystemKey.String("cloudscape")
1249 // HyperSQL DataBase
1250 DBSystemHSQLDB = DBSystemKey.String("hsqldb")
1251 // Progress Database
1252 DBSystemProgress = DBSystemKey.String("progress")
1253 // SAP MaxDB
1254 DBSystemMaxDB = DBSystemKey.String("maxdb")
1255 // SAP HANA
1256 DBSystemHanaDB = DBSystemKey.String("hanadb")
1257 // Ingres
1258 DBSystemIngres = DBSystemKey.String("ingres")
1259 // FirstSQL
1260 DBSystemFirstSQL = DBSystemKey.String("firstsql")
1261 // EnterpriseDB
1262 DBSystemEDB = DBSystemKey.String("edb")
1263 // InterSystems Caché
1264 DBSystemCache = DBSystemKey.String("cache")
1265 // Adabas (Adaptable Database System)
1266 DBSystemAdabas = DBSystemKey.String("adabas")
1267 // Firebird
1268 DBSystemFirebird = DBSystemKey.String("firebird")
1269 // Apache Derby
1270 DBSystemDerby = DBSystemKey.String("derby")
1271 // FileMaker
1272 DBSystemFilemaker = DBSystemKey.String("filemaker")
1273 // Informix
1274 DBSystemInformix = DBSystemKey.String("informix")
1275 // InstantDB
1276 DBSystemInstantDB = DBSystemKey.String("instantdb")
1277 // InterBase
1278 DBSystemInterbase = DBSystemKey.String("interbase")
1279 // MariaDB
1280 DBSystemMariaDB = DBSystemKey.String("mariadb")
1281 // Netezza
1282 DBSystemNetezza = DBSystemKey.String("netezza")
1283 // Pervasive PSQL
1284 DBSystemPervasive = DBSystemKey.String("pervasive")
1285 // PointBase
1286 DBSystemPointbase = DBSystemKey.String("pointbase")
1287 // SQLite
1288 DBSystemSqlite = DBSystemKey.String("sqlite")
1289 // Sybase
1290 DBSystemSybase = DBSystemKey.String("sybase")
1291 // Teradata
1292 DBSystemTeradata = DBSystemKey.String("teradata")
1293 // Vertica
1294 DBSystemVertica = DBSystemKey.String("vertica")
1295 // H2
1296 DBSystemH2 = DBSystemKey.String("h2")
1297 // ColdFusion IMQ
1298 DBSystemColdfusion = DBSystemKey.String("coldfusion")
1299 // Apache Cassandra
1300 DBSystemCassandra = DBSystemKey.String("cassandra")
1301 // Apache HBase
1302 DBSystemHBase = DBSystemKey.String("hbase")
1303 // MongoDB
1304 DBSystemMongoDB = DBSystemKey.String("mongodb")
1305 // Redis
1306 DBSystemRedis = DBSystemKey.String("redis")
1307 // Couchbase
1308 DBSystemCouchbase = DBSystemKey.String("couchbase")
1309 // CouchDB
1310 DBSystemCouchDB = DBSystemKey.String("couchdb")
1311 // Microsoft Azure Cosmos DB
1312 DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
1313 // Amazon DynamoDB
1314 DBSystemDynamoDB = DBSystemKey.String("dynamodb")
1315 // Neo4j
1316 DBSystemNeo4j = DBSystemKey.String("neo4j")
1317 // Apache Geode
1318 DBSystemGeode = DBSystemKey.String("geode")
1319 // Elasticsearch
1320 DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
1321 // Memcached
1322 DBSystemMemcached = DBSystemKey.String("memcached")
1323 // CockroachDB
1324 DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
1325 // OpenSearch
1326 DBSystemOpensearch = DBSystemKey.String("opensearch")
1327 // ClickHouse
1328 DBSystemClickhouse = DBSystemKey.String("clickhouse")
1329 // Cloud Spanner
1330 DBSystemSpanner = DBSystemKey.String("spanner")
1331 // Trino
1332 DBSystemTrino = DBSystemKey.String("trino")
1333 )
1334
1335 // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
1336 // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
1337 // center of the coordinating node for a query.
1338 func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
1339 return DBCassandraCoordinatorDCKey.String(val)
1340 }
1341
1342 // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
1343 // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
1344 // the coordinating node for a query.
1345 func DBCassandraCoordinatorID(val string) attribute.KeyValue {
1346 return DBCassandraCoordinatorIDKey.String(val)
1347 }
1348
1349 // DBCassandraIdempotence returns an attribute KeyValue conforming to the
1350 // "db.cassandra.idempotence" semantic conventions. It represents the whether
1351 // or not the query is idempotent.
1352 func DBCassandraIdempotence(val bool) attribute.KeyValue {
1353 return DBCassandraIdempotenceKey.Bool(val)
1354 }
1355
1356 // DBCassandraPageSize returns an attribute KeyValue conforming to the
1357 // "db.cassandra.page_size" semantic conventions. It represents the fetch size
1358 // used for paging, i.e. how many rows will be returned at once.
1359 func DBCassandraPageSize(val int) attribute.KeyValue {
1360 return DBCassandraPageSizeKey.Int(val)
1361 }
1362
1363 // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
1364 // conforming to the "db.cassandra.speculative_execution_count" semantic
1365 // conventions. It represents the number of times a query was speculatively
1366 // executed. Not set or `0` if the query was not executed speculatively.
1367 func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
1368 return DBCassandraSpeculativeExecutionCountKey.Int(val)
1369 }
1370
1371 // DBCassandraTable returns an attribute KeyValue conforming to the
1372 // "db.cassandra.table" semantic conventions. It represents the name of the
1373 // primary Cassandra table that the operation is acting upon, including the
1374 // keyspace name (if applicable).
1375 func DBCassandraTable(val string) attribute.KeyValue {
1376 return DBCassandraTableKey.String(val)
1377 }
1378
1379 // DBConnectionString returns an attribute KeyValue conforming to the
1380 // "db.connection_string" semantic conventions. It represents the connection
1381 // string used to connect to the database. It is recommended to remove embedded
1382 // credentials.
1383 func DBConnectionString(val string) attribute.KeyValue {
1384 return DBConnectionStringKey.String(val)
1385 }
1386
1387 // DBCosmosDBClientID returns an attribute KeyValue conforming to the
1388 // "db.cosmosdb.client_id" semantic conventions. It represents the unique
1389 // Cosmos client instance id.
1390 func DBCosmosDBClientID(val string) attribute.KeyValue {
1391 return DBCosmosDBClientIDKey.String(val)
1392 }
1393
1394 // DBCosmosDBContainer returns an attribute KeyValue conforming to the
1395 // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB
1396 // container name.
1397 func DBCosmosDBContainer(val string) attribute.KeyValue {
1398 return DBCosmosDBContainerKey.String(val)
1399 }
1400
1401 // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
1402 // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
1403 // consumed for that operation
1404 func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
1405 return DBCosmosDBRequestChargeKey.Float64(val)
1406 }
1407
1408 // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
1409 // to the "db.cosmosdb.request_content_length" semantic conventions. It
1410 // represents the request payload size in bytes
1411 func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
1412 return DBCosmosDBRequestContentLengthKey.Int(val)
1413 }
1414
1415 // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
1416 // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
1417 // status code.
1418 func DBCosmosDBStatusCode(val int) attribute.KeyValue {
1419 return DBCosmosDBStatusCodeKey.Int(val)
1420 }
1421
1422 // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
1423 // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
1424 // DB sub status code.
1425 func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
1426 return DBCosmosDBSubStatusCodeKey.Int(val)
1427 }
1428
1429 // DBElasticsearchClusterName returns an attribute KeyValue conforming to
1430 // the "db.elasticsearch.cluster.name" semantic conventions. It represents the
1431 // represents the identifier of an Elasticsearch cluster.
1432 func DBElasticsearchClusterName(val string) attribute.KeyValue {
1433 return DBElasticsearchClusterNameKey.String(val)
1434 }
1435
1436 // DBElasticsearchNodeName returns an attribute KeyValue conforming to the
1437 // "db.elasticsearch.node.name" semantic conventions. It represents the
1438 // represents the human-readable identifier of the node/instance to which a
1439 // request was routed.
1440 func DBElasticsearchNodeName(val string) attribute.KeyValue {
1441 return DBElasticsearchNodeNameKey.String(val)
1442 }
1443
1444 // DBInstanceID returns an attribute KeyValue conforming to the
1445 // "db.instance.id" semantic conventions. It represents an identifier (address,
1446 // unique name, or any other identifier) of the database instance that is
1447 // executing queries or mutations on the current connection. This is useful in
1448 // cases where the database is running in a clustered environment and the
1449 // instrumentation is able to record the node executing the query. The client
1450 // may obtain this value in databases like MySQL using queries like `select
1451 // @@hostname`.
1452 func DBInstanceID(val string) attribute.KeyValue {
1453 return DBInstanceIDKey.String(val)
1454 }
1455
1456 // DBJDBCDriverClassname returns an attribute KeyValue conforming to the
1457 // "db.jdbc.driver_classname" semantic conventions. It represents the
1458 // fully-qualified class name of the [Java Database Connectivity
1459 // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
1460 // used to connect.
1461 func DBJDBCDriverClassname(val string) attribute.KeyValue {
1462 return DBJDBCDriverClassnameKey.String(val)
1463 }
1464
1465 // DBMongoDBCollection returns an attribute KeyValue conforming to the
1466 // "db.mongodb.collection" semantic conventions. It represents the MongoDB
1467 // collection being accessed within the database stated in `db.name`.
1468 func DBMongoDBCollection(val string) attribute.KeyValue {
1469 return DBMongoDBCollectionKey.String(val)
1470 }
1471
1472 // DBMSSQLInstanceName returns an attribute KeyValue conforming to the
1473 // "db.mssql.instance_name" semantic conventions. It represents the Microsoft
1474 // SQL Server [instance
1475 // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
1476 // connecting to. This name is used to determine the port of a named instance.
1477 func DBMSSQLInstanceName(val string) attribute.KeyValue {
1478 return DBMSSQLInstanceNameKey.String(val)
1479 }
1480
1481 // DBName returns an attribute KeyValue conforming to the "db.name" semantic
1482 // conventions. It represents the this attribute is used to report the name of
1483 // the database being accessed. For commands that switch the database, this
1484 // should be set to the target database (even if the command fails).
1485 func DBName(val string) attribute.KeyValue {
1486 return DBNameKey.String(val)
1487 }
1488
1489 // DBOperation returns an attribute KeyValue conforming to the
1490 // "db.operation" semantic conventions. It represents the name of the operation
1491 // being executed, e.g. the [MongoDB command
1492 // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
1493 // such as `findAndModify`, or the SQL keyword.
1494 func DBOperation(val string) attribute.KeyValue {
1495 return DBOperationKey.String(val)
1496 }
1497
1498 // DBRedisDBIndex returns an attribute KeyValue conforming to the
1499 // "db.redis.database_index" semantic conventions. It represents the index of
1500 // the database being accessed as used in the [`SELECT`
1501 // command](https://redis.io/commands/select), provided as an integer. To be
1502 // used instead of the generic `db.name` attribute.
1503 func DBRedisDBIndex(val int) attribute.KeyValue {
1504 return DBRedisDBIndexKey.Int(val)
1505 }
1506
1507 // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
1508 // semantic conventions. It represents the name of the primary table that the
1509 // operation is acting upon, including the database name (if applicable).
1510 func DBSQLTable(val string) attribute.KeyValue {
1511 return DBSQLTableKey.String(val)
1512 }
1513
1514 // DBStatement returns an attribute KeyValue conforming to the
1515 // "db.statement" semantic conventions. It represents the database statement
1516 // being executed.
1517 func DBStatement(val string) attribute.KeyValue {
1518 return DBStatementKey.String(val)
1519 }
1520
1521 // DBUser returns an attribute KeyValue conforming to the "db.user" semantic
1522 // conventions. It represents the username for accessing the database.
1523 func DBUser(val string) attribute.KeyValue {
1524 return DBUserKey.String(val)
1525 }
1526
1527 // Describes deprecated HTTP attributes.
1528 const (
1529 // HTTPFlavorKey is the attribute Key conforming to the "http.flavor"
1530 // semantic conventions.
1531 //
1532 // Type: Enum
1533 // RequirementLevel: Optional
1534 // Stability: deprecated
1535 // Deprecated: use `network.protocol.name` instead.
1536 HTTPFlavorKey = attribute.Key("http.flavor")
1537
1538 // HTTPMethodKey is the attribute Key conforming to the "http.method"
1539 // semantic conventions.
1540 //
1541 // Type: string
1542 // RequirementLevel: Optional
1543 // Stability: deprecated
1544 // Examples: 'GET', 'POST', 'HEAD'
1545 // Deprecated: use `http.request.method` instead.
1546 HTTPMethodKey = attribute.Key("http.method")
1547
1548 // HTTPRequestContentLengthKey is the attribute Key conforming to the
1549 // "http.request_content_length" semantic conventions.
1550 //
1551 // Type: int
1552 // RequirementLevel: Optional
1553 // Stability: deprecated
1554 // Examples: 3495
1555 // Deprecated: use `http.request.header.content-length` instead.
1556 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
1557
1558 // HTTPResponseContentLengthKey is the attribute Key conforming to the
1559 // "http.response_content_length" semantic conventions.
1560 //
1561 // Type: int
1562 // RequirementLevel: Optional
1563 // Stability: deprecated
1564 // Examples: 3495
1565 // Deprecated: use `http.response.header.content-length` instead.
1566 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
1567
1568 // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
1569 // semantic conventions.
1570 //
1571 // Type: string
1572 // RequirementLevel: Optional
1573 // Stability: deprecated
1574 // Examples: 'http', 'https'
1575 // Deprecated: use `url.scheme` instead.
1576 HTTPSchemeKey = attribute.Key("http.scheme")
1577
1578 // HTTPStatusCodeKey is the attribute Key conforming to the
1579 // "http.status_code" semantic conventions.
1580 //
1581 // Type: int
1582 // RequirementLevel: Optional
1583 // Stability: deprecated
1584 // Examples: 200
1585 // Deprecated: use `http.response.status_code` instead.
1586 HTTPStatusCodeKey = attribute.Key("http.status_code")
1587
1588 // HTTPTargetKey is the attribute Key conforming to the "http.target"
1589 // semantic conventions.
1590 //
1591 // Type: string
1592 // RequirementLevel: Optional
1593 // Stability: deprecated
1594 // Examples: '/search?q=OpenTelemetry#SemConv'
1595 // Deprecated: use `url.path` and `url.query` instead.
1596 HTTPTargetKey = attribute.Key("http.target")
1597
1598 // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
1599 // conventions.
1600 //
1601 // Type: string
1602 // RequirementLevel: Optional
1603 // Stability: deprecated
1604 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
1605 // Deprecated: use `url.full` instead.
1606 HTTPURLKey = attribute.Key("http.url")
1607
1608 // HTTPUserAgentKey is the attribute Key conforming to the
1609 // "http.user_agent" semantic conventions.
1610 //
1611 // Type: string
1612 // RequirementLevel: Optional
1613 // Stability: deprecated
1614 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
1615 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
1616 // Version/14.1.2 Mobile/15E148 Safari/604.1'
1617 // Deprecated: use `user_agent.original` instead.
1618 HTTPUserAgentKey = attribute.Key("http.user_agent")
1619 )
1620
1621 var (
1622 // HTTP/1.0
1623 //
1624 // Deprecated: use `network.protocol.name` instead.
1625 HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0")
1626 // HTTP/1.1
1627 //
1628 // Deprecated: use `network.protocol.name` instead.
1629 HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1")
1630 // HTTP/2
1631 //
1632 // Deprecated: use `network.protocol.name` instead.
1633 HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0")
1634 // HTTP/3
1635 //
1636 // Deprecated: use `network.protocol.name` instead.
1637 HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0")
1638 // SPDY protocol
1639 //
1640 // Deprecated: use `network.protocol.name` instead.
1641 HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY")
1642 // QUIC protocol
1643 //
1644 // Deprecated: use `network.protocol.name` instead.
1645 HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC")
1646 )
1647
1648 // HTTPMethod returns an attribute KeyValue conforming to the "http.method"
1649 // semantic conventions.
1650 //
1651 // Deprecated: use `http.request.method` instead.
1652 func HTTPMethod(val string) attribute.KeyValue {
1653 return HTTPMethodKey.String(val)
1654 }
1655
1656 // HTTPRequestContentLength returns an attribute KeyValue conforming to the
1657 // "http.request_content_length" semantic conventions.
1658 //
1659 // Deprecated: use `http.request.header.content-length` instead.
1660 func HTTPRequestContentLength(val int) attribute.KeyValue {
1661 return HTTPRequestContentLengthKey.Int(val)
1662 }
1663
1664 // HTTPResponseContentLength returns an attribute KeyValue conforming to the
1665 // "http.response_content_length" semantic conventions.
1666 //
1667 // Deprecated: use `http.response.header.content-length` instead.
1668 func HTTPResponseContentLength(val int) attribute.KeyValue {
1669 return HTTPResponseContentLengthKey.Int(val)
1670 }
1671
1672 // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
1673 // semantic conventions.
1674 //
1675 // Deprecated: use `url.scheme` instead.
1676 func HTTPScheme(val string) attribute.KeyValue {
1677 return HTTPSchemeKey.String(val)
1678 }
1679
1680 // HTTPStatusCode returns an attribute KeyValue conforming to the
1681 // "http.status_code" semantic conventions.
1682 //
1683 // Deprecated: use `http.response.status_code` instead.
1684 func HTTPStatusCode(val int) attribute.KeyValue {
1685 return HTTPStatusCodeKey.Int(val)
1686 }
1687
1688 // HTTPTarget returns an attribute KeyValue conforming to the "http.target"
1689 // semantic conventions.
1690 //
1691 // Deprecated: use `url.path` and `url.query` instead.
1692 func HTTPTarget(val string) attribute.KeyValue {
1693 return HTTPTargetKey.String(val)
1694 }
1695
1696 // HTTPURL returns an attribute KeyValue conforming to the "http.url"
1697 // semantic conventions.
1698 //
1699 // Deprecated: use `url.full` instead.
1700 func HTTPURL(val string) attribute.KeyValue {
1701 return HTTPURLKey.String(val)
1702 }
1703
1704 // HTTPUserAgent returns an attribute KeyValue conforming to the
1705 // "http.user_agent" semantic conventions.
1706 //
1707 // Deprecated: use `user_agent.original` instead.
1708 func HTTPUserAgent(val string) attribute.KeyValue {
1709 return HTTPUserAgentKey.String(val)
1710 }
1711
1712 // These attributes may be used for any network related operation.
1713 const (
1714 // NetHostNameKey is the attribute Key conforming to the "net.host.name"
1715 // semantic conventions.
1716 //
1717 // Type: string
1718 // RequirementLevel: Optional
1719 // Stability: deprecated
1720 // Examples: 'example.com'
1721 // Deprecated: use `server.address`.
1722 NetHostNameKey = attribute.Key("net.host.name")
1723
1724 // NetHostPortKey is the attribute Key conforming to the "net.host.port"
1725 // semantic conventions.
1726 //
1727 // Type: int
1728 // RequirementLevel: Optional
1729 // Stability: deprecated
1730 // Examples: 8080
1731 // Deprecated: use `server.port`.
1732 NetHostPortKey = attribute.Key("net.host.port")
1733
1734 // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
1735 // semantic conventions.
1736 //
1737 // Type: string
1738 // RequirementLevel: Optional
1739 // Stability: deprecated
1740 // Examples: 'example.com'
1741 // Deprecated: use `server.address` on client spans and `client.address` on
1742 // server spans.
1743 NetPeerNameKey = attribute.Key("net.peer.name")
1744
1745 // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
1746 // semantic conventions.
1747 //
1748 // Type: int
1749 // RequirementLevel: Optional
1750 // Stability: deprecated
1751 // Examples: 8080
1752 // Deprecated: use `server.port` on client spans and `client.port` on
1753 // server spans.
1754 NetPeerPortKey = attribute.Key("net.peer.port")
1755
1756 // NetProtocolNameKey is the attribute Key conforming to the
1757 // "net.protocol.name" semantic conventions.
1758 //
1759 // Type: string
1760 // RequirementLevel: Optional
1761 // Stability: deprecated
1762 // Examples: 'amqp', 'http', 'mqtt'
1763 // Deprecated: use `network.protocol.name`.
1764 NetProtocolNameKey = attribute.Key("net.protocol.name")
1765
1766 // NetProtocolVersionKey is the attribute Key conforming to the
1767 // "net.protocol.version" semantic conventions.
1768 //
1769 // Type: string
1770 // RequirementLevel: Optional
1771 // Stability: deprecated
1772 // Examples: '3.1.1'
1773 // Deprecated: use `network.protocol.version`.
1774 NetProtocolVersionKey = attribute.Key("net.protocol.version")
1775
1776 // NetSockFamilyKey is the attribute Key conforming to the
1777 // "net.sock.family" semantic conventions.
1778 //
1779 // Type: Enum
1780 // RequirementLevel: Optional
1781 // Stability: deprecated
1782 // Deprecated: use `network.transport` and `network.type`.
1783 NetSockFamilyKey = attribute.Key("net.sock.family")
1784
1785 // NetSockHostAddrKey is the attribute Key conforming to the
1786 // "net.sock.host.addr" semantic conventions.
1787 //
1788 // Type: string
1789 // RequirementLevel: Optional
1790 // Stability: deprecated
1791 // Examples: '/var/my.sock'
1792 // Deprecated: use `network.local.address`.
1793 NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
1794
1795 // NetSockHostPortKey is the attribute Key conforming to the
1796 // "net.sock.host.port" semantic conventions.
1797 //
1798 // Type: int
1799 // RequirementLevel: Optional
1800 // Stability: deprecated
1801 // Examples: 8080
1802 // Deprecated: use `network.local.port`.
1803 NetSockHostPortKey = attribute.Key("net.sock.host.port")
1804
1805 // NetSockPeerAddrKey is the attribute Key conforming to the
1806 // "net.sock.peer.addr" semantic conventions.
1807 //
1808 // Type: string
1809 // RequirementLevel: Optional
1810 // Stability: deprecated
1811 // Examples: '192.168.0.1'
1812 // Deprecated: use `network.peer.address`.
1813 NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
1814
1815 // NetSockPeerNameKey is the attribute Key conforming to the
1816 // "net.sock.peer.name" semantic conventions.
1817 //
1818 // Type: string
1819 // RequirementLevel: Optional
1820 // Stability: deprecated
1821 // Examples: '/var/my.sock'
1822 // Deprecated: no replacement at this time.
1823 NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
1824
1825 // NetSockPeerPortKey is the attribute Key conforming to the
1826 // "net.sock.peer.port" semantic conventions.
1827 //
1828 // Type: int
1829 // RequirementLevel: Optional
1830 // Stability: deprecated
1831 // Examples: 65531
1832 // Deprecated: use `network.peer.port`.
1833 NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
1834
1835 // NetTransportKey is the attribute Key conforming to the "net.transport"
1836 // semantic conventions.
1837 //
1838 // Type: Enum
1839 // RequirementLevel: Optional
1840 // Stability: deprecated
1841 // Deprecated: use `network.transport`.
1842 NetTransportKey = attribute.Key("net.transport")
1843 )
1844
1845 var (
1846 // IPv4 address
1847 //
1848 // Deprecated: use `network.transport` and `network.type`.
1849 NetSockFamilyInet = NetSockFamilyKey.String("inet")
1850 // IPv6 address
1851 //
1852 // Deprecated: use `network.transport` and `network.type`.
1853 NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
1854 // Unix domain socket path
1855 //
1856 // Deprecated: use `network.transport` and `network.type`.
1857 NetSockFamilyUnix = NetSockFamilyKey.String("unix")
1858 )
1859
1860 var (
1861 // ip_tcp
1862 //
1863 // Deprecated: use `network.transport`.
1864 NetTransportTCP = NetTransportKey.String("ip_tcp")
1865 // ip_udp
1866 //
1867 // Deprecated: use `network.transport`.
1868 NetTransportUDP = NetTransportKey.String("ip_udp")
1869 // Named or anonymous pipe
1870 //
1871 // Deprecated: use `network.transport`.
1872 NetTransportPipe = NetTransportKey.String("pipe")
1873 // In-process communication
1874 //
1875 // Deprecated: use `network.transport`.
1876 NetTransportInProc = NetTransportKey.String("inproc")
1877 // Something else (non IP-based)
1878 //
1879 // Deprecated: use `network.transport`.
1880 NetTransportOther = NetTransportKey.String("other")
1881 )
1882
1883 // NetHostName returns an attribute KeyValue conforming to the
1884 // "net.host.name" semantic conventions.
1885 //
1886 // Deprecated: use `server.address`.
1887 func NetHostName(val string) attribute.KeyValue {
1888 return NetHostNameKey.String(val)
1889 }
1890
1891 // NetHostPort returns an attribute KeyValue conforming to the
1892 // "net.host.port" semantic conventions.
1893 //
1894 // Deprecated: use `server.port`.
1895 func NetHostPort(val int) attribute.KeyValue {
1896 return NetHostPortKey.Int(val)
1897 }
1898
1899 // NetPeerName returns an attribute KeyValue conforming to the
1900 // "net.peer.name" semantic conventions.
1901 //
1902 // Deprecated: use `server.address` on client spans and `client.address` on
1903 // server spans.
1904 func NetPeerName(val string) attribute.KeyValue {
1905 return NetPeerNameKey.String(val)
1906 }
1907
1908 // NetPeerPort returns an attribute KeyValue conforming to the
1909 // "net.peer.port" semantic conventions.
1910 //
1911 // Deprecated: use `server.port` on client spans and `client.port` on server
1912 // spans.
1913 func NetPeerPort(val int) attribute.KeyValue {
1914 return NetPeerPortKey.Int(val)
1915 }
1916
1917 // NetProtocolName returns an attribute KeyValue conforming to the
1918 // "net.protocol.name" semantic conventions.
1919 //
1920 // Deprecated: use `network.protocol.name`.
1921 func NetProtocolName(val string) attribute.KeyValue {
1922 return NetProtocolNameKey.String(val)
1923 }
1924
1925 // NetProtocolVersion returns an attribute KeyValue conforming to the
1926 // "net.protocol.version" semantic conventions.
1927 //
1928 // Deprecated: use `network.protocol.version`.
1929 func NetProtocolVersion(val string) attribute.KeyValue {
1930 return NetProtocolVersionKey.String(val)
1931 }
1932
1933 // NetSockHostAddr returns an attribute KeyValue conforming to the
1934 // "net.sock.host.addr" semantic conventions.
1935 //
1936 // Deprecated: use `network.local.address`.
1937 func NetSockHostAddr(val string) attribute.KeyValue {
1938 return NetSockHostAddrKey.String(val)
1939 }
1940
1941 // NetSockHostPort returns an attribute KeyValue conforming to the
1942 // "net.sock.host.port" semantic conventions.
1943 //
1944 // Deprecated: use `network.local.port`.
1945 func NetSockHostPort(val int) attribute.KeyValue {
1946 return NetSockHostPortKey.Int(val)
1947 }
1948
1949 // NetSockPeerAddr returns an attribute KeyValue conforming to the
1950 // "net.sock.peer.addr" semantic conventions.
1951 //
1952 // Deprecated: use `network.peer.address`.
1953 func NetSockPeerAddr(val string) attribute.KeyValue {
1954 return NetSockPeerAddrKey.String(val)
1955 }
1956
1957 // NetSockPeerName returns an attribute KeyValue conforming to the
1958 // "net.sock.peer.name" semantic conventions.
1959 //
1960 // Deprecated: no replacement at this time.
1961 func NetSockPeerName(val string) attribute.KeyValue {
1962 return NetSockPeerNameKey.String(val)
1963 }
1964
1965 // NetSockPeerPort returns an attribute KeyValue conforming to the
1966 // "net.sock.peer.port" semantic conventions.
1967 //
1968 // Deprecated: use `network.peer.port`.
1969 func NetSockPeerPort(val int) attribute.KeyValue {
1970 return NetSockPeerPortKey.Int(val)
1971 }
1972
1973 // These attributes may be used to describe the receiver of a network
1974 // exchange/packet. These should be used when there is no client/server
1975 // relationship between the two sides, or when that relationship is unknown.
1976 // This covers low-level network interactions (e.g. packet tracing) where you
1977 // don't know if there was a connection or which side initiated it. This also
1978 // covers unidirectional UDP flows and peer-to-peer communication where the
1979 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
1980 // client and server.
1981 const (
1982 // DestinationAddressKey is the attribute Key conforming to the
1983 // "destination.address" semantic conventions. It represents the
1984 // destination address - domain name if available without reverse DNS
1985 // lookup; otherwise, IP address or Unix domain socket name.
1986 //
1987 // Type: string
1988 // RequirementLevel: Optional
1989 // Stability: experimental
1990 // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
1991 // Note: When observed from the source side, and when communicating through
1992 // an intermediary, `destination.address` SHOULD represent the destination
1993 // address behind any intermediaries, for example proxies, if it's
1994 // available.
1995 DestinationAddressKey = attribute.Key("destination.address")
1996
1997 // DestinationPortKey is the attribute Key conforming to the
1998 // "destination.port" semantic conventions. It represents the destination
1999 // port number
2000 //
2001 // Type: int
2002 // RequirementLevel: Optional
2003 // Stability: experimental
2004 // Examples: 3389, 2888
2005 DestinationPortKey = attribute.Key("destination.port")
2006 )
2007
2008 // DestinationAddress returns an attribute KeyValue conforming to the
2009 // "destination.address" semantic conventions. It represents the destination
2010 // address - domain name if available without reverse DNS lookup; otherwise, IP
2011 // address or Unix domain socket name.
2012 func DestinationAddress(val string) attribute.KeyValue {
2013 return DestinationAddressKey.String(val)
2014 }
2015
2016 // DestinationPort returns an attribute KeyValue conforming to the
2017 // "destination.port" semantic conventions. It represents the destination port
2018 // number
2019 func DestinationPort(val int) attribute.KeyValue {
2020 return DestinationPortKey.Int(val)
2021 }
2022
2023 // These attributes may be used for any disk related operation.
2024 const (
2025 // DiskIoDirectionKey is the attribute Key conforming to the
2026 // "disk.io.direction" semantic conventions. It represents the disk IO
2027 // operation direction.
2028 //
2029 // Type: Enum
2030 // RequirementLevel: Optional
2031 // Stability: experimental
2032 // Examples: 'read'
2033 DiskIoDirectionKey = attribute.Key("disk.io.direction")
2034 )
2035
2036 var (
2037 // read
2038 DiskIoDirectionRead = DiskIoDirectionKey.String("read")
2039 // write
2040 DiskIoDirectionWrite = DiskIoDirectionKey.String("write")
2041 )
2042
2043 // The shared attributes used to report an error.
2044 const (
2045 // ErrorTypeKey is the attribute Key conforming to the "error.type"
2046 // semantic conventions. It represents the describes a class of error the
2047 // operation ended with.
2048 //
2049 // Type: Enum
2050 // RequirementLevel: Optional
2051 // Stability: stable
2052 // Examples: 'timeout', 'java.net.UnknownHostException',
2053 // 'server_certificate_invalid', '500'
2054 // Note: The `error.type` SHOULD be predictable and SHOULD have low
2055 // cardinality.
2056 // Instrumentations SHOULD document the list of errors they report.
2057 //
2058 // The cardinality of `error.type` within one instrumentation library
2059 // SHOULD be low.
2060 // Telemetry consumers that aggregate data from multiple instrumentation
2061 // libraries and applications
2062 // should be prepared for `error.type` to have high cardinality at query
2063 // time when no
2064 // additional filters are applied.
2065 //
2066 // If the operation has completed successfully, instrumentations SHOULD NOT
2067 // set `error.type`.
2068 //
2069 // If a specific domain defines its own set of error identifiers (such as
2070 // HTTP or gRPC status codes),
2071 // it's RECOMMENDED to:
2072 //
2073 // * Use a domain-specific attribute
2074 // * Set `error.type` to capture all errors, regardless of whether they are
2075 // defined within the domain-specific set or not.
2076 ErrorTypeKey = attribute.Key("error.type")
2077 )
2078
2079 var (
2080 // A fallback error value to be used when the instrumentation doesn't define a custom value
2081 ErrorTypeOther = ErrorTypeKey.String("_OTHER")
2082 )
2083
2084 // The shared attributes used to report a single exception associated with a
2085 // span or log.
2086 const (
2087 // ExceptionEscapedKey is the attribute Key conforming to the
2088 // "exception.escaped" semantic conventions. It represents the sHOULD be
2089 // set to true if the exception event is recorded at a point where it is
2090 // known that the exception is escaping the scope of the span.
2091 //
2092 // Type: boolean
2093 // RequirementLevel: Optional
2094 // Stability: experimental
2095 // Note: An exception is considered to have escaped (or left) the scope of
2096 // a span,
2097 // if that span is ended while the exception is still logically "in
2098 // flight".
2099 // This may be actually "in flight" in some languages (e.g. if the
2100 // exception
2101 // is passed to a Context manager's `__exit__` method in Python) but will
2102 // usually be caught at the point of recording the exception in most
2103 // languages.
2104 //
2105 // It is usually not possible to determine at the point where an exception
2106 // is thrown
2107 // whether it will escape the scope of a span.
2108 // However, it is trivial to know that an exception
2109 // will escape, if one checks for an active exception just before ending
2110 // the span,
2111 // as done in the [example for recording span
2112 // exceptions](#recording-an-exception).
2113 //
2114 // It follows that an exception may still escape the scope of the span
2115 // even if the `exception.escaped` attribute was not set or set to false,
2116 // since the event might have been recorded at a time where it was not
2117 // clear whether the exception will escape.
2118 ExceptionEscapedKey = attribute.Key("exception.escaped")
2119
2120 // ExceptionMessageKey is the attribute Key conforming to the
2121 // "exception.message" semantic conventions. It represents the exception
2122 // message.
2123 //
2124 // Type: string
2125 // RequirementLevel: Optional
2126 // Stability: experimental
2127 // Examples: 'Division by zero', "Can't convert 'int' object to str
2128 // implicitly"
2129 ExceptionMessageKey = attribute.Key("exception.message")
2130
2131 // ExceptionStacktraceKey is the attribute Key conforming to the
2132 // "exception.stacktrace" semantic conventions. It represents a stacktrace
2133 // as a string in the natural representation for the language runtime. The
2134 // representation is to be determined and documented by each language SIG.
2135 //
2136 // Type: string
2137 // RequirementLevel: Optional
2138 // Stability: experimental
2139 // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
2140 // exception\\n at '
2141 // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
2142 // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
2143 // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
2144 ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
2145
2146 // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
2147 // semantic conventions. It represents the type of the exception (its
2148 // fully-qualified class name, if applicable). The dynamic type of the
2149 // exception should be preferred over the static type in languages that
2150 // support it.
2151 //
2152 // Type: string
2153 // RequirementLevel: Optional
2154 // Stability: experimental
2155 // Examples: 'java.net.ConnectException', 'OSError'
2156 ExceptionTypeKey = attribute.Key("exception.type")
2157 )
2158
2159 // ExceptionEscaped returns an attribute KeyValue conforming to the
2160 // "exception.escaped" semantic conventions. It represents the sHOULD be set to
2161 // true if the exception event is recorded at a point where it is known that
2162 // the exception is escaping the scope of the span.
2163 func ExceptionEscaped(val bool) attribute.KeyValue {
2164 return ExceptionEscapedKey.Bool(val)
2165 }
2166
2167 // ExceptionMessage returns an attribute KeyValue conforming to the
2168 // "exception.message" semantic conventions. It represents the exception
2169 // message.
2170 func ExceptionMessage(val string) attribute.KeyValue {
2171 return ExceptionMessageKey.String(val)
2172 }
2173
2174 // ExceptionStacktrace returns an attribute KeyValue conforming to the
2175 // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
2176 // string in the natural representation for the language runtime. The
2177 // representation is to be determined and documented by each language SIG.
2178 func ExceptionStacktrace(val string) attribute.KeyValue {
2179 return ExceptionStacktraceKey.String(val)
2180 }
2181
2182 // ExceptionType returns an attribute KeyValue conforming to the
2183 // "exception.type" semantic conventions. It represents the type of the
2184 // exception (its fully-qualified class name, if applicable). The dynamic type
2185 // of the exception should be preferred over the static type in languages that
2186 // support it.
2187 func ExceptionType(val string) attribute.KeyValue {
2188 return ExceptionTypeKey.String(val)
2189 }
2190
2191 // Semantic convention attributes in the HTTP namespace.
2192 const (
2193 // HTTPRequestBodySizeKey is the attribute Key conforming to the
2194 // "http.request.body.size" semantic conventions. It represents the size of
2195 // the request payload body in bytes. This is the number of bytes
2196 // transferred excluding headers and is often, but not always, present as
2197 // the
2198 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
2199 // header. For requests using transport encoding, this should be the
2200 // compressed size.
2201 //
2202 // Type: int
2203 // RequirementLevel: Optional
2204 // Stability: experimental
2205 // Examples: 3495
2206 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
2207
2208 // HTTPRequestMethodKey is the attribute Key conforming to the
2209 // "http.request.method" semantic conventions. It represents the hTTP
2210 // request method.
2211 //
2212 // Type: Enum
2213 // RequirementLevel: Optional
2214 // Stability: stable
2215 // Examples: 'GET', 'POST', 'HEAD'
2216 // Note: HTTP request method value SHOULD be "known" to the
2217 // instrumentation.
2218 // By default, this convention defines "known" methods as the ones listed
2219 // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
2220 // and the PATCH method defined in
2221 // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
2222 //
2223 // If the HTTP request method is not known to instrumentation, it MUST set
2224 // the `http.request.method` attribute to `_OTHER`.
2225 //
2226 // If the HTTP instrumentation could end up converting valid HTTP request
2227 // methods to `_OTHER`, then it MUST provide a way to override
2228 // the list of known HTTP methods. If this override is done via environment
2229 // variable, then the environment variable MUST be named
2230 // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
2231 // list of case-sensitive known HTTP methods
2232 // (this list MUST be a full override of the default known method, it is
2233 // not a list of known methods in addition to the defaults).
2234 //
2235 // HTTP method names are case-sensitive and `http.request.method` attribute
2236 // value MUST match a known HTTP method name exactly.
2237 // Instrumentations for specific web frameworks that consider HTTP methods
2238 // to be case insensitive, SHOULD populate a canonical equivalent.
2239 // Tracing instrumentations that do so, MUST also set
2240 // `http.request.method_original` to the original value.
2241 HTTPRequestMethodKey = attribute.Key("http.request.method")
2242
2243 // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
2244 // "http.request.method_original" semantic conventions. It represents the
2245 // original HTTP method sent by the client in the request line.
2246 //
2247 // Type: string
2248 // RequirementLevel: Optional
2249 // Stability: stable
2250 // Examples: 'GeT', 'ACL', 'foo'
2251 HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
2252
2253 // HTTPRequestResendCountKey is the attribute Key conforming to the
2254 // "http.request.resend_count" semantic conventions. It represents the
2255 // ordinal number of request resending attempt (for any reason, including
2256 // redirects).
2257 //
2258 // Type: int
2259 // RequirementLevel: Optional
2260 // Stability: stable
2261 // Examples: 3
2262 // Note: The resend count SHOULD be updated each time an HTTP request gets
2263 // resent by the client, regardless of what was the cause of the resending
2264 // (e.g. redirection, authorization failure, 503 Server Unavailable,
2265 // network issues, or any other).
2266 HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
2267
2268 // HTTPResponseBodySizeKey is the attribute Key conforming to the
2269 // "http.response.body.size" semantic conventions. It represents the size
2270 // of the response payload body in bytes. This is the number of bytes
2271 // transferred excluding headers and is often, but not always, present as
2272 // the
2273 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
2274 // header. For requests using transport encoding, this should be the
2275 // compressed size.
2276 //
2277 // Type: int
2278 // RequirementLevel: Optional
2279 // Stability: experimental
2280 // Examples: 3495
2281 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
2282
2283 // HTTPResponseStatusCodeKey is the attribute Key conforming to the
2284 // "http.response.status_code" semantic conventions. It represents the
2285 // [HTTP response status
2286 // code](https://tools.ietf.org/html/rfc7231#section-6).
2287 //
2288 // Type: int
2289 // RequirementLevel: Optional
2290 // Stability: stable
2291 // Examples: 200
2292 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
2293
2294 // HTTPRouteKey is the attribute Key conforming to the "http.route"
2295 // semantic conventions. It represents the matched route, that is, the path
2296 // template in the format used by the respective server framework.
2297 //
2298 // Type: string
2299 // RequirementLevel: Optional
2300 // Stability: stable
2301 // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
2302 // Note: MUST NOT be populated when this is not supported by the HTTP
2303 // server framework as the route attribute should have low-cardinality and
2304 // the URI path can NOT substitute it.
2305 // SHOULD include the [application
2306 // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
2307 HTTPRouteKey = attribute.Key("http.route")
2308 )
2309
2310 var (
2311 // CONNECT method
2312 HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
2313 // DELETE method
2314 HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
2315 // GET method
2316 HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
2317 // HEAD method
2318 HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
2319 // OPTIONS method
2320 HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
2321 // PATCH method
2322 HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
2323 // POST method
2324 HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
2325 // PUT method
2326 HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
2327 // TRACE method
2328 HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
2329 // Any HTTP method that the instrumentation has no prior knowledge of
2330 HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
2331 )
2332
2333 // HTTPRequestBodySize returns an attribute KeyValue conforming to the
2334 // "http.request.body.size" semantic conventions. It represents the size of the
2335 // request payload body in bytes. This is the number of bytes transferred
2336 // excluding headers and is often, but not always, present as the
2337 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
2338 // header. For requests using transport encoding, this should be the compressed
2339 // size.
2340 func HTTPRequestBodySize(val int) attribute.KeyValue {
2341 return HTTPRequestBodySizeKey.Int(val)
2342 }
2343
2344 // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
2345 // "http.request.method_original" semantic conventions. It represents the
2346 // original HTTP method sent by the client in the request line.
2347 func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
2348 return HTTPRequestMethodOriginalKey.String(val)
2349 }
2350
2351 // HTTPRequestResendCount returns an attribute KeyValue conforming to the
2352 // "http.request.resend_count" semantic conventions. It represents the ordinal
2353 // number of request resending attempt (for any reason, including redirects).
2354 func HTTPRequestResendCount(val int) attribute.KeyValue {
2355 return HTTPRequestResendCountKey.Int(val)
2356 }
2357
2358 // HTTPResponseBodySize returns an attribute KeyValue conforming to the
2359 // "http.response.body.size" semantic conventions. It represents the size of
2360 // the response payload body in bytes. This is the number of bytes transferred
2361 // excluding headers and is often, but not always, present as the
2362 // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
2363 // header. For requests using transport encoding, this should be the compressed
2364 // size.
2365 func HTTPResponseBodySize(val int) attribute.KeyValue {
2366 return HTTPResponseBodySizeKey.Int(val)
2367 }
2368
2369 // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
2370 // "http.response.status_code" semantic conventions. It represents the [HTTP
2371 // response status code](https://tools.ietf.org/html/rfc7231#section-6).
2372 func HTTPResponseStatusCode(val int) attribute.KeyValue {
2373 return HTTPResponseStatusCodeKey.Int(val)
2374 }
2375
2376 // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
2377 // semantic conventions. It represents the matched route, that is, the path
2378 // template in the format used by the respective server framework.
2379 func HTTPRoute(val string) attribute.KeyValue {
2380 return HTTPRouteKey.String(val)
2381 }
2382
2383 // Attributes describing telemetry around messaging systems and messaging
2384 // activities.
2385 const (
2386 // MessagingBatchMessageCountKey is the attribute Key conforming to the
2387 // "messaging.batch.message_count" semantic conventions. It represents the
2388 // number of messages sent, received, or processed in the scope of the
2389 // batching operation.
2390 //
2391 // Type: int
2392 // RequirementLevel: Optional
2393 // Stability: experimental
2394 // Examples: 0, 1, 2
2395 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
2396 // spans that operate with a single message. When a messaging client
2397 // library supports both batch and single-message API for the same
2398 // operation, instrumentations SHOULD use `messaging.batch.message_count`
2399 // for batching APIs and SHOULD NOT use it for single-message APIs.
2400 MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
2401
2402 // MessagingClientIDKey is the attribute Key conforming to the
2403 // "messaging.client_id" semantic conventions. It represents a unique
2404 // identifier for the client that consumes or produces a message.
2405 //
2406 // Type: string
2407 // RequirementLevel: Optional
2408 // Stability: experimental
2409 // Examples: 'client-5', 'myhost@8742@s8083jm'
2410 MessagingClientIDKey = attribute.Key("messaging.client_id")
2411
2412 // MessagingDestinationAnonymousKey is the attribute Key conforming to the
2413 // "messaging.destination.anonymous" semantic conventions. It represents a
2414 // boolean that is true if the message destination is anonymous (could be
2415 // unnamed or have auto-generated name).
2416 //
2417 // Type: boolean
2418 // RequirementLevel: Optional
2419 // Stability: experimental
2420 MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
2421
2422 // MessagingDestinationNameKey is the attribute Key conforming to the
2423 // "messaging.destination.name" semantic conventions. It represents the
2424 // message destination name
2425 //
2426 // Type: string
2427 // RequirementLevel: Optional
2428 // Stability: experimental
2429 // Examples: 'MyQueue', 'MyTopic'
2430 // Note: Destination name SHOULD uniquely identify a specific queue, topic
2431 // or other entity within the broker. If
2432 // the broker doesn't have such notion, the destination name SHOULD
2433 // uniquely identify the broker.
2434 MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
2435
2436 // MessagingDestinationTemplateKey is the attribute Key conforming to the
2437 // "messaging.destination.template" semantic conventions. It represents the
2438 // low cardinality representation of the messaging destination name
2439 //
2440 // Type: string
2441 // RequirementLevel: Optional
2442 // Stability: experimental
2443 // Examples: '/customers/{customerID}'
2444 // Note: Destination names could be constructed from templates. An example
2445 // would be a destination name involving a user name or product id.
2446 // Although the destination name in this case is of high cardinality, the
2447 // underlying template is of low cardinality and can be effectively used
2448 // for grouping and aggregation.
2449 MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
2450
2451 // MessagingDestinationTemporaryKey is the attribute Key conforming to the
2452 // "messaging.destination.temporary" semantic conventions. It represents a
2453 // boolean that is true if the message destination is temporary and might
2454 // not exist anymore after messages are processed.
2455 //
2456 // Type: boolean
2457 // RequirementLevel: Optional
2458 // Stability: experimental
2459 MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
2460
2461 // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
2462 // to the "messaging.destination_publish.anonymous" semantic conventions.
2463 // It represents a boolean that is true if the publish message destination
2464 // is anonymous (could be unnamed or have auto-generated name).
2465 //
2466 // Type: boolean
2467 // RequirementLevel: Optional
2468 // Stability: experimental
2469 MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
2470
2471 // MessagingDestinationPublishNameKey is the attribute Key conforming to
2472 // the "messaging.destination_publish.name" semantic conventions. It
2473 // represents the name of the original destination the message was
2474 // published to
2475 //
2476 // Type: string
2477 // RequirementLevel: Optional
2478 // Stability: experimental
2479 // Examples: 'MyQueue', 'MyTopic'
2480 // Note: The name SHOULD uniquely identify a specific queue, topic, or
2481 // other entity within the broker. If
2482 // the broker doesn't have such notion, the original destination name
2483 // SHOULD uniquely identify the broker.
2484 MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
2485
2486 // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming
2487 // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions.
2488 // It represents the ordering key for a given message. If the attribute is
2489 // not present, the message does not have an ordering key.
2490 //
2491 // Type: string
2492 // RequirementLevel: Optional
2493 // Stability: experimental
2494 // Examples: 'ordering_key'
2495 MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
2496
2497 // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
2498 // "messaging.kafka.consumer.group" semantic conventions. It represents the
2499 // name of the Kafka Consumer Group that is handling the message. Only
2500 // applies to consumers, not producers.
2501 //
2502 // Type: string
2503 // RequirementLevel: Optional
2504 // Stability: experimental
2505 // Examples: 'my-group'
2506 MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
2507
2508 // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
2509 // the "messaging.kafka.destination.partition" semantic conventions. It
2510 // represents the partition the message is sent to.
2511 //
2512 // Type: int
2513 // RequirementLevel: Optional
2514 // Stability: experimental
2515 // Examples: 2
2516 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
2517
2518 // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
2519 // "messaging.kafka.message.key" semantic conventions. It represents the
2520 // message keys in Kafka are used for grouping alike messages to ensure
2521 // they're processed on the same partition. They differ from
2522 // `messaging.message.id` in that they're not unique. If the key is `null`,
2523 // the attribute MUST NOT be set.
2524 //
2525 // Type: string
2526 // RequirementLevel: Optional
2527 // Stability: experimental
2528 // Examples: 'myKey'
2529 // Note: If the key type is not string, it's string representation has to
2530 // be supplied for the attribute. If the key has no unambiguous, canonical
2531 // string form, don't include its value.
2532 MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
2533
2534 // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
2535 // "messaging.kafka.message.offset" semantic conventions. It represents the
2536 // offset of a record in the corresponding Kafka partition.
2537 //
2538 // Type: int
2539 // RequirementLevel: Optional
2540 // Stability: experimental
2541 // Examples: 42
2542 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
2543
2544 // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
2545 // "messaging.kafka.message.tombstone" semantic conventions. It represents
2546 // a boolean that is true if the message is a tombstone.
2547 //
2548 // Type: boolean
2549 // RequirementLevel: Optional
2550 // Stability: experimental
2551 MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
2552
2553 // MessagingMessageBodySizeKey is the attribute Key conforming to the
2554 // "messaging.message.body.size" semantic conventions. It represents the
2555 // size of the message body in bytes.
2556 //
2557 // Type: int
2558 // RequirementLevel: Optional
2559 // Stability: experimental
2560 // Examples: 1439
2561 // Note: This can refer to both the compressed or uncompressed body size.
2562 // If both sizes are known, the uncompressed
2563 // body size should be used.
2564 MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
2565
2566 // MessagingMessageConversationIDKey is the attribute Key conforming to the
2567 // "messaging.message.conversation_id" semantic conventions. It represents
2568 // the conversation ID identifying the conversation to which the message
2569 // belongs, represented as a string. Sometimes called "Correlation ID".
2570 //
2571 // Type: string
2572 // RequirementLevel: Optional
2573 // Stability: experimental
2574 // Examples: 'MyConversationID'
2575 MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
2576
2577 // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
2578 // "messaging.message.envelope.size" semantic conventions. It represents
2579 // the size of the message body and metadata in bytes.
2580 //
2581 // Type: int
2582 // RequirementLevel: Optional
2583 // Stability: experimental
2584 // Examples: 2738
2585 // Note: This can refer to both the compressed or uncompressed size. If
2586 // both sizes are known, the uncompressed
2587 // size should be used.
2588 MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
2589
2590 // MessagingMessageIDKey is the attribute Key conforming to the
2591 // "messaging.message.id" semantic conventions. It represents a value used
2592 // by the messaging system as an identifier for the message, represented as
2593 // a string.
2594 //
2595 // Type: string
2596 // RequirementLevel: Optional
2597 // Stability: experimental
2598 // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
2599 MessagingMessageIDKey = attribute.Key("messaging.message.id")
2600
2601 // MessagingOperationKey is the attribute Key conforming to the
2602 // "messaging.operation" semantic conventions. It represents a string
2603 // identifying the kind of messaging operation.
2604 //
2605 // Type: Enum
2606 // RequirementLevel: Optional
2607 // Stability: experimental
2608 // Note: If a custom value is used, it MUST be of low cardinality.
2609 MessagingOperationKey = attribute.Key("messaging.operation")
2610
2611 // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
2612 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2613 // conventions. It represents the rabbitMQ message routing key.
2614 //
2615 // Type: string
2616 // RequirementLevel: Optional
2617 // Stability: experimental
2618 // Examples: 'myKey'
2619 MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
2620
2621 // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
2622 // "messaging.rocketmq.client_group" semantic conventions. It represents
2623 // the name of the RocketMQ producer/consumer group that is handling the
2624 // message. The client type is identified by the SpanKind.
2625 //
2626 // Type: string
2627 // RequirementLevel: Optional
2628 // Stability: experimental
2629 // Examples: 'myConsumerGroup'
2630 MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
2631
2632 // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
2633 // the "messaging.rocketmq.consumption_model" semantic conventions. It
2634 // represents the model of message consumption. This only applies to
2635 // consumer spans.
2636 //
2637 // Type: Enum
2638 // RequirementLevel: Optional
2639 // Stability: experimental
2640 MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
2641
2642 // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
2643 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2644 // conventions. It represents the delay time level for delay message, which
2645 // determines the message delay time.
2646 //
2647 // Type: int
2648 // RequirementLevel: Optional
2649 // Stability: experimental
2650 // Examples: 3
2651 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
2652
2653 // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
2654 // conforming to the "messaging.rocketmq.message.delivery_timestamp"
2655 // semantic conventions. It represents the timestamp in milliseconds that
2656 // the delay message is expected to be delivered to consumer.
2657 //
2658 // Type: int
2659 // RequirementLevel: Optional
2660 // Stability: experimental
2661 // Examples: 1665987217045
2662 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
2663
2664 // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
2665 // "messaging.rocketmq.message.group" semantic conventions. It represents
2666 // the it is essential for FIFO message. Messages that belong to the same
2667 // message group are always processed one by one within the same consumer
2668 // group.
2669 //
2670 // Type: string
2671 // RequirementLevel: Optional
2672 // Stability: experimental
2673 // Examples: 'myMessageGroup'
2674 MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
2675
2676 // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
2677 // "messaging.rocketmq.message.keys" semantic conventions. It represents
2678 // the key(s) of message, another way to mark message besides message id.
2679 //
2680 // Type: string[]
2681 // RequirementLevel: Optional
2682 // Stability: experimental
2683 // Examples: 'keyA', 'keyB'
2684 MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
2685
2686 // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
2687 // "messaging.rocketmq.message.tag" semantic conventions. It represents the
2688 // secondary classifier of message besides topic.
2689 //
2690 // Type: string
2691 // RequirementLevel: Optional
2692 // Stability: experimental
2693 // Examples: 'tagA'
2694 MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
2695
2696 // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
2697 // "messaging.rocketmq.message.type" semantic conventions. It represents
2698 // the type of message.
2699 //
2700 // Type: Enum
2701 // RequirementLevel: Optional
2702 // Stability: experimental
2703 MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
2704
2705 // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
2706 // "messaging.rocketmq.namespace" semantic conventions. It represents the
2707 // namespace of RocketMQ resources, resources in different namespaces are
2708 // individual.
2709 //
2710 // Type: string
2711 // RequirementLevel: Optional
2712 // Stability: experimental
2713 // Examples: 'myNamespace'
2714 MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
2715
2716 // MessagingSystemKey is the attribute Key conforming to the
2717 // "messaging.system" semantic conventions. It represents an identifier for
2718 // the messaging system being used. See below for a list of well-known
2719 // identifiers.
2720 //
2721 // Type: Enum
2722 // RequirementLevel: Optional
2723 // Stability: experimental
2724 MessagingSystemKey = attribute.Key("messaging.system")
2725 )
2726
2727 var (
2728 // 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
2729 MessagingOperationPublish = MessagingOperationKey.String("publish")
2730 // 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
2731 MessagingOperationCreate = MessagingOperationKey.String("create")
2732 // 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
2733 MessagingOperationReceive = MessagingOperationKey.String("receive")
2734 // One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs
2735 MessagingOperationDeliver = MessagingOperationKey.String("deliver")
2736 )
2737
2738 var (
2739 // Clustering consumption model
2740 MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
2741 // Broadcasting consumption model
2742 MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
2743 )
2744
2745 var (
2746 // Normal message
2747 MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
2748 // FIFO message
2749 MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
2750 // Delay message
2751 MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
2752 // Transaction message
2753 MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
2754 )
2755
2756 var (
2757 // Apache ActiveMQ
2758 MessagingSystemActivemq = MessagingSystemKey.String("activemq")
2759 // Amazon Simple Queue Service (SQS)
2760 MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs")
2761 // Azure Event Grid
2762 MessagingSystemAzureEventgrid = MessagingSystemKey.String("azure_eventgrid")
2763 // Azure Event Hubs
2764 MessagingSystemAzureEventhubs = MessagingSystemKey.String("azure_eventhubs")
2765 // Azure Service Bus
2766 MessagingSystemAzureServicebus = MessagingSystemKey.String("azure_servicebus")
2767 // Google Cloud Pub/Sub
2768 MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub")
2769 // Java Message Service
2770 MessagingSystemJms = MessagingSystemKey.String("jms")
2771 // Apache Kafka
2772 MessagingSystemKafka = MessagingSystemKey.String("kafka")
2773 // RabbitMQ
2774 MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq")
2775 // Apache RocketMQ
2776 MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq")
2777 )
2778
2779 // MessagingBatchMessageCount returns an attribute KeyValue conforming to
2780 // the "messaging.batch.message_count" semantic conventions. It represents the
2781 // number of messages sent, received, or processed in the scope of the batching
2782 // operation.
2783 func MessagingBatchMessageCount(val int) attribute.KeyValue {
2784 return MessagingBatchMessageCountKey.Int(val)
2785 }
2786
2787 // MessagingClientID returns an attribute KeyValue conforming to the
2788 // "messaging.client_id" semantic conventions. It represents a unique
2789 // identifier for the client that consumes or produces a message.
2790 func MessagingClientID(val string) attribute.KeyValue {
2791 return MessagingClientIDKey.String(val)
2792 }
2793
2794 // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
2795 // the "messaging.destination.anonymous" semantic conventions. It represents a
2796 // boolean that is true if the message destination is anonymous (could be
2797 // unnamed or have auto-generated name).
2798 func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
2799 return MessagingDestinationAnonymousKey.Bool(val)
2800 }
2801
2802 // MessagingDestinationName returns an attribute KeyValue conforming to the
2803 // "messaging.destination.name" semantic conventions. It represents the message
2804 // destination name
2805 func MessagingDestinationName(val string) attribute.KeyValue {
2806 return MessagingDestinationNameKey.String(val)
2807 }
2808
2809 // MessagingDestinationTemplate returns an attribute KeyValue conforming to
2810 // the "messaging.destination.template" semantic conventions. It represents the
2811 // low cardinality representation of the messaging destination name
2812 func MessagingDestinationTemplate(val string) attribute.KeyValue {
2813 return MessagingDestinationTemplateKey.String(val)
2814 }
2815
2816 // MessagingDestinationTemporary returns an attribute KeyValue conforming to
2817 // the "messaging.destination.temporary" semantic conventions. It represents a
2818 // boolean that is true if the message destination is temporary and might not
2819 // exist anymore after messages are processed.
2820 func MessagingDestinationTemporary(val bool) attribute.KeyValue {
2821 return MessagingDestinationTemporaryKey.Bool(val)
2822 }
2823
2824 // MessagingDestinationPublishAnonymous returns an attribute KeyValue
2825 // conforming to the "messaging.destination_publish.anonymous" semantic
2826 // conventions. It represents a boolean that is true if the publish message
2827 // destination is anonymous (could be unnamed or have auto-generated name).
2828 func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
2829 return MessagingDestinationPublishAnonymousKey.Bool(val)
2830 }
2831
2832 // MessagingDestinationPublishName returns an attribute KeyValue conforming
2833 // to the "messaging.destination_publish.name" semantic conventions. It
2834 // represents the name of the original destination the message was published to
2835 func MessagingDestinationPublishName(val string) attribute.KeyValue {
2836 return MessagingDestinationPublishNameKey.String(val)
2837 }
2838
2839 // MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue
2840 // conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic
2841 // conventions. It represents the ordering key for a given message. If the
2842 // attribute is not present, the message does not have an ordering key.
2843 func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue {
2844 return MessagingGCPPubsubMessageOrderingKeyKey.String(val)
2845 }
2846
2847 // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
2848 // the "messaging.kafka.consumer.group" semantic conventions. It represents the
2849 // name of the Kafka Consumer Group that is handling the message. Only applies
2850 // to consumers, not producers.
2851 func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
2852 return MessagingKafkaConsumerGroupKey.String(val)
2853 }
2854
2855 // MessagingKafkaDestinationPartition returns an attribute KeyValue
2856 // conforming to the "messaging.kafka.destination.partition" semantic
2857 // conventions. It represents the partition the message is sent to.
2858 func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
2859 return MessagingKafkaDestinationPartitionKey.Int(val)
2860 }
2861
2862 // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
2863 // "messaging.kafka.message.key" semantic conventions. It represents the
2864 // message keys in Kafka are used for grouping alike messages to ensure they're
2865 // processed on the same partition. They differ from `messaging.message.id` in
2866 // that they're not unique. If the key is `null`, the attribute MUST NOT be
2867 // set.
2868 func MessagingKafkaMessageKey(val string) attribute.KeyValue {
2869 return MessagingKafkaMessageKeyKey.String(val)
2870 }
2871
2872 // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
2873 // the "messaging.kafka.message.offset" semantic conventions. It represents the
2874 // offset of a record in the corresponding Kafka partition.
2875 func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
2876 return MessagingKafkaMessageOffsetKey.Int(val)
2877 }
2878
2879 // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
2880 // to the "messaging.kafka.message.tombstone" semantic conventions. It
2881 // represents a boolean that is true if the message is a tombstone.
2882 func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
2883 return MessagingKafkaMessageTombstoneKey.Bool(val)
2884 }
2885
2886 // MessagingMessageBodySize returns an attribute KeyValue conforming to the
2887 // "messaging.message.body.size" semantic conventions. It represents the size
2888 // of the message body in bytes.
2889 func MessagingMessageBodySize(val int) attribute.KeyValue {
2890 return MessagingMessageBodySizeKey.Int(val)
2891 }
2892
2893 // MessagingMessageConversationID returns an attribute KeyValue conforming
2894 // to the "messaging.message.conversation_id" semantic conventions. It
2895 // represents the conversation ID identifying the conversation to which the
2896 // message belongs, represented as a string. Sometimes called "Correlation ID".
2897 func MessagingMessageConversationID(val string) attribute.KeyValue {
2898 return MessagingMessageConversationIDKey.String(val)
2899 }
2900
2901 // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
2902 // the "messaging.message.envelope.size" semantic conventions. It represents
2903 // the size of the message body and metadata in bytes.
2904 func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
2905 return MessagingMessageEnvelopeSizeKey.Int(val)
2906 }
2907
2908 // MessagingMessageID returns an attribute KeyValue conforming to the
2909 // "messaging.message.id" semantic conventions. It represents a value used by
2910 // the messaging system as an identifier for the message, represented as a
2911 // string.
2912 func MessagingMessageID(val string) attribute.KeyValue {
2913 return MessagingMessageIDKey.String(val)
2914 }
2915
2916 // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
2917 // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
2918 // conventions. It represents the rabbitMQ message routing key.
2919 func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
2920 return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
2921 }
2922
2923 // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
2924 // the "messaging.rocketmq.client_group" semantic conventions. It represents
2925 // the name of the RocketMQ producer/consumer group that is handling the
2926 // message. The client type is identified by the SpanKind.
2927 func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
2928 return MessagingRocketmqClientGroupKey.String(val)
2929 }
2930
2931 // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
2932 // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
2933 // conventions. It represents the delay time level for delay message, which
2934 // determines the message delay time.
2935 func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
2936 return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
2937 }
2938
2939 // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
2940 // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
2941 // conventions. It represents the timestamp in milliseconds that the delay
2942 // message is expected to be delivered to consumer.
2943 func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
2944 return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
2945 }
2946
2947 // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
2948 // the "messaging.rocketmq.message.group" semantic conventions. It represents
2949 // the it is essential for FIFO message. Messages that belong to the same
2950 // message group are always processed one by one within the same consumer
2951 // group.
2952 func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
2953 return MessagingRocketmqMessageGroupKey.String(val)
2954 }
2955
2956 // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
2957 // the "messaging.rocketmq.message.keys" semantic conventions. It represents
2958 // the key(s) of message, another way to mark message besides message id.
2959 func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
2960 return MessagingRocketmqMessageKeysKey.StringSlice(val)
2961 }
2962
2963 // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
2964 // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
2965 // secondary classifier of message besides topic.
2966 func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
2967 return MessagingRocketmqMessageTagKey.String(val)
2968 }
2969
2970 // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
2971 // the "messaging.rocketmq.namespace" semantic conventions. It represents the
2972 // namespace of RocketMQ resources, resources in different namespaces are
2973 // individual.
2974 func MessagingRocketmqNamespace(val string) attribute.KeyValue {
2975 return MessagingRocketmqNamespaceKey.String(val)
2976 }
2977
2978 // These attributes may be used for any network related operation.
2979 const (
2980 // NetworkCarrierIccKey is the attribute Key conforming to the
2981 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
2982 // alpha-2 2-character country code associated with the mobile carrier
2983 // network.
2984 //
2985 // Type: string
2986 // RequirementLevel: Optional
2987 // Stability: experimental
2988 // Examples: 'DE'
2989 NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
2990
2991 // NetworkCarrierMccKey is the attribute Key conforming to the
2992 // "network.carrier.mcc" semantic conventions. It represents the mobile
2993 // carrier country code.
2994 //
2995 // Type: string
2996 // RequirementLevel: Optional
2997 // Stability: experimental
2998 // Examples: '310'
2999 NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
3000
3001 // NetworkCarrierMncKey is the attribute Key conforming to the
3002 // "network.carrier.mnc" semantic conventions. It represents the mobile
3003 // carrier network code.
3004 //
3005 // Type: string
3006 // RequirementLevel: Optional
3007 // Stability: experimental
3008 // Examples: '001'
3009 NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
3010
3011 // NetworkCarrierNameKey is the attribute Key conforming to the
3012 // "network.carrier.name" semantic conventions. It represents the name of
3013 // the mobile carrier.
3014 //
3015 // Type: string
3016 // RequirementLevel: Optional
3017 // Stability: experimental
3018 // Examples: 'sprint'
3019 NetworkCarrierNameKey = attribute.Key("network.carrier.name")
3020
3021 // NetworkConnectionSubtypeKey is the attribute Key conforming to the
3022 // "network.connection.subtype" semantic conventions. It represents the
3023 // this describes more details regarding the connection.type. It may be the
3024 // type of cell technology connection, but it could be used for describing
3025 // details about a wifi connection.
3026 //
3027 // Type: Enum
3028 // RequirementLevel: Optional
3029 // Stability: experimental
3030 // Examples: 'LTE'
3031 NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
3032
3033 // NetworkConnectionTypeKey is the attribute Key conforming to the
3034 // "network.connection.type" semantic conventions. It represents the
3035 // internet connection type.
3036 //
3037 // Type: Enum
3038 // RequirementLevel: Optional
3039 // Stability: experimental
3040 // Examples: 'wifi'
3041 NetworkConnectionTypeKey = attribute.Key("network.connection.type")
3042
3043 // NetworkIoDirectionKey is the attribute Key conforming to the
3044 // "network.io.direction" semantic conventions. It represents the network
3045 // IO operation direction.
3046 //
3047 // Type: Enum
3048 // RequirementLevel: Optional
3049 // Stability: experimental
3050 // Examples: 'transmit'
3051 NetworkIoDirectionKey = attribute.Key("network.io.direction")
3052
3053 // NetworkLocalAddressKey is the attribute Key conforming to the
3054 // "network.local.address" semantic conventions. It represents the local
3055 // address of the network connection - IP address or Unix domain socket
3056 // name.
3057 //
3058 // Type: string
3059 // RequirementLevel: Optional
3060 // Stability: stable
3061 // Examples: '10.1.2.80', '/tmp/my.sock'
3062 NetworkLocalAddressKey = attribute.Key("network.local.address")
3063
3064 // NetworkLocalPortKey is the attribute Key conforming to the
3065 // "network.local.port" semantic conventions. It represents the local port
3066 // number of the network connection.
3067 //
3068 // Type: int
3069 // RequirementLevel: Optional
3070 // Stability: stable
3071 // Examples: 65123
3072 NetworkLocalPortKey = attribute.Key("network.local.port")
3073
3074 // NetworkPeerAddressKey is the attribute Key conforming to the
3075 // "network.peer.address" semantic conventions. It represents the peer
3076 // address of the network connection - IP address or Unix domain socket
3077 // name.
3078 //
3079 // Type: string
3080 // RequirementLevel: Optional
3081 // Stability: stable
3082 // Examples: '10.1.2.80', '/tmp/my.sock'
3083 NetworkPeerAddressKey = attribute.Key("network.peer.address")
3084
3085 // NetworkPeerPortKey is the attribute Key conforming to the
3086 // "network.peer.port" semantic conventions. It represents the peer port
3087 // number of the network connection.
3088 //
3089 // Type: int
3090 // RequirementLevel: Optional
3091 // Stability: stable
3092 // Examples: 65123
3093 NetworkPeerPortKey = attribute.Key("network.peer.port")
3094
3095 // NetworkProtocolNameKey is the attribute Key conforming to the
3096 // "network.protocol.name" semantic conventions. It represents the [OSI
3097 // application layer](https://osi-model.com/application-layer/) or non-OSI
3098 // equivalent.
3099 //
3100 // Type: string
3101 // RequirementLevel: Optional
3102 // Stability: stable
3103 // Examples: 'amqp', 'http', 'mqtt'
3104 // Note: The value SHOULD be normalized to lowercase.
3105 NetworkProtocolNameKey = attribute.Key("network.protocol.name")
3106
3107 // NetworkProtocolVersionKey is the attribute Key conforming to the
3108 // "network.protocol.version" semantic conventions. It represents the
3109 // version of the protocol specified in `network.protocol.name`.
3110 //
3111 // Type: string
3112 // RequirementLevel: Optional
3113 // Stability: stable
3114 // Examples: '3.1.1'
3115 // Note: `network.protocol.version` refers to the version of the protocol
3116 // used and might be different from the protocol client's version. If the
3117 // HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`,
3118 // this attribute should be set to `1.1`.
3119 NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
3120
3121 // NetworkTransportKey is the attribute Key conforming to the
3122 // "network.transport" semantic conventions. It represents the [OSI
3123 // transport layer](https://osi-model.com/transport-layer/) or
3124 // [inter-process communication
3125 // method](https://wikipedia.org/wiki/Inter-process_communication).
3126 //
3127 // Type: Enum
3128 // RequirementLevel: Optional
3129 // Stability: stable
3130 // Examples: 'tcp', 'udp'
3131 // Note: The value SHOULD be normalized to lowercase.
3132 //
3133 // Consider always setting the transport when setting a port number, since
3134 // a port number is ambiguous without knowing the transport. For example
3135 // different processes could be listening on TCP port 12345 and UDP port
3136 // 12345.
3137 NetworkTransportKey = attribute.Key("network.transport")
3138
3139 // NetworkTypeKey is the attribute Key conforming to the "network.type"
3140 // semantic conventions. It represents the [OSI network
3141 // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
3142 //
3143 // Type: Enum
3144 // RequirementLevel: Optional
3145 // Stability: stable
3146 // Examples: 'ipv4', 'ipv6'
3147 // Note: The value SHOULD be normalized to lowercase.
3148 NetworkTypeKey = attribute.Key("network.type")
3149 )
3150
3151 var (
3152 // GPRS
3153 NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
3154 // EDGE
3155 NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
3156 // UMTS
3157 NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
3158 // CDMA
3159 NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
3160 // EVDO Rel. 0
3161 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
3162 // EVDO Rev. A
3163 NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
3164 // CDMA2000 1XRTT
3165 NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
3166 // HSDPA
3167 NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
3168 // HSUPA
3169 NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
3170 // HSPA
3171 NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
3172 // IDEN
3173 NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
3174 // EVDO Rev. B
3175 NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
3176 // LTE
3177 NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
3178 // EHRPD
3179 NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
3180 // HSPAP
3181 NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
3182 // GSM
3183 NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
3184 // TD-SCDMA
3185 NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
3186 // IWLAN
3187 NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
3188 // 5G NR (New Radio)
3189 NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
3190 // 5G NRNSA (New Radio Non-Standalone)
3191 NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
3192 // LTE CA
3193 NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
3194 )
3195
3196 var (
3197 // wifi
3198 NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
3199 // wired
3200 NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
3201 // cell
3202 NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
3203 // unavailable
3204 NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
3205 // unknown
3206 NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
3207 )
3208
3209 var (
3210 // transmit
3211 NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit")
3212 // receive
3213 NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive")
3214 )
3215
3216 var (
3217 // TCP
3218 NetworkTransportTCP = NetworkTransportKey.String("tcp")
3219 // UDP
3220 NetworkTransportUDP = NetworkTransportKey.String("udp")
3221 // Named or anonymous pipe
3222 NetworkTransportPipe = NetworkTransportKey.String("pipe")
3223 // Unix domain socket
3224 NetworkTransportUnix = NetworkTransportKey.String("unix")
3225 )
3226
3227 var (
3228 // IPv4
3229 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
3230 // IPv6
3231 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
3232 )
3233
3234 // NetworkCarrierIcc returns an attribute KeyValue conforming to the
3235 // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
3236 // alpha-2 2-character country code associated with the mobile carrier network.
3237 func NetworkCarrierIcc(val string) attribute.KeyValue {
3238 return NetworkCarrierIccKey.String(val)
3239 }
3240
3241 // NetworkCarrierMcc returns an attribute KeyValue conforming to the
3242 // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
3243 // country code.
3244 func NetworkCarrierMcc(val string) attribute.KeyValue {
3245 return NetworkCarrierMccKey.String(val)
3246 }
3247
3248 // NetworkCarrierMnc returns an attribute KeyValue conforming to the
3249 // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
3250 // network code.
3251 func NetworkCarrierMnc(val string) attribute.KeyValue {
3252 return NetworkCarrierMncKey.String(val)
3253 }
3254
3255 // NetworkCarrierName returns an attribute KeyValue conforming to the
3256 // "network.carrier.name" semantic conventions. It represents the name of the
3257 // mobile carrier.
3258 func NetworkCarrierName(val string) attribute.KeyValue {
3259 return NetworkCarrierNameKey.String(val)
3260 }
3261
3262 // NetworkLocalAddress returns an attribute KeyValue conforming to the
3263 // "network.local.address" semantic conventions. It represents the local
3264 // address of the network connection - IP address or Unix domain socket name.
3265 func NetworkLocalAddress(val string) attribute.KeyValue {
3266 return NetworkLocalAddressKey.String(val)
3267 }
3268
3269 // NetworkLocalPort returns an attribute KeyValue conforming to the
3270 // "network.local.port" semantic conventions. It represents the local port
3271 // number of the network connection.
3272 func NetworkLocalPort(val int) attribute.KeyValue {
3273 return NetworkLocalPortKey.Int(val)
3274 }
3275
3276 // NetworkPeerAddress returns an attribute KeyValue conforming to the
3277 // "network.peer.address" semantic conventions. It represents the peer address
3278 // of the network connection - IP address or Unix domain socket name.
3279 func NetworkPeerAddress(val string) attribute.KeyValue {
3280 return NetworkPeerAddressKey.String(val)
3281 }
3282
3283 // NetworkPeerPort returns an attribute KeyValue conforming to the
3284 // "network.peer.port" semantic conventions. It represents the peer port number
3285 // of the network connection.
3286 func NetworkPeerPort(val int) attribute.KeyValue {
3287 return NetworkPeerPortKey.Int(val)
3288 }
3289
3290 // NetworkProtocolName returns an attribute KeyValue conforming to the
3291 // "network.protocol.name" semantic conventions. It represents the [OSI
3292 // application layer](https://osi-model.com/application-layer/) or non-OSI
3293 // equivalent.
3294 func NetworkProtocolName(val string) attribute.KeyValue {
3295 return NetworkProtocolNameKey.String(val)
3296 }
3297
3298 // NetworkProtocolVersion returns an attribute KeyValue conforming to the
3299 // "network.protocol.version" semantic conventions. It represents the version
3300 // of the protocol specified in `network.protocol.name`.
3301 func NetworkProtocolVersion(val string) attribute.KeyValue {
3302 return NetworkProtocolVersionKey.String(val)
3303 }
3304
3305 // Attributes for remote procedure calls.
3306 const (
3307 // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
3308 // "rpc.connect_rpc.error_code" semantic conventions. It represents the
3309 // [error codes](https://connect.build/docs/protocol/#error-codes) of the
3310 // Connect request. Error codes are always string values.
3311 //
3312 // Type: Enum
3313 // RequirementLevel: Optional
3314 // Stability: experimental
3315 RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
3316
3317 // RPCGRPCStatusCodeKey is the attribute Key conforming to the
3318 // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
3319 // status
3320 // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
3321 // the gRPC request.
3322 //
3323 // Type: Enum
3324 // RequirementLevel: Optional
3325 // Stability: experimental
3326 RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
3327
3328 // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
3329 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
3330 // `error.code` property of response if it is an error response.
3331 //
3332 // Type: int
3333 // RequirementLevel: Optional
3334 // Stability: experimental
3335 // Examples: -32700, 100
3336 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
3337
3338 // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
3339 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
3340 // `error.message` property of response if it is an error response.
3341 //
3342 // Type: string
3343 // RequirementLevel: Optional
3344 // Stability: experimental
3345 // Examples: 'Parse error', 'User already exists'
3346 RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
3347
3348 // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
3349 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
3350 // property of request or response. Since protocol allows id to be int,
3351 // string, `null` or missing (for notifications), value is expected to be
3352 // cast to string for simplicity. Use empty string in case of `null` value.
3353 // Omit entirely if this is a notification.
3354 //
3355 // Type: string
3356 // RequirementLevel: Optional
3357 // Stability: experimental
3358 // Examples: '10', 'request-7', ''
3359 RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
3360
3361 // RPCJsonrpcVersionKey is the attribute Key conforming to the
3362 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
3363 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
3364 // doesn't specify this, the value can be omitted.
3365 //
3366 // Type: string
3367 // RequirementLevel: Optional
3368 // Stability: experimental
3369 // Examples: '2.0', '1.0'
3370 RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
3371
3372 // RPCMethodKey is the attribute Key conforming to the "rpc.method"
3373 // semantic conventions. It represents the name of the (logical) method
3374 // being called, must be equal to the $method part in the span name.
3375 //
3376 // Type: string
3377 // RequirementLevel: Optional
3378 // Stability: experimental
3379 // Examples: 'exampleMethod'
3380 // Note: This is the logical name of the method from the RPC interface
3381 // perspective, which can be different from the name of any implementing
3382 // method/function. The `code.function` attribute may be used to store the
3383 // latter (e.g., method actually executing the call on the server side, RPC
3384 // client stub method on the client side).
3385 RPCMethodKey = attribute.Key("rpc.method")
3386
3387 // RPCServiceKey is the attribute Key conforming to the "rpc.service"
3388 // semantic conventions. It represents the full (logical) name of the
3389 // service being called, including its package name, if applicable.
3390 //
3391 // Type: string
3392 // RequirementLevel: Optional
3393 // Stability: experimental
3394 // Examples: 'myservice.EchoService'
3395 // Note: This is the logical name of the service from the RPC interface
3396 // perspective, which can be different from the name of any implementing
3397 // class. The `code.namespace` attribute may be used to store the latter
3398 // (despite the attribute name, it may include a class name; e.g., class
3399 // with method actually executing the call on the server side, RPC client
3400 // stub class on the client side).
3401 RPCServiceKey = attribute.Key("rpc.service")
3402
3403 // RPCSystemKey is the attribute Key conforming to the "rpc.system"
3404 // semantic conventions. It represents a string identifying the remoting
3405 // system. See below for a list of well-known identifiers.
3406 //
3407 // Type: Enum
3408 // RequirementLevel: Optional
3409 // Stability: experimental
3410 RPCSystemKey = attribute.Key("rpc.system")
3411 )
3412
3413 var (
3414 // cancelled
3415 RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
3416 // unknown
3417 RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
3418 // invalid_argument
3419 RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
3420 // deadline_exceeded
3421 RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
3422 // not_found
3423 RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
3424 // already_exists
3425 RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
3426 // permission_denied
3427 RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
3428 // resource_exhausted
3429 RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
3430 // failed_precondition
3431 RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
3432 // aborted
3433 RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
3434 // out_of_range
3435 RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
3436 // unimplemented
3437 RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
3438 // internal
3439 RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
3440 // unavailable
3441 RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
3442 // data_loss
3443 RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
3444 // unauthenticated
3445 RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
3446 )
3447
3448 var (
3449 // OK
3450 RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
3451 // CANCELLED
3452 RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
3453 // UNKNOWN
3454 RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
3455 // INVALID_ARGUMENT
3456 RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
3457 // DEADLINE_EXCEEDED
3458 RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
3459 // NOT_FOUND
3460 RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
3461 // ALREADY_EXISTS
3462 RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
3463 // PERMISSION_DENIED
3464 RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
3465 // RESOURCE_EXHAUSTED
3466 RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
3467 // FAILED_PRECONDITION
3468 RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
3469 // ABORTED
3470 RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
3471 // OUT_OF_RANGE
3472 RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
3473 // UNIMPLEMENTED
3474 RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
3475 // INTERNAL
3476 RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
3477 // UNAVAILABLE
3478 RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
3479 // DATA_LOSS
3480 RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
3481 // UNAUTHENTICATED
3482 RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
3483 )
3484
3485 var (
3486 // gRPC
3487 RPCSystemGRPC = RPCSystemKey.String("grpc")
3488 // Java RMI
3489 RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
3490 // .NET WCF
3491 RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
3492 // Apache Dubbo
3493 RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
3494 // Connect RPC
3495 RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
3496 )
3497
3498 // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
3499 // "rpc.jsonrpc.error_code" semantic conventions. It represents the
3500 // `error.code` property of response if it is an error response.
3501 func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
3502 return RPCJsonrpcErrorCodeKey.Int(val)
3503 }
3504
3505 // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
3506 // "rpc.jsonrpc.error_message" semantic conventions. It represents the
3507 // `error.message` property of response if it is an error response.
3508 func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
3509 return RPCJsonrpcErrorMessageKey.String(val)
3510 }
3511
3512 // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
3513 // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
3514 // property of request or response. Since protocol allows id to be int, string,
3515 // `null` or missing (for notifications), value is expected to be cast to
3516 // string for simplicity. Use empty string in case of `null` value. Omit
3517 // entirely if this is a notification.
3518 func RPCJsonrpcRequestID(val string) attribute.KeyValue {
3519 return RPCJsonrpcRequestIDKey.String(val)
3520 }
3521
3522 // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
3523 // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
3524 // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
3525 // doesn't specify this, the value can be omitted.
3526 func RPCJsonrpcVersion(val string) attribute.KeyValue {
3527 return RPCJsonrpcVersionKey.String(val)
3528 }
3529
3530 // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
3531 // semantic conventions. It represents the name of the (logical) method being
3532 // called, must be equal to the $method part in the span name.
3533 func RPCMethod(val string) attribute.KeyValue {
3534 return RPCMethodKey.String(val)
3535 }
3536
3537 // RPCService returns an attribute KeyValue conforming to the "rpc.service"
3538 // semantic conventions. It represents the full (logical) name of the service
3539 // being called, including its package name, if applicable.
3540 func RPCService(val string) attribute.KeyValue {
3541 return RPCServiceKey.String(val)
3542 }
3543
3544 // These attributes may be used to describe the server in a connection-based
3545 // network interaction where there is one side that initiates the connection
3546 // (the client is the side that initiates the connection). This covers all TCP
3547 // network interactions since TCP is connection-based and one side initiates
3548 // the connection (an exception is made for peer-to-peer communication over TCP
3549 // where the "user-facing" surface of the protocol / API doesn't expose a clear
3550 // notion of client and server). This also covers UDP network interactions
3551 // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
3552 const (
3553 // ServerAddressKey is the attribute Key conforming to the "server.address"
3554 // semantic conventions. It represents the server domain name if available
3555 // without reverse DNS lookup; otherwise, IP address or Unix domain socket
3556 // name.
3557 //
3558 // Type: string
3559 // RequirementLevel: Optional
3560 // Stability: stable
3561 // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
3562 // Note: When observed from the client side, and when communicating through
3563 // an intermediary, `server.address` SHOULD represent the server address
3564 // behind any intermediaries, for example proxies, if it's available.
3565 ServerAddressKey = attribute.Key("server.address")
3566
3567 // ServerPortKey is the attribute Key conforming to the "server.port"
3568 // semantic conventions. It represents the server port number.
3569 //
3570 // Type: int
3571 // RequirementLevel: Optional
3572 // Stability: stable
3573 // Examples: 80, 8080, 443
3574 // Note: When observed from the client side, and when communicating through
3575 // an intermediary, `server.port` SHOULD represent the server port behind
3576 // any intermediaries, for example proxies, if it's available.
3577 ServerPortKey = attribute.Key("server.port")
3578 )
3579
3580 // ServerAddress returns an attribute KeyValue conforming to the
3581 // "server.address" semantic conventions. It represents the server domain name
3582 // if available without reverse DNS lookup; otherwise, IP address or Unix
3583 // domain socket name.
3584 func ServerAddress(val string) attribute.KeyValue {
3585 return ServerAddressKey.String(val)
3586 }
3587
3588 // ServerPort returns an attribute KeyValue conforming to the "server.port"
3589 // semantic conventions. It represents the server port number.
3590 func ServerPort(val int) attribute.KeyValue {
3591 return ServerPortKey.Int(val)
3592 }
3593
3594 // These attributes may be used to describe the sender of a network
3595 // exchange/packet. These should be used when there is no client/server
3596 // relationship between the two sides, or when that relationship is unknown.
3597 // This covers low-level network interactions (e.g. packet tracing) where you
3598 // don't know if there was a connection or which side initiated it. This also
3599 // covers unidirectional UDP flows and peer-to-peer communication where the
3600 // "user-facing" surface of the protocol / API doesn't expose a clear notion of
3601 // client and server.
3602 const (
3603 // SourceAddressKey is the attribute Key conforming to the "source.address"
3604 // semantic conventions. It represents the source address - domain name if
3605 // available without reverse DNS lookup; otherwise, IP address or Unix
3606 // domain socket name.
3607 //
3608 // Type: string
3609 // RequirementLevel: Optional
3610 // Stability: experimental
3611 // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
3612 // Note: When observed from the destination side, and when communicating
3613 // through an intermediary, `source.address` SHOULD represent the source
3614 // address behind any intermediaries, for example proxies, if it's
3615 // available.
3616 SourceAddressKey = attribute.Key("source.address")
3617
3618 // SourcePortKey is the attribute Key conforming to the "source.port"
3619 // semantic conventions. It represents the source port number
3620 //
3621 // Type: int
3622 // RequirementLevel: Optional
3623 // Stability: experimental
3624 // Examples: 3389, 2888
3625 SourcePortKey = attribute.Key("source.port")
3626 )
3627
3628 // SourceAddress returns an attribute KeyValue conforming to the
3629 // "source.address" semantic conventions. It represents the source address -
3630 // domain name if available without reverse DNS lookup; otherwise, IP address
3631 // or Unix domain socket name.
3632 func SourceAddress(val string) attribute.KeyValue {
3633 return SourceAddressKey.String(val)
3634 }
3635
3636 // SourcePort returns an attribute KeyValue conforming to the "source.port"
3637 // semantic conventions. It represents the source port number
3638 func SourcePort(val int) attribute.KeyValue {
3639 return SourcePortKey.Int(val)
3640 }
3641
3642 // Semantic convention attributes in the TLS namespace.
3643 const (
3644 // TLSCipherKey is the attribute Key conforming to the "tls.cipher"
3645 // semantic conventions. It represents the string indicating the
3646 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5)
3647 // used during the current connection.
3648 //
3649 // Type: string
3650 // RequirementLevel: Optional
3651 // Stability: experimental
3652 // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',
3653 // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
3654 // Note: The values allowed for `tls.cipher` MUST be one of the
3655 // `Descriptions` of the [registered TLS Cipher
3656 // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).
3657 TLSCipherKey = attribute.Key("tls.cipher")
3658
3659 // TLSClientCertificateKey is the attribute Key conforming to the
3660 // "tls.client.certificate" semantic conventions. It represents the
3661 // pEM-encoded stand-alone certificate offered by the client. This is
3662 // usually mutually-exclusive of `client.certificate_chain` since this
3663 // value also exists in that list.
3664 //
3665 // Type: string
3666 // RequirementLevel: Optional
3667 // Stability: experimental
3668 // Examples: 'MII...'
3669 TLSClientCertificateKey = attribute.Key("tls.client.certificate")
3670
3671 // TLSClientCertificateChainKey is the attribute Key conforming to the
3672 // "tls.client.certificate_chain" semantic conventions. It represents the
3673 // array of PEM-encoded certificates that make up the certificate chain
3674 // offered by the client. This is usually mutually-exclusive of
3675 // `client.certificate` since that value should be the first certificate in
3676 // the chain.
3677 //
3678 // Type: string[]
3679 // RequirementLevel: Optional
3680 // Stability: experimental
3681 // Examples: 'MII...', 'MI...'
3682 TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
3683
3684 // TLSClientHashMd5Key is the attribute Key conforming to the
3685 // "tls.client.hash.md5" semantic conventions. It represents the
3686 // certificate fingerprint using the MD5 digest of DER-encoded version of
3687 // certificate offered by the client. For consistency with other hash
3688 // values, this value should be formatted as an uppercase hash.
3689 //
3690 // Type: string
3691 // RequirementLevel: Optional
3692 // Stability: experimental
3693 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
3694 TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
3695
3696 // TLSClientHashSha1Key is the attribute Key conforming to the
3697 // "tls.client.hash.sha1" semantic conventions. It represents the
3698 // certificate fingerprint using the SHA1 digest of DER-encoded version of
3699 // certificate offered by the client. For consistency with other hash
3700 // values, this value should be formatted as an uppercase hash.
3701 //
3702 // Type: string
3703 // RequirementLevel: Optional
3704 // Stability: experimental
3705 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
3706 TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
3707
3708 // TLSClientHashSha256Key is the attribute Key conforming to the
3709 // "tls.client.hash.sha256" semantic conventions. It represents the
3710 // certificate fingerprint using the SHA256 digest of DER-encoded version
3711 // of certificate offered by the client. For consistency with other hash
3712 // values, this value should be formatted as an uppercase hash.
3713 //
3714 // Type: string
3715 // RequirementLevel: Optional
3716 // Stability: experimental
3717 // Examples:
3718 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
3719 TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
3720
3721 // TLSClientIssuerKey is the attribute Key conforming to the
3722 // "tls.client.issuer" semantic conventions. It represents the
3723 // distinguished name of
3724 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
3725 // of the issuer of the x.509 certificate presented by the client.
3726 //
3727 // Type: string
3728 // RequirementLevel: Optional
3729 // Stability: experimental
3730 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
3731 // DC=com'
3732 TLSClientIssuerKey = attribute.Key("tls.client.issuer")
3733
3734 // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
3735 // semantic conventions. It represents a hash that identifies clients based
3736 // on how they perform an SSL/TLS handshake.
3737 //
3738 // Type: string
3739 // RequirementLevel: Optional
3740 // Stability: experimental
3741 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
3742 TLSClientJa3Key = attribute.Key("tls.client.ja3")
3743
3744 // TLSClientNotAfterKey is the attribute Key conforming to the
3745 // "tls.client.not_after" semantic conventions. It represents the date/Time
3746 // indicating when client certificate is no longer considered valid.
3747 //
3748 // Type: string
3749 // RequirementLevel: Optional
3750 // Stability: experimental
3751 // Examples: '2021-01-01T00:00:00.000Z'
3752 TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
3753
3754 // TLSClientNotBeforeKey is the attribute Key conforming to the
3755 // "tls.client.not_before" semantic conventions. It represents the
3756 // date/Time indicating when client certificate is first considered valid.
3757 //
3758 // Type: string
3759 // RequirementLevel: Optional
3760 // Stability: experimental
3761 // Examples: '1970-01-01T00:00:00.000Z'
3762 TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
3763
3764 // TLSClientServerNameKey is the attribute Key conforming to the
3765 // "tls.client.server_name" semantic conventions. It represents the also
3766 // called an SNI, this tells the server which hostname to which the client
3767 // is attempting to connect to.
3768 //
3769 // Type: string
3770 // RequirementLevel: Optional
3771 // Stability: experimental
3772 // Examples: 'opentelemetry.io'
3773 TLSClientServerNameKey = attribute.Key("tls.client.server_name")
3774
3775 // TLSClientSubjectKey is the attribute Key conforming to the
3776 // "tls.client.subject" semantic conventions. It represents the
3777 // distinguished name of subject of the x.509 certificate presented by the
3778 // client.
3779 //
3780 // Type: string
3781 // RequirementLevel: Optional
3782 // Stability: experimental
3783 // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com'
3784 TLSClientSubjectKey = attribute.Key("tls.client.subject")
3785
3786 // TLSClientSupportedCiphersKey is the attribute Key conforming to the
3787 // "tls.client.supported_ciphers" semantic conventions. It represents the
3788 // array of ciphers offered by the client during the client hello.
3789 //
3790 // Type: string[]
3791 // RequirementLevel: Optional
3792 // Stability: experimental
3793 // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
3794 // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."'
3795 TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
3796
3797 // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
3798 // conventions. It represents the string indicating the curve used for the
3799 // given cipher, when applicable
3800 //
3801 // Type: string
3802 // RequirementLevel: Optional
3803 // Stability: experimental
3804 // Examples: 'secp256r1'
3805 TLSCurveKey = attribute.Key("tls.curve")
3806
3807 // TLSEstablishedKey is the attribute Key conforming to the
3808 // "tls.established" semantic conventions. It represents the boolean flag
3809 // indicating if the TLS negotiation was successful and transitioned to an
3810 // encrypted tunnel.
3811 //
3812 // Type: boolean
3813 // RequirementLevel: Optional
3814 // Stability: experimental
3815 // Examples: True
3816 TLSEstablishedKey = attribute.Key("tls.established")
3817
3818 // TLSNextProtocolKey is the attribute Key conforming to the
3819 // "tls.next_protocol" semantic conventions. It represents the string
3820 // indicating the protocol being tunneled. Per the values in the [IANA
3821 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
3822 // this string should be lower case.
3823 //
3824 // Type: string
3825 // RequirementLevel: Optional
3826 // Stability: experimental
3827 // Examples: 'http/1.1'
3828 TLSNextProtocolKey = attribute.Key("tls.next_protocol")
3829
3830 // TLSProtocolNameKey is the attribute Key conforming to the
3831 // "tls.protocol.name" semantic conventions. It represents the normalized
3832 // lowercase protocol name parsed from original string of the negotiated
3833 // [SSL/TLS protocol
3834 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
3835 //
3836 // Type: Enum
3837 // RequirementLevel: Optional
3838 // Stability: experimental
3839 TLSProtocolNameKey = attribute.Key("tls.protocol.name")
3840
3841 // TLSProtocolVersionKey is the attribute Key conforming to the
3842 // "tls.protocol.version" semantic conventions. It represents the numeric
3843 // part of the version parsed from the original string of the negotiated
3844 // [SSL/TLS protocol
3845 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
3846 //
3847 // Type: string
3848 // RequirementLevel: Optional
3849 // Stability: experimental
3850 // Examples: '1.2', '3'
3851 TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
3852
3853 // TLSResumedKey is the attribute Key conforming to the "tls.resumed"
3854 // semantic conventions. It represents the boolean flag indicating if this
3855 // TLS connection was resumed from an existing TLS negotiation.
3856 //
3857 // Type: boolean
3858 // RequirementLevel: Optional
3859 // Stability: experimental
3860 // Examples: True
3861 TLSResumedKey = attribute.Key("tls.resumed")
3862
3863 // TLSServerCertificateKey is the attribute Key conforming to the
3864 // "tls.server.certificate" semantic conventions. It represents the
3865 // pEM-encoded stand-alone certificate offered by the server. This is
3866 // usually mutually-exclusive of `server.certificate_chain` since this
3867 // value also exists in that list.
3868 //
3869 // Type: string
3870 // RequirementLevel: Optional
3871 // Stability: experimental
3872 // Examples: 'MII...'
3873 TLSServerCertificateKey = attribute.Key("tls.server.certificate")
3874
3875 // TLSServerCertificateChainKey is the attribute Key conforming to the
3876 // "tls.server.certificate_chain" semantic conventions. It represents the
3877 // array of PEM-encoded certificates that make up the certificate chain
3878 // offered by the server. This is usually mutually-exclusive of
3879 // `server.certificate` since that value should be the first certificate in
3880 // the chain.
3881 //
3882 // Type: string[]
3883 // RequirementLevel: Optional
3884 // Stability: experimental
3885 // Examples: 'MII...', 'MI...'
3886 TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
3887
3888 // TLSServerHashMd5Key is the attribute Key conforming to the
3889 // "tls.server.hash.md5" semantic conventions. It represents the
3890 // certificate fingerprint using the MD5 digest of DER-encoded version of
3891 // certificate offered by the server. For consistency with other hash
3892 // values, this value should be formatted as an uppercase hash.
3893 //
3894 // Type: string
3895 // RequirementLevel: Optional
3896 // Stability: experimental
3897 // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
3898 TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
3899
3900 // TLSServerHashSha1Key is the attribute Key conforming to the
3901 // "tls.server.hash.sha1" semantic conventions. It represents the
3902 // certificate fingerprint using the SHA1 digest of DER-encoded version of
3903 // certificate offered by the server. For consistency with other hash
3904 // values, this value should be formatted as an uppercase hash.
3905 //
3906 // Type: string
3907 // RequirementLevel: Optional
3908 // Stability: experimental
3909 // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
3910 TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
3911
3912 // TLSServerHashSha256Key is the attribute Key conforming to the
3913 // "tls.server.hash.sha256" semantic conventions. It represents the
3914 // certificate fingerprint using the SHA256 digest of DER-encoded version
3915 // of certificate offered by the server. For consistency with other hash
3916 // values, this value should be formatted as an uppercase hash.
3917 //
3918 // Type: string
3919 // RequirementLevel: Optional
3920 // Stability: experimental
3921 // Examples:
3922 // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
3923 TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
3924
3925 // TLSServerIssuerKey is the attribute Key conforming to the
3926 // "tls.server.issuer" semantic conventions. It represents the
3927 // distinguished name of
3928 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
3929 // of the issuer of the x.509 certificate presented by the client.
3930 //
3931 // Type: string
3932 // RequirementLevel: Optional
3933 // Stability: experimental
3934 // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
3935 // DC=com'
3936 TLSServerIssuerKey = attribute.Key("tls.server.issuer")
3937
3938 // TLSServerJa3sKey is the attribute Key conforming to the
3939 // "tls.server.ja3s" semantic conventions. It represents a hash that
3940 // identifies servers based on how they perform an SSL/TLS handshake.
3941 //
3942 // Type: string
3943 // RequirementLevel: Optional
3944 // Stability: experimental
3945 // Examples: 'd4e5b18d6b55c71272893221c96ba240'
3946 TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
3947
3948 // TLSServerNotAfterKey is the attribute Key conforming to the
3949 // "tls.server.not_after" semantic conventions. It represents the date/Time
3950 // indicating when server certificate is no longer considered valid.
3951 //
3952 // Type: string
3953 // RequirementLevel: Optional
3954 // Stability: experimental
3955 // Examples: '2021-01-01T00:00:00.000Z'
3956 TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
3957
3958 // TLSServerNotBeforeKey is the attribute Key conforming to the
3959 // "tls.server.not_before" semantic conventions. It represents the
3960 // date/Time indicating when server certificate is first considered valid.
3961 //
3962 // Type: string
3963 // RequirementLevel: Optional
3964 // Stability: experimental
3965 // Examples: '1970-01-01T00:00:00.000Z'
3966 TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
3967
3968 // TLSServerSubjectKey is the attribute Key conforming to the
3969 // "tls.server.subject" semantic conventions. It represents the
3970 // distinguished name of subject of the x.509 certificate presented by the
3971 // server.
3972 //
3973 // Type: string
3974 // RequirementLevel: Optional
3975 // Stability: experimental
3976 // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com'
3977 TLSServerSubjectKey = attribute.Key("tls.server.subject")
3978 )
3979
3980 var (
3981 // ssl
3982 TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
3983 // tls
3984 TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
3985 )
3986
3987 // TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
3988 // semantic conventions. It represents the string indicating the
3989 // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used
3990 // during the current connection.
3991 func TLSCipher(val string) attribute.KeyValue {
3992 return TLSCipherKey.String(val)
3993 }
3994
3995 // TLSClientCertificate returns an attribute KeyValue conforming to the
3996 // "tls.client.certificate" semantic conventions. It represents the pEM-encoded
3997 // stand-alone certificate offered by the client. This is usually
3998 // mutually-exclusive of `client.certificate_chain` since this value also
3999 // exists in that list.
4000 func TLSClientCertificate(val string) attribute.KeyValue {
4001 return TLSClientCertificateKey.String(val)
4002 }
4003
4004 // TLSClientCertificateChain returns an attribute KeyValue conforming to the
4005 // "tls.client.certificate_chain" semantic conventions. It represents the array
4006 // of PEM-encoded certificates that make up the certificate chain offered by
4007 // the client. This is usually mutually-exclusive of `client.certificate` since
4008 // that value should be the first certificate in the chain.
4009 func TLSClientCertificateChain(val ...string) attribute.KeyValue {
4010 return TLSClientCertificateChainKey.StringSlice(val)
4011 }
4012
4013 // TLSClientHashMd5 returns an attribute KeyValue conforming to the
4014 // "tls.client.hash.md5" semantic conventions. It represents the certificate
4015 // fingerprint using the MD5 digest of DER-encoded version of certificate
4016 // offered by the client. For consistency with other hash values, this value
4017 // should be formatted as an uppercase hash.
4018 func TLSClientHashMd5(val string) attribute.KeyValue {
4019 return TLSClientHashMd5Key.String(val)
4020 }
4021
4022 // TLSClientHashSha1 returns an attribute KeyValue conforming to the
4023 // "tls.client.hash.sha1" semantic conventions. It represents the certificate
4024 // fingerprint using the SHA1 digest of DER-encoded version of certificate
4025 // offered by the client. For consistency with other hash values, this value
4026 // should be formatted as an uppercase hash.
4027 func TLSClientHashSha1(val string) attribute.KeyValue {
4028 return TLSClientHashSha1Key.String(val)
4029 }
4030
4031 // TLSClientHashSha256 returns an attribute KeyValue conforming to the
4032 // "tls.client.hash.sha256" semantic conventions. It represents the certificate
4033 // fingerprint using the SHA256 digest of DER-encoded version of certificate
4034 // offered by the client. For consistency with other hash values, this value
4035 // should be formatted as an uppercase hash.
4036 func TLSClientHashSha256(val string) attribute.KeyValue {
4037 return TLSClientHashSha256Key.String(val)
4038 }
4039
4040 // TLSClientIssuer returns an attribute KeyValue conforming to the
4041 // "tls.client.issuer" semantic conventions. It represents the distinguished
4042 // name of
4043 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
4044 // the issuer of the x.509 certificate presented by the client.
4045 func TLSClientIssuer(val string) attribute.KeyValue {
4046 return TLSClientIssuerKey.String(val)
4047 }
4048
4049 // TLSClientJa3 returns an attribute KeyValue conforming to the
4050 // "tls.client.ja3" semantic conventions. It represents a hash that identifies
4051 // clients based on how they perform an SSL/TLS handshake.
4052 func TLSClientJa3(val string) attribute.KeyValue {
4053 return TLSClientJa3Key.String(val)
4054 }
4055
4056 // TLSClientNotAfter returns an attribute KeyValue conforming to the
4057 // "tls.client.not_after" semantic conventions. It represents the date/Time
4058 // indicating when client certificate is no longer considered valid.
4059 func TLSClientNotAfter(val string) attribute.KeyValue {
4060 return TLSClientNotAfterKey.String(val)
4061 }
4062
4063 // TLSClientNotBefore returns an attribute KeyValue conforming to the
4064 // "tls.client.not_before" semantic conventions. It represents the date/Time
4065 // indicating when client certificate is first considered valid.
4066 func TLSClientNotBefore(val string) attribute.KeyValue {
4067 return TLSClientNotBeforeKey.String(val)
4068 }
4069
4070 // TLSClientServerName returns an attribute KeyValue conforming to the
4071 // "tls.client.server_name" semantic conventions. It represents the also called
4072 // an SNI, this tells the server which hostname to which the client is
4073 // attempting to connect to.
4074 func TLSClientServerName(val string) attribute.KeyValue {
4075 return TLSClientServerNameKey.String(val)
4076 }
4077
4078 // TLSClientSubject returns an attribute KeyValue conforming to the
4079 // "tls.client.subject" semantic conventions. It represents the distinguished
4080 // name of subject of the x.509 certificate presented by the client.
4081 func TLSClientSubject(val string) attribute.KeyValue {
4082 return TLSClientSubjectKey.String(val)
4083 }
4084
4085 // TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
4086 // "tls.client.supported_ciphers" semantic conventions. It represents the array
4087 // of ciphers offered by the client during the client hello.
4088 func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
4089 return TLSClientSupportedCiphersKey.StringSlice(val)
4090 }
4091
4092 // TLSCurve returns an attribute KeyValue conforming to the "tls.curve"
4093 // semantic conventions. It represents the string indicating the curve used for
4094 // the given cipher, when applicable
4095 func TLSCurve(val string) attribute.KeyValue {
4096 return TLSCurveKey.String(val)
4097 }
4098
4099 // TLSEstablished returns an attribute KeyValue conforming to the
4100 // "tls.established" semantic conventions. It represents the boolean flag
4101 // indicating if the TLS negotiation was successful and transitioned to an
4102 // encrypted tunnel.
4103 func TLSEstablished(val bool) attribute.KeyValue {
4104 return TLSEstablishedKey.Bool(val)
4105 }
4106
4107 // TLSNextProtocol returns an attribute KeyValue conforming to the
4108 // "tls.next_protocol" semantic conventions. It represents the string
4109 // indicating the protocol being tunneled. Per the values in the [IANA
4110 // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
4111 // this string should be lower case.
4112 func TLSNextProtocol(val string) attribute.KeyValue {
4113 return TLSNextProtocolKey.String(val)
4114 }
4115
4116 // TLSProtocolVersion returns an attribute KeyValue conforming to the
4117 // "tls.protocol.version" semantic conventions. It represents the numeric part
4118 // of the version parsed from the original string of the negotiated [SSL/TLS
4119 // protocol
4120 // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
4121 func TLSProtocolVersion(val string) attribute.KeyValue {
4122 return TLSProtocolVersionKey.String(val)
4123 }
4124
4125 // TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
4126 // semantic conventions. It represents the boolean flag indicating if this TLS
4127 // connection was resumed from an existing TLS negotiation.
4128 func TLSResumed(val bool) attribute.KeyValue {
4129 return TLSResumedKey.Bool(val)
4130 }
4131
4132 // TLSServerCertificate returns an attribute KeyValue conforming to the
4133 // "tls.server.certificate" semantic conventions. It represents the pEM-encoded
4134 // stand-alone certificate offered by the server. This is usually
4135 // mutually-exclusive of `server.certificate_chain` since this value also
4136 // exists in that list.
4137 func TLSServerCertificate(val string) attribute.KeyValue {
4138 return TLSServerCertificateKey.String(val)
4139 }
4140
4141 // TLSServerCertificateChain returns an attribute KeyValue conforming to the
4142 // "tls.server.certificate_chain" semantic conventions. It represents the array
4143 // of PEM-encoded certificates that make up the certificate chain offered by
4144 // the server. This is usually mutually-exclusive of `server.certificate` since
4145 // that value should be the first certificate in the chain.
4146 func TLSServerCertificateChain(val ...string) attribute.KeyValue {
4147 return TLSServerCertificateChainKey.StringSlice(val)
4148 }
4149
4150 // TLSServerHashMd5 returns an attribute KeyValue conforming to the
4151 // "tls.server.hash.md5" semantic conventions. It represents the certificate
4152 // fingerprint using the MD5 digest of DER-encoded version of certificate
4153 // offered by the server. For consistency with other hash values, this value
4154 // should be formatted as an uppercase hash.
4155 func TLSServerHashMd5(val string) attribute.KeyValue {
4156 return TLSServerHashMd5Key.String(val)
4157 }
4158
4159 // TLSServerHashSha1 returns an attribute KeyValue conforming to the
4160 // "tls.server.hash.sha1" semantic conventions. It represents the certificate
4161 // fingerprint using the SHA1 digest of DER-encoded version of certificate
4162 // offered by the server. For consistency with other hash values, this value
4163 // should be formatted as an uppercase hash.
4164 func TLSServerHashSha1(val string) attribute.KeyValue {
4165 return TLSServerHashSha1Key.String(val)
4166 }
4167
4168 // TLSServerHashSha256 returns an attribute KeyValue conforming to the
4169 // "tls.server.hash.sha256" semantic conventions. It represents the certificate
4170 // fingerprint using the SHA256 digest of DER-encoded version of certificate
4171 // offered by the server. For consistency with other hash values, this value
4172 // should be formatted as an uppercase hash.
4173 func TLSServerHashSha256(val string) attribute.KeyValue {
4174 return TLSServerHashSha256Key.String(val)
4175 }
4176
4177 // TLSServerIssuer returns an attribute KeyValue conforming to the
4178 // "tls.server.issuer" semantic conventions. It represents the distinguished
4179 // name of
4180 // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
4181 // the issuer of the x.509 certificate presented by the client.
4182 func TLSServerIssuer(val string) attribute.KeyValue {
4183 return TLSServerIssuerKey.String(val)
4184 }
4185
4186 // TLSServerJa3s returns an attribute KeyValue conforming to the
4187 // "tls.server.ja3s" semantic conventions. It represents a hash that identifies
4188 // servers based on how they perform an SSL/TLS handshake.
4189 func TLSServerJa3s(val string) attribute.KeyValue {
4190 return TLSServerJa3sKey.String(val)
4191 }
4192
4193 // TLSServerNotAfter returns an attribute KeyValue conforming to the
4194 // "tls.server.not_after" semantic conventions. It represents the date/Time
4195 // indicating when server certificate is no longer considered valid.
4196 func TLSServerNotAfter(val string) attribute.KeyValue {
4197 return TLSServerNotAfterKey.String(val)
4198 }
4199
4200 // TLSServerNotBefore returns an attribute KeyValue conforming to the
4201 // "tls.server.not_before" semantic conventions. It represents the date/Time
4202 // indicating when server certificate is first considered valid.
4203 func TLSServerNotBefore(val string) attribute.KeyValue {
4204 return TLSServerNotBeforeKey.String(val)
4205 }
4206
4207 // TLSServerSubject returns an attribute KeyValue conforming to the
4208 // "tls.server.subject" semantic conventions. It represents the distinguished
4209 // name of subject of the x.509 certificate presented by the server.
4210 func TLSServerSubject(val string) attribute.KeyValue {
4211 return TLSServerSubjectKey.String(val)
4212 }
4213
4214 // Attributes describing URL.
4215 const (
4216 // URLFragmentKey is the attribute Key conforming to the "url.fragment"
4217 // semantic conventions. It represents the [URI
4218 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
4219 //
4220 // Type: string
4221 // RequirementLevel: Optional
4222 // Stability: stable
4223 // Examples: 'SemConv'
4224 URLFragmentKey = attribute.Key("url.fragment")
4225
4226 // URLFullKey is the attribute Key conforming to the "url.full" semantic
4227 // conventions. It represents the absolute URL describing a network
4228 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
4229 //
4230 // Type: string
4231 // RequirementLevel: Optional
4232 // Stability: stable
4233 // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
4234 // '//localhost'
4235 // Note: For network calls, URL usually has
4236 // `scheme://host[:port][path][?query][#fragment]` format, where the
4237 // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
4238 // included nevertheless.
4239 // `url.full` MUST NOT contain credentials passed via URL in form of
4240 // `https://username:[email protected]/`. In such case username and
4241 // password SHOULD be redacted and attribute's value SHOULD be
4242 // `https://REDACTED:[email protected]/`.
4243 // `url.full` SHOULD capture the absolute URL when it is available (or can
4244 // be reconstructed) and SHOULD NOT be validated or modified except for
4245 // sanitizing purposes.
4246 URLFullKey = attribute.Key("url.full")
4247
4248 // URLPathKey is the attribute Key conforming to the "url.path" semantic
4249 // conventions. It represents the [URI
4250 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
4251 //
4252 // Type: string
4253 // RequirementLevel: Optional
4254 // Stability: stable
4255 // Examples: '/search'
4256 URLPathKey = attribute.Key("url.path")
4257
4258 // URLQueryKey is the attribute Key conforming to the "url.query" semantic
4259 // conventions. It represents the [URI
4260 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
4261 //
4262 // Type: string
4263 // RequirementLevel: Optional
4264 // Stability: stable
4265 // Examples: 'q=OpenTelemetry'
4266 // Note: Sensitive content provided in query string SHOULD be scrubbed when
4267 // instrumentations can identify it.
4268 URLQueryKey = attribute.Key("url.query")
4269
4270 // URLSchemeKey is the attribute Key conforming to the "url.scheme"
4271 // semantic conventions. It represents the [URI
4272 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
4273 // identifying the used protocol.
4274 //
4275 // Type: string
4276 // RequirementLevel: Optional
4277 // Stability: stable
4278 // Examples: 'https', 'ftp', 'telnet'
4279 URLSchemeKey = attribute.Key("url.scheme")
4280 )
4281
4282 // URLFragment returns an attribute KeyValue conforming to the
4283 // "url.fragment" semantic conventions. It represents the [URI
4284 // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
4285 func URLFragment(val string) attribute.KeyValue {
4286 return URLFragmentKey.String(val)
4287 }
4288
4289 // URLFull returns an attribute KeyValue conforming to the "url.full"
4290 // semantic conventions. It represents the absolute URL describing a network
4291 // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
4292 func URLFull(val string) attribute.KeyValue {
4293 return URLFullKey.String(val)
4294 }
4295
4296 // URLPath returns an attribute KeyValue conforming to the "url.path"
4297 // semantic conventions. It represents the [URI
4298 // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
4299 func URLPath(val string) attribute.KeyValue {
4300 return URLPathKey.String(val)
4301 }
4302
4303 // URLQuery returns an attribute KeyValue conforming to the "url.query"
4304 // semantic conventions. It represents the [URI
4305 // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
4306 func URLQuery(val string) attribute.KeyValue {
4307 return URLQueryKey.String(val)
4308 }
4309
4310 // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
4311 // semantic conventions. It represents the [URI
4312 // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
4313 // identifying the used protocol.
4314 func URLScheme(val string) attribute.KeyValue {
4315 return URLSchemeKey.String(val)
4316 }
4317
4318 // Describes user-agent attributes.
4319 const (
4320 // UserAgentOriginalKey is the attribute Key conforming to the
4321 // "user_agent.original" semantic conventions. It represents the value of
4322 // the [HTTP
4323 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
4324 // header sent by the client.
4325 //
4326 // Type: string
4327 // RequirementLevel: Optional
4328 // Stability: stable
4329 // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
4330 // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
4331 // Version/14.1.2 Mobile/15E148 Safari/604.1'
4332 UserAgentOriginalKey = attribute.Key("user_agent.original")
4333 )
4334
4335 // UserAgentOriginal returns an attribute KeyValue conforming to the
4336 // "user_agent.original" semantic conventions. It represents the value of the
4337 // [HTTP
4338 // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
4339 // header sent by the client.
4340 func UserAgentOriginal(val string) attribute.KeyValue {
4341 return UserAgentOriginalKey.String(val)
4342 }
4343
4344 // Session is defined as the period of time encompassing all activities
4345 // performed by the application and the actions executed by the end user.
4346 // Consequently, a Session is represented as a collection of Logs, Events, and
4347 // Spans emitted by the Client Application throughout the Session's duration.
4348 // Each Session is assigned a unique identifier, which is included as an
4349 // attribute in the Logs, Events, and Spans generated during the Session's
4350 // lifecycle.
4351 // When a session reaches end of life, typically due to user inactivity or
4352 // session timeout, a new session identifier will be assigned. The previous
4353 // session identifier may be provided by the instrumentation so that telemetry
4354 // backends can link the two sessions.
4355 const (
4356 // SessionIDKey is the attribute Key conforming to the "session.id"
4357 // semantic conventions. It represents a unique id to identify a session.
4358 //
4359 // Type: string
4360 // RequirementLevel: Optional
4361 // Stability: experimental
4362 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
4363 SessionIDKey = attribute.Key("session.id")
4364
4365 // SessionPreviousIDKey is the attribute Key conforming to the
4366 // "session.previous_id" semantic conventions. It represents the previous
4367 // `session.id` for this user, when known.
4368 //
4369 // Type: string
4370 // RequirementLevel: Optional
4371 // Stability: experimental
4372 // Examples: '00112233-4455-6677-8899-aabbccddeeff'
4373 SessionPreviousIDKey = attribute.Key("session.previous_id")
4374 )
4375
4376 // SessionID returns an attribute KeyValue conforming to the "session.id"
4377 // semantic conventions. It represents a unique id to identify a session.
4378 func SessionID(val string) attribute.KeyValue {
4379 return SessionIDKey.String(val)
4380 }
4381
4382 // SessionPreviousID returns an attribute KeyValue conforming to the
4383 // "session.previous_id" semantic conventions. It represents the previous
4384 // `session.id` for this user, when known.
4385 func SessionPreviousID(val string) attribute.KeyValue {
4386 return SessionPreviousIDKey.String(val)
4387 }