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