-
Notifications
You must be signed in to change notification settings - Fork 1k
/
attribute_group.go
2788 lines (2529 loc) · 106 KB
/
attribute_group.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Code generated from semantic convention specification. DO NOT EDIT.
package semconv // import "go.opentelemetry.io/otel/semconv/v1.23.1"
import "go.opentelemetry.io/otel/attribute"
// These attributes may be used to describe the client in a connection-based
// network interaction where there is one side that initiates the connection
// (the client is the side that initiates the connection). This covers all TCP
// network interactions since TCP is connection-based and one side initiates
// the connection (an exception is made for peer-to-peer communication over TCP
// where the "user-facing" surface of the protocol / API doesn't expose a clear
// notion of client and server). This also covers UDP network interactions
// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
const (
// ClientAddressKey is the attribute Key conforming to the "client.address"
// semantic conventions. It represents the client address - domain name if
// available without reverse DNS lookup; otherwise, IP address or Unix
// domain socket name.
//
// Type: string
// RequirementLevel: Optional
// Stability: stable
// Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
// Note: When observed from the server side, and when communicating through
// an intermediary, `client.address` SHOULD represent the client address
// behind any intermediaries, for example proxies, if it's available.
ClientAddressKey = attribute.Key("client.address")
// ClientPortKey is the attribute Key conforming to the "client.port"
// semantic conventions. It represents the client port number.
//
// Type: int
// RequirementLevel: Optional
// Stability: stable
// Examples: 65123
// Note: When observed from the server side, and when communicating through
// an intermediary, `client.port` SHOULD represent the client port behind
// any intermediaries, for example proxies, if it's available.
ClientPortKey = attribute.Key("client.port")
)
// ClientAddress returns an attribute KeyValue conforming to the
// "client.address" semantic conventions. It represents the client address -
// domain name if available without reverse DNS lookup; otherwise, IP address
// or Unix domain socket name.
func ClientAddress(val string) attribute.KeyValue {
return ClientAddressKey.String(val)
}
// ClientPort returns an attribute KeyValue conforming to the "client.port"
// semantic conventions. It represents the client port number.
func ClientPort(val int) attribute.KeyValue {
return ClientPortKey.Int(val)
}
// These attributes may be used to describe the receiver of a network
// exchange/packet. These should be used when there is no client/server
// relationship between the two sides, or when that relationship is unknown.
// This covers low-level network interactions (e.g. packet tracing) where you
// don't know if there was a connection or which side initiated it. This also
// covers unidirectional UDP flows and peer-to-peer communication where the
// "user-facing" surface of the protocol / API doesn't expose a clear notion of
// client and server.
const (
// DestinationAddressKey is the attribute Key conforming to the
// "destination.address" semantic conventions. It represents the
// destination address - domain name if available without reverse DNS
// lookup; otherwise, IP address or Unix domain socket name.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
// Note: When observed from the source side, and when communicating through
// an intermediary, `destination.address` SHOULD represent the destination
// address behind any intermediaries, for example proxies, if it's
// available.
DestinationAddressKey = attribute.Key("destination.address")
// DestinationPortKey is the attribute Key conforming to the
// "destination.port" semantic conventions. It represents the destination
// port number
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 3389, 2888
DestinationPortKey = attribute.Key("destination.port")
)
// DestinationAddress returns an attribute KeyValue conforming to the
// "destination.address" semantic conventions. It represents the destination
// address - domain name if available without reverse DNS lookup; otherwise, IP
// address or Unix domain socket name.
func DestinationAddress(val string) attribute.KeyValue {
return DestinationAddressKey.String(val)
}
// DestinationPort returns an attribute KeyValue conforming to the
// "destination.port" semantic conventions. It represents the destination port
// number
func DestinationPort(val int) attribute.KeyValue {
return DestinationPortKey.Int(val)
}
// The shared attributes used to report an error.
const (
// ErrorTypeKey is the attribute Key conforming to the "error.type"
// semantic conventions. It represents the describes a class of error the
// operation ended with.
//
// Type: Enum
// RequirementLevel: Optional
// Stability: stable
// Examples: 'timeout', 'java.net.UnknownHostException',
// 'server_certificate_invalid', '500'
// Note: The `error.type` SHOULD be predictable and SHOULD have low
// cardinality.
// Instrumentations SHOULD document the list of errors they report.
//
// The cardinality of `error.type` within one instrumentation library
// SHOULD be low.
// Telemetry consumers that aggregate data from multiple instrumentation
// libraries and applications
// should be prepared for `error.type` to have high cardinality at query
// time when no
// additional filters are applied.
//
// If the operation has completed successfully, instrumentations SHOULD NOT
// set `error.type`.
//
// If a specific domain defines its own set of error identifiers (such as
// HTTP or gRPC status codes),
// it's RECOMMENDED to:
// * Use a domain-specific attribute
// * Set `error.type` to capture all errors, regardless of whether they
// are defined within the domain-specific set or not.
ErrorTypeKey = attribute.Key("error.type")
)
var (
// A fallback error value to be used when the instrumentation doesn't define a custom value
ErrorTypeOther = ErrorTypeKey.String("_OTHER")
)
// Describes FaaS attributes.
const (
// FaaSInvokedNameKey is the attribute Key conforming to the
// "faas.invoked_name" semantic conventions. It represents the name of the
// invoked function.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'my-function'
// Note: SHOULD be equal to the `faas.name` resource attribute of the
// invoked function.
FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
// FaaSInvokedProviderKey is the attribute Key conforming to the
// "faas.invoked_provider" semantic conventions. It represents the cloud
// provider of the invoked function.
//
// Type: Enum
// RequirementLevel: Required
// Stability: experimental
// Note: SHOULD be equal to the `cloud.provider` resource attribute of the
// invoked function.
FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
// FaaSInvokedRegionKey is the attribute Key conforming to the
// "faas.invoked_region" semantic conventions. It represents the cloud
// region of the invoked function.
//
// Type: string
// RequirementLevel: ConditionallyRequired (For some cloud providers, like
// AWS or GCP, the region in which a function is hosted is essential to
// uniquely identify the function and also part of its endpoint. Since it's
// part of the endpoint being called, the region is always known to
// clients. In these cases, `faas.invoked_region` MUST be set accordingly.
// If the region is unknown to the client or not required for identifying
// the invoked function, setting `faas.invoked_region` is optional.)
// Stability: experimental
// Examples: 'eu-central-1'
// Note: SHOULD be equal to the `cloud.region` resource attribute of the
// invoked function.
FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
// FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
// semantic conventions. It represents the type of the trigger which caused
// this function invocation.
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
FaaSTriggerKey = attribute.Key("faas.trigger")
)
var (
// Alibaba Cloud
FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
// Amazon Web Services
FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
// Microsoft Azure
FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
// Google Cloud Platform
FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
// Tencent Cloud
FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
)
var (
// A response to some data source operation such as a database or filesystem read/write
FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
// To provide an answer to an inbound HTTP request
FaaSTriggerHTTP = FaaSTriggerKey.String("http")
// A function is set to be executed when messages are sent to a messaging system
FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
// A function is scheduled to be executed regularly
FaaSTriggerTimer = FaaSTriggerKey.String("timer")
// If none of the others apply
FaaSTriggerOther = FaaSTriggerKey.String("other")
)
// FaaSInvokedName returns an attribute KeyValue conforming to the
// "faas.invoked_name" semantic conventions. It represents the name of the
// invoked function.
func FaaSInvokedName(val string) attribute.KeyValue {
return FaaSInvokedNameKey.String(val)
}
// FaaSInvokedRegion returns an attribute KeyValue conforming to the
// "faas.invoked_region" semantic conventions. It represents the cloud region
// of the invoked function.
func FaaSInvokedRegion(val string) attribute.KeyValue {
return FaaSInvokedRegionKey.String(val)
}
// Attributes for Events represented using Log Records.
const (
// EventDomainKey is the attribute Key conforming to the "event.domain"
// semantic conventions. It represents the domain identifies the business
// context for the events.
//
// Type: Enum
// RequirementLevel: Required
// Stability: experimental
// Note: Events across different domains may have same `event.name`, yet be
// unrelated events.
EventDomainKey = attribute.Key("event.domain")
// EventNameKey is the attribute Key conforming to the "event.name"
// semantic conventions. It represents the name identifies the event.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'click', 'exception'
EventNameKey = attribute.Key("event.name")
)
var (
// Events from browser apps
EventDomainBrowser = EventDomainKey.String("browser")
// Events from mobile apps
EventDomainDevice = EventDomainKey.String("device")
// Events from Kubernetes
EventDomainK8S = EventDomainKey.String("k8s")
)
// EventName returns an attribute KeyValue conforming to the "event.name"
// semantic conventions. It represents the name identifies the event.
func EventName(val string) attribute.KeyValue {
return EventNameKey.String(val)
}
// The attributes described in this section are rather generic. They may be
// used in any Log Record they apply to.
const (
// LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
// semantic conventions. It represents a unique identifier for the Log
// Record.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
// Note: If an id is provided, other log records with the same id will be
// considered duplicates and can be removed safely. This means, that two
// distinguishable log records MUST have different values.
// The id MAY be an [Universally Unique Lexicographically Sortable
// Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
// (e.g. UUID) may be used as needed.
LogRecordUIDKey = attribute.Key("log.record.uid")
)
// LogRecordUID returns an attribute KeyValue conforming to the
// "log.record.uid" semantic conventions. It represents a unique identifier for
// the Log Record.
func LogRecordUID(val string) attribute.KeyValue {
return LogRecordUIDKey.String(val)
}
// Describes Log attributes
const (
// LogIostreamKey is the attribute Key conforming to the "log.iostream"
// semantic conventions. It represents the stream associated with the log.
// See below for a list of well-known values.
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
LogIostreamKey = attribute.Key("log.iostream")
)
var (
// Logs from stdout stream
LogIostreamStdout = LogIostreamKey.String("stdout")
// Events from stderr stream
LogIostreamStderr = LogIostreamKey.String("stderr")
)
// A file to which log was emitted.
const (
// LogFileNameKey is the attribute Key conforming to the "log.file.name"
// semantic conventions. It represents the basename of the file.
//
// Type: string
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'audit.log'
LogFileNameKey = attribute.Key("log.file.name")
// LogFileNameResolvedKey is the attribute Key conforming to the
// "log.file.name_resolved" semantic conventions. It represents the
// basename of the file, with symlinks resolved.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'uuid.log'
LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
// LogFilePathKey is the attribute Key conforming to the "log.file.path"
// semantic conventions. It represents the full path to the file.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '/var/log/mysql/audit.log'
LogFilePathKey = attribute.Key("log.file.path")
// LogFilePathResolvedKey is the attribute Key conforming to the
// "log.file.path_resolved" semantic conventions. It represents the full
// path to the file, with symlinks resolved.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '/var/lib/docker/uuid.log'
LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
)
// LogFileName returns an attribute KeyValue conforming to the
// "log.file.name" semantic conventions. It represents the basename of the
// file.
func LogFileName(val string) attribute.KeyValue {
return LogFileNameKey.String(val)
}
// LogFileNameResolved returns an attribute KeyValue conforming to the
// "log.file.name_resolved" semantic conventions. It represents the basename of
// the file, with symlinks resolved.
func LogFileNameResolved(val string) attribute.KeyValue {
return LogFileNameResolvedKey.String(val)
}
// LogFilePath returns an attribute KeyValue conforming to the
// "log.file.path" semantic conventions. It represents the full path to the
// file.
func LogFilePath(val string) attribute.KeyValue {
return LogFilePathKey.String(val)
}
// LogFilePathResolved returns an attribute KeyValue conforming to the
// "log.file.path_resolved" semantic conventions. It represents the full path
// to the file, with symlinks resolved.
func LogFilePathResolved(val string) attribute.KeyValue {
return LogFilePathResolvedKey.String(val)
}
// Describes Database attributes
const (
// PoolNameKey is the attribute Key conforming to the "pool.name" semantic
// conventions. It represents the name of the connection pool; unique
// within the instrumented application. In case the connection pool
// implementation doesn't provide a name, then the
// [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
// should be used
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'myDataSource'
PoolNameKey = attribute.Key("pool.name")
// StateKey is the attribute Key conforming to the "state" semantic
// conventions. It represents the state of a connection in the pool
//
// Type: Enum
// RequirementLevel: Required
// Stability: experimental
// Examples: 'idle'
StateKey = attribute.Key("state")
)
var (
// idle
StateIdle = StateKey.String("idle")
// used
StateUsed = StateKey.String("used")
)
// PoolName returns an attribute KeyValue conforming to the "pool.name"
// semantic conventions. It represents the name of the connection pool; unique
// within the instrumented application. In case the connection pool
// implementation doesn't provide a name, then the
// [db.connection_string](/docs/database/database-spans.md#connection-level-attributes)
// should be used
func PoolName(val string) attribute.KeyValue {
return PoolNameKey.String(val)
}
// Describes JVM buffer metric attributes.
const (
// JvmBufferPoolNameKey is the attribute Key conforming to the
// "jvm.buffer.pool.name" semantic conventions. It represents the name of
// the buffer pool.
//
// Type: string
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'mapped', 'direct'
// Note: Pool names are generally obtained via
// [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
)
// JvmBufferPoolName returns an attribute KeyValue conforming to the
// "jvm.buffer.pool.name" semantic conventions. It represents the name of the
// buffer pool.
func JvmBufferPoolName(val string) attribute.KeyValue {
return JvmBufferPoolNameKey.String(val)
}
// Describes JVM memory metric attributes.
const (
// JvmMemoryPoolNameKey is the attribute Key conforming to the
// "jvm.memory.pool.name" semantic conventions. It represents the name of
// the memory pool.
//
// Type: string
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
// Note: Pool names are generally obtained via
// [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
// JvmMemoryTypeKey is the attribute Key conforming to the
// "jvm.memory.type" semantic conventions. It represents the type of
// memory.
//
// Type: Enum
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'heap', 'non_heap'
JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
)
var (
// Heap memory
JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
// Non-heap memory
JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
)
// JvmMemoryPoolName returns an attribute KeyValue conforming to the
// "jvm.memory.pool.name" semantic conventions. It represents the name of the
// memory pool.
func JvmMemoryPoolName(val string) attribute.KeyValue {
return JvmMemoryPoolNameKey.String(val)
}
// Describes System metric attributes
const (
// SystemDeviceKey is the attribute Key conforming to the "system.device"
// semantic conventions. It represents the device identifier
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '(identifier)'
SystemDeviceKey = attribute.Key("system.device")
)
// SystemDevice returns an attribute KeyValue conforming to the
// "system.device" semantic conventions. It represents the device identifier
func SystemDevice(val string) attribute.KeyValue {
return SystemDeviceKey.String(val)
}
// Describes System CPU metric attributes
const (
// SystemCPULogicalNumberKey is the attribute Key conforming to the
// "system.cpu.logical_number" semantic conventions. It represents the
// logical CPU number [0..n-1]
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 1
SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
// SystemCPUStateKey is the attribute Key conforming to the
// "system.cpu.state" semantic conventions. It represents the state of the
// CPU
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'idle', 'interrupt'
SystemCPUStateKey = attribute.Key("system.cpu.state")
)
var (
// user
SystemCPUStateUser = SystemCPUStateKey.String("user")
// system
SystemCPUStateSystem = SystemCPUStateKey.String("system")
// nice
SystemCPUStateNice = SystemCPUStateKey.String("nice")
// idle
SystemCPUStateIdle = SystemCPUStateKey.String("idle")
// iowait
SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
// interrupt
SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
// steal
SystemCPUStateSteal = SystemCPUStateKey.String("steal")
)
// SystemCPULogicalNumber returns an attribute KeyValue conforming to the
// "system.cpu.logical_number" semantic conventions. It represents the logical
// CPU number [0..n-1]
func SystemCPULogicalNumber(val int) attribute.KeyValue {
return SystemCPULogicalNumberKey.Int(val)
}
// Describes System Memory metric attributes
const (
// SystemMemoryStateKey is the attribute Key conforming to the
// "system.memory.state" semantic conventions. It represents the memory
// state
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'free', 'cached'
SystemMemoryStateKey = attribute.Key("system.memory.state")
)
var (
// used
SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
// free
SystemMemoryStateFree = SystemMemoryStateKey.String("free")
// shared
SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
// buffers
SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
// cached
SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
)
// Describes System Memory Paging metric attributes
const (
// SystemPagingDirectionKey is the attribute Key conforming to the
// "system.paging.direction" semantic conventions. It represents the paging
// access direction
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'in'
SystemPagingDirectionKey = attribute.Key("system.paging.direction")
// SystemPagingStateKey is the attribute Key conforming to the
// "system.paging.state" semantic conventions. It represents the memory
// paging state
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'free'
SystemPagingStateKey = attribute.Key("system.paging.state")
// SystemPagingTypeKey is the attribute Key conforming to the
// "system.paging.type" semantic conventions. It represents the memory
// paging type
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'minor'
SystemPagingTypeKey = attribute.Key("system.paging.type")
)
var (
// in
SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
// out
SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
)
var (
// used
SystemPagingStateUsed = SystemPagingStateKey.String("used")
// free
SystemPagingStateFree = SystemPagingStateKey.String("free")
)
var (
// major
SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
// minor
SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
)
// Describes System Disk metric attributes
const (
// SystemDiskDirectionKey is the attribute Key conforming to the
// "system.disk.direction" semantic conventions. It represents the disk
// operation direction
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'read'
SystemDiskDirectionKey = attribute.Key("system.disk.direction")
)
var (
// read
SystemDiskDirectionRead = SystemDiskDirectionKey.String("read")
// write
SystemDiskDirectionWrite = SystemDiskDirectionKey.String("write")
)
// Describes Filesystem metric attributes
const (
// SystemFilesystemModeKey is the attribute Key conforming to the
// "system.filesystem.mode" semantic conventions. It represents the
// filesystem mode
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'rw, ro'
SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
// SystemFilesystemMountpointKey is the attribute Key conforming to the
// "system.filesystem.mountpoint" semantic conventions. It represents the
// filesystem mount path
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '/mnt/data'
SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
// SystemFilesystemStateKey is the attribute Key conforming to the
// "system.filesystem.state" semantic conventions. It represents the
// filesystem state
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'used'
SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
// SystemFilesystemTypeKey is the attribute Key conforming to the
// "system.filesystem.type" semantic conventions. It represents the
// filesystem type
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'ext4'
SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
)
var (
// used
SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
// free
SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
// reserved
SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
)
var (
// fat32
SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
// exfat
SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
// ntfs
SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
// refs
SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
// hfsplus
SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
// ext4
SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
)
// SystemFilesystemMode returns an attribute KeyValue conforming to the
// "system.filesystem.mode" semantic conventions. It represents the filesystem
// mode
func SystemFilesystemMode(val string) attribute.KeyValue {
return SystemFilesystemModeKey.String(val)
}
// SystemFilesystemMountpoint returns an attribute KeyValue conforming to
// the "system.filesystem.mountpoint" semantic conventions. It represents the
// filesystem mount path
func SystemFilesystemMountpoint(val string) attribute.KeyValue {
return SystemFilesystemMountpointKey.String(val)
}
// Describes Network metric attributes
const (
// SystemNetworkDirectionKey is the attribute Key conforming to the
// "system.network.direction" semantic conventions. It represents the
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'transmit'
SystemNetworkDirectionKey = attribute.Key("system.network.direction")
// SystemNetworkStateKey is the attribute Key conforming to the
// "system.network.state" semantic conventions. It represents a stateless
// protocol MUST NOT set this attribute
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'close_wait'
SystemNetworkStateKey = attribute.Key("system.network.state")
)
var (
// transmit
SystemNetworkDirectionTransmit = SystemNetworkDirectionKey.String("transmit")
// receive
SystemNetworkDirectionReceive = SystemNetworkDirectionKey.String("receive")
)
var (
// close
SystemNetworkStateClose = SystemNetworkStateKey.String("close")
// close_wait
SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
// closing
SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
// delete
SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
// established
SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
// fin_wait_1
SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
// fin_wait_2
SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
// last_ack
SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
// listen
SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
// syn_recv
SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
// syn_sent
SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
// time_wait
SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
)
// Describes System Process metric attributes
const (
// SystemProcessesStatusKey is the attribute Key conforming to the
// "system.processes.status" semantic conventions. It represents the
// process state, e.g., [Linux Process State
// Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'running'
SystemProcessesStatusKey = attribute.Key("system.processes.status")
)
var (
// running
SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running")
// sleeping
SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping")
// stopped
SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped")
// defunct
SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct")
)
// Describes deprecated HTTP attributes.
const (
// HTTPMethodKey is the attribute Key conforming to the "http.method"
// semantic conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 'GET', 'POST', 'HEAD'
// Deprecated: use `http.request.method` instead.
HTTPMethodKey = attribute.Key("http.method")
// HTTPRequestContentLengthKey is the attribute Key conforming to the
// "http.request_content_length" semantic conventions.
//
// Type: int
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 3495
// Deprecated: use `http.request.header.content-length` instead.
HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
// HTTPResponseContentLengthKey is the attribute Key conforming to the
// "http.response_content_length" semantic conventions.
//
// Type: int
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 3495
// Deprecated: use `http.response.header.content-length` instead.
HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
// HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
// semantic conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 'http', 'https'
// Deprecated: use `url.scheme` instead.
HTTPSchemeKey = attribute.Key("http.scheme")
// HTTPStatusCodeKey is the attribute Key conforming to the
// "http.status_code" semantic conventions.
//
// Type: int
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 200
// Deprecated: use `http.response.status_code` instead.
HTTPStatusCodeKey = attribute.Key("http.status_code")
// HTTPTargetKey is the attribute Key conforming to the "http.target"
// semantic conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: '/search?q=OpenTelemetry#SemConv'
// Deprecated: use `url.path` and `url.query` instead.
HTTPTargetKey = attribute.Key("http.target")
// HTTPURLKey is the attribute Key conforming to the "http.url" semantic
// conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
// Deprecated: use `url.full` instead.
HTTPURLKey = attribute.Key("http.url")
)
// HTTPMethod returns an attribute KeyValue conforming to the "http.method"
// semantic conventions.
//
// Deprecated: use `http.request.method` instead.
func HTTPMethod(val string) attribute.KeyValue {
return HTTPMethodKey.String(val)
}
// HTTPRequestContentLength returns an attribute KeyValue conforming to the
// "http.request_content_length" semantic conventions.
//
// Deprecated: use `http.request.header.content-length` instead.
func HTTPRequestContentLength(val int) attribute.KeyValue {
return HTTPRequestContentLengthKey.Int(val)
}
// HTTPResponseContentLength returns an attribute KeyValue conforming to the
// "http.response_content_length" semantic conventions.
//
// Deprecated: use `http.response.header.content-length` instead.
func HTTPResponseContentLength(val int) attribute.KeyValue {
return HTTPResponseContentLengthKey.Int(val)
}
// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
// semantic conventions.
//
// Deprecated: use `url.scheme` instead.
func HTTPScheme(val string) attribute.KeyValue {
return HTTPSchemeKey.String(val)
}
// HTTPStatusCode returns an attribute KeyValue conforming to the
// "http.status_code" semantic conventions.
//
// Deprecated: use `http.response.status_code` instead.
func HTTPStatusCode(val int) attribute.KeyValue {
return HTTPStatusCodeKey.Int(val)
}
// HTTPTarget returns an attribute KeyValue conforming to the "http.target"
// semantic conventions.
//
// Deprecated: use `url.path` and `url.query` instead.
func HTTPTarget(val string) attribute.KeyValue {
return HTTPTargetKey.String(val)
}
// HTTPURL returns an attribute KeyValue conforming to the "http.url"
// semantic conventions.
//
// Deprecated: use `url.full` instead.
func HTTPURL(val string) attribute.KeyValue {
return HTTPURLKey.String(val)
}
// These attributes may be used for any network related operation.
const (
// NetHostNameKey is the attribute Key conforming to the "net.host.name"
// semantic conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 'example.com'
// Deprecated: use `server.address`.
NetHostNameKey = attribute.Key("net.host.name")
// NetHostPortKey is the attribute Key conforming to the "net.host.port"
// semantic conventions.
//
// Type: int
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 8080
// Deprecated: use `server.port`.
NetHostPortKey = attribute.Key("net.host.port")
// NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
// semantic conventions.
//
// Type: string
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 'example.com'
// Deprecated: use `server.address` on client spans and `client.address` on
// server spans.
NetPeerNameKey = attribute.Key("net.peer.name")
// NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
// semantic conventions.
//
// Type: int
// RequirementLevel: Optional
// Stability: deprecated
// Examples: 8080
// Deprecated: use `server.port` on client spans and `client.port` on
// server spans.
NetPeerPortKey = attribute.Key("net.peer.port")
// NetProtocolNameKey is the attribute Key conforming to the
// "net.protocol.name" semantic conventions.