Debian Codegraph @

semconv/v1.25.0/event.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.25.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // This event represents an occurrence of a lifecycle transition on the iOS
11 // platform.
12 const (
13 // IosStateKey is the attribute Key conforming to the "ios.state" semantic
14 // conventions. It represents the this attribute represents the state the
15 // application has transitioned into at the occurrence of the event.
16 //
17 // Type: Enum
18 // RequirementLevel: Required
19 // Stability: experimental
20 // Note: The iOS lifecycle states are defined in the [UIApplicationDelegate
21 // documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902),
22 // and from which the `OS terminology` column values are derived.
23 IosStateKey = attribute.Key("ios.state")
24 )
25
26 var (
27 // The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`
28 IosStateActive = IosStateKey.String("active")
29 // The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`
30 IosStateInactive = IosStateKey.String("inactive")
31 // The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground`
32 IosStateBackground = IosStateKey.String("background")
33 // The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground`
34 IosStateForeground = IosStateKey.String("foreground")
35 // The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`
36 IosStateTerminate = IosStateKey.String("terminate")
37 )
38
39 // This event represents an occurrence of a lifecycle transition on the Android
40 // platform.
41 const (
42 // AndroidStateKey is the attribute Key conforming to the "android.state"
43 // semantic conventions. It represents the this attribute represents the
44 // state the application has transitioned into at the occurrence of the
45 // event.
46 //
47 // Type: Enum
48 // RequirementLevel: Required
49 // Stability: experimental
50 // Note: The Android lifecycle states are defined in [Activity lifecycle
51 // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
52 // and from which the `OS identifiers` are derived.
53 AndroidStateKey = attribute.Key("android.state")
54 )
55
56 var (
57 // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
58 AndroidStateCreated = AndroidStateKey.String("created")
59 // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
60 AndroidStateBackground = AndroidStateKey.String("background")
61 // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
62 AndroidStateForeground = AndroidStateKey.String("foreground")
63 )
64
65 // RPC received/sent message.
66 const (
67 // MessageCompressedSizeKey is the attribute Key conforming to the
68 // "message.compressed_size" semantic conventions. It represents the
69 // compressed size of the message in bytes.
70 //
71 // Type: int
72 // RequirementLevel: Optional
73 // Stability: experimental
74 MessageCompressedSizeKey = attribute.Key("message.compressed_size")
75
76 // MessageIDKey is the attribute Key conforming to the "message.id"
77 // semantic conventions. It represents the mUST be calculated as two
78 // different counters starting from `1` one for sent messages and one for
79 // received message.
80 //
81 // Type: int
82 // RequirementLevel: Optional
83 // Stability: experimental
84 // Note: This way we guarantee that the values will be consistent between
85 // different implementations.
86 MessageIDKey = attribute.Key("message.id")
87
88 // MessageTypeKey is the attribute Key conforming to the "message.type"
89 // semantic conventions. It represents the whether this is a received or
90 // sent message.
91 //
92 // Type: Enum
93 // RequirementLevel: Optional
94 // Stability: experimental
95 MessageTypeKey = attribute.Key("message.type")
96
97 // MessageUncompressedSizeKey is the attribute Key conforming to the
98 // "message.uncompressed_size" semantic conventions. It represents the
99 // uncompressed size of the message in bytes.
100 //
101 // Type: int
102 // RequirementLevel: Optional
103 // Stability: experimental
104 MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
105 )
106
107 var (
108 // sent
109 MessageTypeSent = MessageTypeKey.String("SENT")
110 // received
111 MessageTypeReceived = MessageTypeKey.String("RECEIVED")
112 )
113
114 // MessageCompressedSize returns an attribute KeyValue conforming to the
115 // "message.compressed_size" semantic conventions. It represents the compressed
116 // size of the message in bytes.
117 func MessageCompressedSize(val int) attribute.KeyValue {
118 return MessageCompressedSizeKey.Int(val)
119 }
120
121 // MessageID returns an attribute KeyValue conforming to the "message.id"
122 // semantic conventions. It represents the mUST be calculated as two different
123 // counters starting from `1` one for sent messages and one for received
124 // message.
125 func MessageID(val int) attribute.KeyValue {
126 return MessageIDKey.Int(val)
127 }
128
129 // MessageUncompressedSize returns an attribute KeyValue conforming to the
130 // "message.uncompressed_size" semantic conventions. It represents the
131 // uncompressed size of the message in bytes.
132 func MessageUncompressedSize(val int) attribute.KeyValue {
133 return MessageUncompressedSizeKey.Int(val)
134 }