1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3 4 // Package embedded provides interfaces embedded within the [OpenTelemetry
5 // metric API].
6 //
7 // Implementers of the [OpenTelemetry metric API] can embed the relevant type
8 // from this package into their implementation directly. Doing so will result
9 // in a compilation error for users when the [OpenTelemetry metric API] is
10 // extended (which is something that can happen without a major version bump of
11 // the API package).
12 //
13 // [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric
14 package embedded // import "go.opentelemetry.io/otel/metric/embedded"
15 16 // MeterProvider is embedded in
17 // [go.opentelemetry.io/otel/metric.MeterProvider].
18 //
19 // Embed this interface in your implementation of the
20 // [go.opentelemetry.io/otel/metric.MeterProvider] if you want users to
21 // experience a compilation error, signaling they need to update to your latest
22 // implementation, when the [go.opentelemetry.io/otel/metric.MeterProvider]
23 // interface is extended (which is something that can happen without a major
24 // version bump of the API package).
25 type MeterProvider interface{ meterProvider() }
26 27 // Meter is embedded in [go.opentelemetry.io/otel/metric.Meter].
28 //
29 // Embed this interface in your implementation of the
30 // [go.opentelemetry.io/otel/metric.Meter] if you want users to experience a
31 // compilation error, signaling they need to update to your latest
32 // implementation, when the [go.opentelemetry.io/otel/metric.Meter] interface
33 // is extended (which is something that can happen without a major version bump
34 // of the API package).
35 type Meter interface{ meter() }
36 37 // Float64Observer is embedded in
38 // [go.opentelemetry.io/otel/metric.Float64Observer].
39 //
40 // Embed this interface in your implementation of the
41 // [go.opentelemetry.io/otel/metric.Float64Observer] if you want
42 // users to experience a compilation error, signaling they need to update to
43 // your latest implementation, when the
44 // [go.opentelemetry.io/otel/metric.Float64Observer] interface is
45 // extended (which is something that can happen without a major version bump of
46 // the API package).
47 type Float64Observer interface{ float64Observer() }
48 49 // Int64Observer is embedded in
50 // [go.opentelemetry.io/otel/metric.Int64Observer].
51 //
52 // Embed this interface in your implementation of the
53 // [go.opentelemetry.io/otel/metric.Int64Observer] if you want users
54 // to experience a compilation error, signaling they need to update to your
55 // latest implementation, when the
56 // [go.opentelemetry.io/otel/metric.Int64Observer] interface is
57 // extended (which is something that can happen without a major version bump of
58 // the API package).
59 type Int64Observer interface{ int64Observer() }
60 61 // Observer is embedded in [go.opentelemetry.io/otel/metric.Observer].
62 //
63 // Embed this interface in your implementation of the
64 // [go.opentelemetry.io/otel/metric.Observer] if you want users to experience a
65 // compilation error, signaling they need to update to your latest
66 // implementation, when the [go.opentelemetry.io/otel/metric.Observer]
67 // interface is extended (which is something that can happen without a major
68 // version bump of the API package).
69 type Observer interface{ observer() }
70 71 // Registration is embedded in [go.opentelemetry.io/otel/metric.Registration].
72 //
73 // Embed this interface in your implementation of the
74 // [go.opentelemetry.io/otel/metric.Registration] if you want users to
75 // experience a compilation error, signaling they need to update to your latest
76 // implementation, when the [go.opentelemetry.io/otel/metric.Registration]
77 // interface is extended (which is something that can happen without a major
78 // version bump of the API package).
79 type Registration interface{ registration() }
80 81 // Float64Counter is embedded in
82 // [go.opentelemetry.io/otel/metric.Float64Counter].
83 //
84 // Embed this interface in your implementation of the
85 // [go.opentelemetry.io/otel/metric.Float64Counter] if you want
86 // users to experience a compilation error, signaling they need to update to
87 // your latest implementation, when the
88 // [go.opentelemetry.io/otel/metric.Float64Counter] interface is
89 // extended (which is something that can happen without a major version bump of
90 // the API package).
91 type Float64Counter interface{ float64Counter() }
92 93 // Float64Histogram is embedded in
94 // [go.opentelemetry.io/otel/metric.Float64Histogram].
95 //
96 // Embed this interface in your implementation of the
97 // [go.opentelemetry.io/otel/metric.Float64Histogram] if you want
98 // users to experience a compilation error, signaling they need to update to
99 // your latest implementation, when the
100 // [go.opentelemetry.io/otel/metric.Float64Histogram] interface is
101 // extended (which is something that can happen without a major version bump of
102 // the API package).
103 type Float64Histogram interface{ float64Histogram() }
104 105 // Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge].
106 //
107 // Embed this interface in your implementation of the
108 // [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to
109 // experience a compilation error, signaling they need to update to your latest
110 // implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge]
111 // interface is extended (which is something that can happen without a major
112 // version bump of the API package).
113 type Float64Gauge interface{ float64Gauge() }
114 115 // Float64ObservableCounter is embedded in
116 // [go.opentelemetry.io/otel/metric.Float64ObservableCounter].
117 //
118 // Embed this interface in your implementation of the
119 // [go.opentelemetry.io/otel/metric.Float64ObservableCounter] if you
120 // want users to experience a compilation error, signaling they need to update
121 // to your latest implementation, when the
122 // [go.opentelemetry.io/otel/metric.Float64ObservableCounter]
123 // interface is extended (which is something that can happen without a major
124 // version bump of the API package).
125 type Float64ObservableCounter interface{ float64ObservableCounter() }
126 127 // Float64ObservableGauge is embedded in
128 // [go.opentelemetry.io/otel/metric.Float64ObservableGauge].
129 //
130 // Embed this interface in your implementation of the
131 // [go.opentelemetry.io/otel/metric.Float64ObservableGauge] if you
132 // want users to experience a compilation error, signaling they need to update
133 // to your latest implementation, when the
134 // [go.opentelemetry.io/otel/metric.Float64ObservableGauge]
135 // interface is extended (which is something that can happen without a major
136 // version bump of the API package).
137 type Float64ObservableGauge interface{ float64ObservableGauge() }
138 139 // Float64ObservableUpDownCounter is embedded in
140 // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter].
141 //
142 // Embed this interface in your implementation of the
143 // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]
144 // if you want users to experience a compilation error, signaling they need to
145 // update to your latest implementation, when the
146 // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]
147 // interface is extended (which is something that can happen without a major
148 // version bump of the API package).
149 type Float64ObservableUpDownCounter interface{ float64ObservableUpDownCounter() }
150 151 // Float64UpDownCounter is embedded in
152 // [go.opentelemetry.io/otel/metric.Float64UpDownCounter].
153 //
154 // Embed this interface in your implementation of the
155 // [go.opentelemetry.io/otel/metric.Float64UpDownCounter] if you
156 // want users to experience a compilation error, signaling they need to update
157 // to your latest implementation, when the
158 // [go.opentelemetry.io/otel/metric.Float64UpDownCounter] interface
159 // is extended (which is something that can happen without a major version bump
160 // of the API package).
161 type Float64UpDownCounter interface{ float64UpDownCounter() }
162 163 // Int64Counter is embedded in
164 // [go.opentelemetry.io/otel/metric.Int64Counter].
165 //
166 // Embed this interface in your implementation of the
167 // [go.opentelemetry.io/otel/metric.Int64Counter] if you want users
168 // to experience a compilation error, signaling they need to update to your
169 // latest implementation, when the
170 // [go.opentelemetry.io/otel/metric.Int64Counter] interface is
171 // extended (which is something that can happen without a major version bump of
172 // the API package).
173 type Int64Counter interface{ int64Counter() }
174 175 // Int64Histogram is embedded in
176 // [go.opentelemetry.io/otel/metric.Int64Histogram].
177 //
178 // Embed this interface in your implementation of the
179 // [go.opentelemetry.io/otel/metric.Int64Histogram] if you want
180 // users to experience a compilation error, signaling they need to update to
181 // your latest implementation, when the
182 // [go.opentelemetry.io/otel/metric.Int64Histogram] interface is
183 // extended (which is something that can happen without a major version bump of
184 // the API package).
185 type Int64Histogram interface{ int64Histogram() }
186 187 // Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge].
188 //
189 // Embed this interface in your implementation of the
190 // [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience
191 // a compilation error, signaling they need to update to your latest
192 // implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge]
193 // interface is extended (which is something that can happen without a major
194 // version bump of the API package).
195 type Int64Gauge interface{ int64Gauge() }
196 197 // Int64ObservableCounter is embedded in
198 // [go.opentelemetry.io/otel/metric.Int64ObservableCounter].
199 //
200 // Embed this interface in your implementation of the
201 // [go.opentelemetry.io/otel/metric.Int64ObservableCounter] if you
202 // want users to experience a compilation error, signaling they need to update
203 // to your latest implementation, when the
204 // [go.opentelemetry.io/otel/metric.Int64ObservableCounter]
205 // interface is extended (which is something that can happen without a major
206 // version bump of the API package).
207 type Int64ObservableCounter interface{ int64ObservableCounter() }
208 209 // Int64ObservableGauge is embedded in
210 // [go.opentelemetry.io/otel/metric.Int64ObservableGauge].
211 //
212 // Embed this interface in your implementation of the
213 // [go.opentelemetry.io/otel/metric.Int64ObservableGauge] if you
214 // want users to experience a compilation error, signaling they need to update
215 // to your latest implementation, when the
216 // [go.opentelemetry.io/otel/metric.Int64ObservableGauge] interface
217 // is extended (which is something that can happen without a major version bump
218 // of the API package).
219 type Int64ObservableGauge interface{ int64ObservableGauge() }
220 221 // Int64ObservableUpDownCounter is embedded in
222 // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter].
223 //
224 // Embed this interface in your implementation of the
225 // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] if
226 // you want users to experience a compilation error, signaling they need to
227 // update to your latest implementation, when the
228 // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter]
229 // interface is extended (which is something that can happen without a major
230 // version bump of the API package).
231 type Int64ObservableUpDownCounter interface{ int64ObservableUpDownCounter() }
232 233 // Int64UpDownCounter is embedded in
234 // [go.opentelemetry.io/otel/metric.Int64UpDownCounter].
235 //
236 // Embed this interface in your implementation of the
237 // [go.opentelemetry.io/otel/metric.Int64UpDownCounter] if you want
238 // users to experience a compilation error, signaling they need to update to
239 // your latest implementation, when the
240 // [go.opentelemetry.io/otel/metric.Int64UpDownCounter] interface is
241 // extended (which is something that can happen without a major version bump of
242 // the API package).
243 type Int64UpDownCounter interface{ int64UpDownCounter() }
244