Update osbuild/images to v0.40.0
In addition, simplify the SPEC file to not have to update the minimum required osbuild version gazillion times, but just once. Update the minimum required osbuild version to v109, due to changes in grub2 stages required by the new osbuild/images version. Update osbild SHA in Schutzfile to v109. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
c138ea6939
commit
2f087f1a6c
190 changed files with 57031 additions and 52810 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/metric"
|
||||
"go.opentelemetry.io/otel/metric/noop"
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
|
@ -89,6 +90,9 @@ func newConfig(opts []Option, role string) *config {
|
|||
metric.WithUnit("ms"))
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
if c.rpcDuration == nil {
|
||||
c.rpcDuration = noop.Float64Histogram{}
|
||||
}
|
||||
}
|
||||
|
||||
c.rpcRequestSize, err = c.meter.Int64Histogram("rpc."+role+".request.size",
|
||||
|
|
@ -96,6 +100,9 @@ func newConfig(opts []Option, role string) *config {
|
|||
metric.WithUnit("By"))
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
if c.rpcRequestSize == nil {
|
||||
c.rpcRequestSize = noop.Int64Histogram{}
|
||||
}
|
||||
}
|
||||
|
||||
c.rpcResponseSize, err = c.meter.Int64Histogram("rpc."+role+".response.size",
|
||||
|
|
@ -103,6 +110,9 @@ func newConfig(opts []Option, role string) *config {
|
|||
metric.WithUnit("By"))
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
if c.rpcResponseSize == nil {
|
||||
c.rpcResponseSize = noop.Int64Histogram{}
|
||||
}
|
||||
}
|
||||
|
||||
c.rpcRequestsPerRPC, err = c.meter.Int64Histogram("rpc."+role+".requests_per_rpc",
|
||||
|
|
@ -110,6 +120,9 @@ func newConfig(opts []Option, role string) *config {
|
|||
metric.WithUnit("{count}"))
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
if c.rpcRequestsPerRPC == nil {
|
||||
c.rpcRequestsPerRPC = noop.Int64Histogram{}
|
||||
}
|
||||
}
|
||||
|
||||
c.rpcResponsesPerRPC, err = c.meter.Int64Histogram("rpc."+role+".responses_per_rpc",
|
||||
|
|
@ -117,6 +130,9 @@ func newConfig(opts []Option, role string) *config {
|
|||
metric.WithUnit("{count}"))
|
||||
if err != nil {
|
||||
otel.Handle(err)
|
||||
if c.rpcResponsesPerRPC == nil {
|
||||
c.rpcResponsesPerRPC = noop.Int64Histogram{}
|
||||
}
|
||||
}
|
||||
|
||||
return c
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import (
|
|||
"time"
|
||||
|
||||
grpc_codes "google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/peer"
|
||||
"google.golang.org/grpc/stats"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
|
|
@ -179,6 +180,10 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool
|
|||
)
|
||||
}
|
||||
case *stats.OutTrailer:
|
||||
case *stats.OutHeader:
|
||||
if p, ok := peer.FromContext(ctx); ok {
|
||||
span.SetAttributes(peerAttr(p.Addr.String())...)
|
||||
}
|
||||
case *stats.End:
|
||||
var rpcStatusAttr attribute.KeyValue
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g
|
|||
|
||||
// Version is the current release version of the gRPC instrumentation.
|
||||
func Version() string {
|
||||
return "0.47.0"
|
||||
return "0.48.0"
|
||||
// This string is updated by the pre_release.sh script during release
|
||||
}
|
||||
|
||||
|
|
|
|||
20
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
generated
vendored
20
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
generated
vendored
|
|
@ -31,10 +31,24 @@ const (
|
|||
|
||||
// Server HTTP metrics.
|
||||
const (
|
||||
RequestCount = "http.server.request_count" // Incoming request count total
|
||||
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
|
||||
// Deprecated: This field is unused.
|
||||
RequestCount = "http.server.request_count" // Incoming request count total
|
||||
// Deprecated: Use of this field has been migrated to serverRequestSize. It will be removed in a future version.
|
||||
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
|
||||
// Deprecated: Use of this field has been migrated to serverResponseSize. It will be removed in a future version.
|
||||
ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total
|
||||
ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||
// Deprecated: Use of this field has been migrated to serverDuration. It will be removed in a future version.
|
||||
ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||
serverRequestSize = "http.server.request.size" // Incoming request bytes total
|
||||
serverResponseSize = "http.server.response.size" // Incoming response bytes total
|
||||
serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||
)
|
||||
|
||||
// Client HTTP metrics.
|
||||
const (
|
||||
clientRequestSize = "http.client.request.size" // Outgoing request bytes total
|
||||
clientResponseSize = "http.client.response.size" // Outgoing response bytes total
|
||||
clientDuration = "http.client.duration" // Outgoing end to end duration, milliseconds
|
||||
)
|
||||
|
||||
// Filter is a predicate used to determine whether a given http.request should
|
||||
|
|
|
|||
12
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
12
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
|
|
@ -108,23 +108,23 @@ func handleErr(err error) {
|
|||
func (h *middleware) createMeasures() {
|
||||
var err error
|
||||
h.requestBytesCounter, err = h.meter.Int64Counter(
|
||||
RequestContentLength,
|
||||
serverRequestSize,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP request content length (uncompressed)"),
|
||||
metric.WithDescription("Measures the size of HTTP request messages."),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
h.responseBytesCounter, err = h.meter.Int64Counter(
|
||||
ResponseContentLength,
|
||||
serverResponseSize,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP response content length (uncompressed)"),
|
||||
metric.WithDescription("Measures the size of HTTP response messages."),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
h.serverLatencyMeasure, err = h.meter.Float64Histogram(
|
||||
ServerLatency,
|
||||
serverDuration,
|
||||
metric.WithUnit("ms"),
|
||||
metric.WithDescription("Measures the duration of HTTP request handling"),
|
||||
metric.WithDescription("Measures the duration of inbound HTTP requests."),
|
||||
)
|
||||
handleErr(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,14 @@ func HTTPClientRequest(req *http.Request) []attribute.KeyValue {
|
|||
return hc.ClientRequest(req)
|
||||
}
|
||||
|
||||
// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client.
|
||||
// The following attributes are always returned: "http.method", "net.peer.name".
|
||||
// The following attributes are returned if the
|
||||
// related values are defined in req: "net.peer.port".
|
||||
func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue {
|
||||
return hc.ClientRequestMetrics(req)
|
||||
}
|
||||
|
||||
// HTTPClientStatus returns a span status code and message for an HTTP status code
|
||||
// value received by a client.
|
||||
func HTTPClientStatus(code int) (codes.Code, string) {
|
||||
|
|
@ -114,36 +122,6 @@ func HTTPServerStatus(code int) (codes.Code, string) {
|
|||
return hc.ServerStatus(code)
|
||||
}
|
||||
|
||||
// HTTPRequestHeader returns the contents of h as attributes.
|
||||
//
|
||||
// Instrumentation should require an explicit configuration of which headers to
|
||||
// captured and then prune what they pass here. Including all headers can be a
|
||||
// security risk - explicit configuration helps avoid leaking sensitive
|
||||
// information.
|
||||
//
|
||||
// The User-Agent header is already captured in the http.user_agent attribute
|
||||
// from ClientRequest and ServerRequest. Instrumentation may provide an option
|
||||
// to capture that header here even though it is not recommended. Otherwise,
|
||||
// instrumentation should filter that out of what is passed.
|
||||
func HTTPRequestHeader(h http.Header) []attribute.KeyValue {
|
||||
return hc.RequestHeader(h)
|
||||
}
|
||||
|
||||
// HTTPResponseHeader returns the contents of h as attributes.
|
||||
//
|
||||
// Instrumentation should require an explicit configuration of which headers to
|
||||
// captured and then prune what they pass here. Including all headers can be a
|
||||
// security risk - explicit configuration helps avoid leaking sensitive
|
||||
// information.
|
||||
//
|
||||
// The User-Agent header is already captured in the http.user_agent attribute
|
||||
// from ClientRequest and ServerRequest. Instrumentation may provide an option
|
||||
// to capture that header here even though it is not recommended. Otherwise,
|
||||
// instrumentation should filter that out of what is passed.
|
||||
func HTTPResponseHeader(h http.Header) []attribute.KeyValue {
|
||||
return hc.ResponseHeader(h)
|
||||
}
|
||||
|
||||
// httpConv are the HTTP semantic convention attributes defined for a version
|
||||
// of the OpenTelemetry specification.
|
||||
type httpConv struct {
|
||||
|
|
@ -286,6 +264,38 @@ func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
|||
return attrs
|
||||
}
|
||||
|
||||
// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The
|
||||
// following attributes are always returned: "http.method", "net.peer.name".
|
||||
// The following attributes are returned if the related values
|
||||
// are defined in req: "net.peer.port".
|
||||
func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue {
|
||||
/* The following semantic conventions are returned if present:
|
||||
http.method string
|
||||
net.peer.name string
|
||||
net.peer.port int
|
||||
*/
|
||||
|
||||
n := 2 // method, peer name.
|
||||
var h string
|
||||
if req.URL != nil {
|
||||
h = req.URL.Host
|
||||
}
|
||||
peer, p := firstHostPort(h, req.Header.Get("Host"))
|
||||
port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p)
|
||||
if port > 0 {
|
||||
n++
|
||||
}
|
||||
|
||||
attrs := make([]attribute.KeyValue, 0, n)
|
||||
attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer))
|
||||
|
||||
if port > 0 {
|
||||
attrs = append(attrs, c.NetConv.PeerPort(port))
|
||||
}
|
||||
|
||||
return attrs
|
||||
}
|
||||
|
||||
// ServerRequest returns attributes for an HTTP request received by a server.
|
||||
//
|
||||
// The server must be the primary server name if it is known. For example this
|
||||
|
|
@ -551,31 +561,6 @@ func firstHostPort(source ...string) (host string, port int) {
|
|||
return
|
||||
}
|
||||
|
||||
// RequestHeader returns the contents of h as OpenTelemetry attributes.
|
||||
func (c *httpConv) RequestHeader(h http.Header) []attribute.KeyValue {
|
||||
return c.header("http.request.header", h)
|
||||
}
|
||||
|
||||
// ResponseHeader returns the contents of h as OpenTelemetry attributes.
|
||||
func (c *httpConv) ResponseHeader(h http.Header) []attribute.KeyValue {
|
||||
return c.header("http.response.header", h)
|
||||
}
|
||||
|
||||
func (c *httpConv) header(prefix string, h http.Header) []attribute.KeyValue {
|
||||
key := func(k string) attribute.Key {
|
||||
k = strings.ToLower(k)
|
||||
k = strings.ReplaceAll(k, "-", "_")
|
||||
k = fmt.Sprintf("%s.%s", prefix, k)
|
||||
return attribute.Key(k)
|
||||
}
|
||||
|
||||
attrs := make([]attribute.KeyValue, 0, len(h))
|
||||
for k, v := range h {
|
||||
attrs = append(attrs, key(k).StringSlice(v))
|
||||
}
|
||||
return attrs
|
||||
}
|
||||
|
||||
// ClientStatus returns a span status code and message for an HTTP status code
|
||||
// value received by a client.
|
||||
func (c *httpConv) ClientStatus(code int) (codes.Code, string) {
|
||||
|
|
|
|||
|
|
@ -32,24 +32,6 @@ func NetTransport(network string) attribute.KeyValue {
|
|||
return nc.Transport(network)
|
||||
}
|
||||
|
||||
// NetClient returns trace attributes for a client network connection to address.
|
||||
// See net.Dial for information about acceptable address values, address should
|
||||
// be the same as the one used to create conn. If conn is nil, only network
|
||||
// peer attributes will be returned that describe address. Otherwise, the
|
||||
// socket level information about conn will also be included.
|
||||
func NetClient(address string, conn net.Conn) []attribute.KeyValue {
|
||||
return nc.Client(address, conn)
|
||||
}
|
||||
|
||||
// NetServer returns trace attributes for a network listener listening at address.
|
||||
// See net.Listen for information about acceptable address values, address
|
||||
// should be the same as the one used to create ln. If ln is nil, only network
|
||||
// host attributes will be returned that describe address. Otherwise, the
|
||||
// socket level information about ln will also be included.
|
||||
func NetServer(address string, ln net.Listener) []attribute.KeyValue {
|
||||
return nc.Server(address, ln)
|
||||
}
|
||||
|
||||
// netConv are the network semantic convention attributes defined for a version
|
||||
// of the OpenTelemetry specification.
|
||||
type netConv struct {
|
||||
|
|
@ -125,52 +107,6 @@ func (c *netConv) Host(address string) []attribute.KeyValue {
|
|||
return attrs
|
||||
}
|
||||
|
||||
// Server returns attributes for a network listener listening at address. See
|
||||
// net.Listen for information about acceptable address values, address should
|
||||
// be the same as the one used to create ln. If ln is nil, only network host
|
||||
// attributes will be returned that describe address. Otherwise, the socket
|
||||
// level information about ln will also be included.
|
||||
func (c *netConv) Server(address string, ln net.Listener) []attribute.KeyValue {
|
||||
if ln == nil {
|
||||
return c.Host(address)
|
||||
}
|
||||
|
||||
lAddr := ln.Addr()
|
||||
if lAddr == nil {
|
||||
return c.Host(address)
|
||||
}
|
||||
|
||||
hostName, hostPort := splitHostPort(address)
|
||||
sockHostAddr, sockHostPort := splitHostPort(lAddr.String())
|
||||
network := lAddr.Network()
|
||||
sockFamily := family(network, sockHostAddr)
|
||||
|
||||
n := nonZeroStr(hostName, network, sockHostAddr, sockFamily)
|
||||
n += positiveInt(hostPort, sockHostPort)
|
||||
attr := make([]attribute.KeyValue, 0, n)
|
||||
if hostName != "" {
|
||||
attr = append(attr, c.HostName(hostName))
|
||||
if hostPort > 0 {
|
||||
// Only if net.host.name is set should net.host.port be.
|
||||
attr = append(attr, c.HostPort(hostPort))
|
||||
}
|
||||
}
|
||||
if network != "" {
|
||||
attr = append(attr, c.Transport(network))
|
||||
}
|
||||
if sockFamily != "" {
|
||||
attr = append(attr, c.NetSockFamilyKey.String(sockFamily))
|
||||
}
|
||||
if sockHostAddr != "" {
|
||||
attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr))
|
||||
if sockHostPort > 0 {
|
||||
// Only if net.sock.host.addr is set should net.sock.host.port be.
|
||||
attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort))
|
||||
}
|
||||
}
|
||||
return attr
|
||||
}
|
||||
|
||||
func (c *netConv) HostName(name string) attribute.KeyValue {
|
||||
return c.NetHostNameKey.String(name)
|
||||
}
|
||||
|
|
@ -179,85 +115,6 @@ func (c *netConv) HostPort(port int) attribute.KeyValue {
|
|||
return c.NetHostPortKey.Int(port)
|
||||
}
|
||||
|
||||
// Client returns attributes for a client network connection to address. See
|
||||
// net.Dial for information about acceptable address values, address should be
|
||||
// the same as the one used to create conn. If conn is nil, only network peer
|
||||
// attributes will be returned that describe address. Otherwise, the socket
|
||||
// level information about conn will also be included.
|
||||
func (c *netConv) Client(address string, conn net.Conn) []attribute.KeyValue {
|
||||
if conn == nil {
|
||||
return c.Peer(address)
|
||||
}
|
||||
|
||||
lAddr, rAddr := conn.LocalAddr(), conn.RemoteAddr()
|
||||
|
||||
var network string
|
||||
switch {
|
||||
case lAddr != nil:
|
||||
network = lAddr.Network()
|
||||
case rAddr != nil:
|
||||
network = rAddr.Network()
|
||||
default:
|
||||
return c.Peer(address)
|
||||
}
|
||||
|
||||
peerName, peerPort := splitHostPort(address)
|
||||
var (
|
||||
sockFamily string
|
||||
sockPeerAddr string
|
||||
sockPeerPort int
|
||||
sockHostAddr string
|
||||
sockHostPort int
|
||||
)
|
||||
|
||||
if lAddr != nil {
|
||||
sockHostAddr, sockHostPort = splitHostPort(lAddr.String())
|
||||
}
|
||||
|
||||
if rAddr != nil {
|
||||
sockPeerAddr, sockPeerPort = splitHostPort(rAddr.String())
|
||||
}
|
||||
|
||||
switch {
|
||||
case sockHostAddr != "":
|
||||
sockFamily = family(network, sockHostAddr)
|
||||
case sockPeerAddr != "":
|
||||
sockFamily = family(network, sockPeerAddr)
|
||||
}
|
||||
|
||||
n := nonZeroStr(peerName, network, sockPeerAddr, sockHostAddr, sockFamily)
|
||||
n += positiveInt(peerPort, sockPeerPort, sockHostPort)
|
||||
attr := make([]attribute.KeyValue, 0, n)
|
||||
if peerName != "" {
|
||||
attr = append(attr, c.PeerName(peerName))
|
||||
if peerPort > 0 {
|
||||
// Only if net.peer.name is set should net.peer.port be.
|
||||
attr = append(attr, c.PeerPort(peerPort))
|
||||
}
|
||||
}
|
||||
if network != "" {
|
||||
attr = append(attr, c.Transport(network))
|
||||
}
|
||||
if sockFamily != "" {
|
||||
attr = append(attr, c.NetSockFamilyKey.String(sockFamily))
|
||||
}
|
||||
if sockPeerAddr != "" {
|
||||
attr = append(attr, c.NetSockPeerAddrKey.String(sockPeerAddr))
|
||||
if sockPeerPort > 0 {
|
||||
// Only if net.sock.peer.addr is set should net.sock.peer.port be.
|
||||
attr = append(attr, c.NetSockPeerPortKey.Int(sockPeerPort))
|
||||
}
|
||||
}
|
||||
if sockHostAddr != "" {
|
||||
attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr))
|
||||
if sockHostPort > 0 {
|
||||
// Only if net.sock.host.addr is set should net.sock.host.port be.
|
||||
attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort))
|
||||
}
|
||||
}
|
||||
return attr
|
||||
}
|
||||
|
||||
func family(network, address string) string {
|
||||
switch network {
|
||||
case "unix", "unixgram", "unixpacket":
|
||||
|
|
@ -273,26 +130,6 @@ func family(network, address string) string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func nonZeroStr(strs ...string) int {
|
||||
var n int
|
||||
for _, str := range strs {
|
||||
if str != "" {
|
||||
n++
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func positiveInt(ints ...int) int {
|
||||
var n int
|
||||
for _, i := range ints {
|
||||
if i > 0 {
|
||||
n++
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// Peer returns attributes for a network peer address.
|
||||
func (c *netConv) Peer(address string) []attribute.KeyValue {
|
||||
h, p := splitHostPort(address)
|
||||
|
|
|
|||
109
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
generated
vendored
109
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
generated
vendored
|
|
@ -19,31 +19,43 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
"net/http/httptrace"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"go.opentelemetry.io/otel/metric"
|
||||
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||
)
|
||||
|
||||
// Transport implements the http.RoundTripper interface and wraps
|
||||
// outbound HTTP(S) requests with a span.
|
||||
// outbound HTTP(S) requests with a span and enriches it with metrics.
|
||||
type Transport struct {
|
||||
rt http.RoundTripper
|
||||
|
||||
tracer trace.Tracer
|
||||
meter metric.Meter
|
||||
propagators propagation.TextMapPropagator
|
||||
spanStartOptions []trace.SpanStartOption
|
||||
filters []Filter
|
||||
spanNameFormatter func(string, *http.Request) string
|
||||
clientTrace func(context.Context) *httptrace.ClientTrace
|
||||
|
||||
requestBytesCounter metric.Int64Counter
|
||||
responseBytesCounter metric.Int64Counter
|
||||
latencyMeasure metric.Float64Histogram
|
||||
}
|
||||
|
||||
var _ http.RoundTripper = &Transport{}
|
||||
|
||||
// NewTransport wraps the provided http.RoundTripper with one that
|
||||
// starts a span and injects the span context into the outbound request headers.
|
||||
// starts a span, injects the span context into the outbound request headers,
|
||||
// and enriches it with metrics.
|
||||
//
|
||||
// If the provided http.RoundTripper is nil, http.DefaultTransport will be used
|
||||
// as the base http.RoundTripper.
|
||||
|
|
@ -63,12 +75,14 @@ func NewTransport(base http.RoundTripper, opts ...Option) *Transport {
|
|||
|
||||
c := newConfig(append(defaultOpts, opts...)...)
|
||||
t.applyConfig(c)
|
||||
t.createMeasures()
|
||||
|
||||
return &t
|
||||
}
|
||||
|
||||
func (t *Transport) applyConfig(c *config) {
|
||||
t.tracer = c.Tracer
|
||||
t.meter = c.Meter
|
||||
t.propagators = c.Propagators
|
||||
t.spanStartOptions = c.SpanStartOptions
|
||||
t.filters = c.Filters
|
||||
|
|
@ -76,6 +90,30 @@ func (t *Transport) applyConfig(c *config) {
|
|||
t.clientTrace = c.ClientTrace
|
||||
}
|
||||
|
||||
func (t *Transport) createMeasures() {
|
||||
var err error
|
||||
t.requestBytesCounter, err = t.meter.Int64Counter(
|
||||
clientRequestSize,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP request messages."),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
t.responseBytesCounter, err = t.meter.Int64Counter(
|
||||
clientResponseSize,
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Measures the size of HTTP response messages."),
|
||||
)
|
||||
handleErr(err)
|
||||
|
||||
t.latencyMeasure, err = t.meter.Float64Histogram(
|
||||
clientDuration,
|
||||
metric.WithUnit("ms"),
|
||||
metric.WithDescription("Measures the duration of outbound HTTP requests."),
|
||||
)
|
||||
handleErr(err)
|
||||
}
|
||||
|
||||
func defaultTransportFormatter(_ string, r *http.Request) string {
|
||||
return "HTTP " + r.Method
|
||||
}
|
||||
|
|
@ -84,6 +122,7 @@ func defaultTransportFormatter(_ string, r *http.Request) string {
|
|||
// before handing the request to the configured base RoundTripper. The created span will
|
||||
// end when the response body is closed or when a read from the body returns io.EOF.
|
||||
func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||
requestStartTime := time.Now()
|
||||
for _, f := range t.filters {
|
||||
if !f(r) {
|
||||
// Simply pass through to the base RoundTripper if a filter rejects the request
|
||||
|
|
@ -109,7 +148,23 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||
ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx))
|
||||
}
|
||||
|
||||
labeler := &Labeler{}
|
||||
ctx = injectLabeler(ctx, labeler)
|
||||
|
||||
r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request.
|
||||
|
||||
// use a body wrapper to determine the request size
|
||||
var bw bodyWrapper
|
||||
// if request body is nil or NoBody, we don't want to mutate the body as it
|
||||
// will affect the identity of it in an unforeseeable way because we assert
|
||||
// ReadCloser fulfills a certain interface and it is indeed nil or NoBody.
|
||||
if r.Body != nil && r.Body != http.NoBody {
|
||||
bw.ReadCloser = r.Body
|
||||
// noop to prevent nil panic. not using this record fun yet.
|
||||
bw.record = func(int64) {}
|
||||
r.Body = &bw
|
||||
}
|
||||
|
||||
span.SetAttributes(semconvutil.HTTPClientRequest(r)...)
|
||||
t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
|
||||
|
||||
|
|
@ -121,9 +176,28 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||
return res, err
|
||||
}
|
||||
|
||||
// metrics
|
||||
metricAttrs := append(labeler.Get(), semconvutil.HTTPClientRequestMetrics(r)...)
|
||||
if res.StatusCode > 0 {
|
||||
metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode))
|
||||
}
|
||||
o := metric.WithAttributes(metricAttrs...)
|
||||
t.requestBytesCounter.Add(ctx, bw.read, o)
|
||||
// For handling response bytes we leverage a callback when the client reads the http response
|
||||
readRecordFunc := func(n int64) {
|
||||
t.responseBytesCounter.Add(ctx, n, o)
|
||||
}
|
||||
|
||||
// traces
|
||||
span.SetAttributes(semconvutil.HTTPClientResponse(res)...)
|
||||
span.SetStatus(semconvutil.HTTPClientStatus(res.StatusCode))
|
||||
res.Body = newWrappedBody(span, res.Body)
|
||||
|
||||
res.Body = newWrappedBody(span, readRecordFunc, res.Body)
|
||||
|
||||
// Use floating point division here for higher precision (instead of Millisecond method).
|
||||
elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)
|
||||
|
||||
t.latencyMeasure.Record(ctx, elapsedTime, o)
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
|
@ -131,17 +205,17 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||
// newWrappedBody returns a new and appropriately scoped *wrappedBody as an
|
||||
// io.ReadCloser. If the passed body implements io.Writer, the returned value
|
||||
// will implement io.ReadWriteCloser.
|
||||
func newWrappedBody(span trace.Span, body io.ReadCloser) io.ReadCloser {
|
||||
func newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser {
|
||||
// The successful protocol switch responses will have a body that
|
||||
// implement an io.ReadWriteCloser. Ensure this interface type continues
|
||||
// to be satisfied if that is the case.
|
||||
if _, ok := body.(io.ReadWriteCloser); ok {
|
||||
return &wrappedBody{span: span, body: body}
|
||||
return &wrappedBody{span: span, record: record, body: body}
|
||||
}
|
||||
|
||||
// Remove the implementation of the io.ReadWriteCloser and only implement
|
||||
// the io.ReadCloser.
|
||||
return struct{ io.ReadCloser }{&wrappedBody{span: span, body: body}}
|
||||
return struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}}
|
||||
}
|
||||
|
||||
// wrappedBody is the response body type returned by the transport
|
||||
|
|
@ -153,8 +227,11 @@ func newWrappedBody(span trace.Span, body io.ReadCloser) io.ReadCloser {
|
|||
// If the response body implements the io.Writer interface (i.e. for
|
||||
// successful protocol switches), the wrapped body also will.
|
||||
type wrappedBody struct {
|
||||
span trace.Span
|
||||
body io.ReadCloser
|
||||
span trace.Span
|
||||
recorded atomic.Bool
|
||||
record func(n int64)
|
||||
body io.ReadCloser
|
||||
read atomic.Int64
|
||||
}
|
||||
|
||||
var _ io.ReadWriteCloser = &wrappedBody{}
|
||||
|
|
@ -171,11 +248,14 @@ func (wb *wrappedBody) Write(p []byte) (int, error) {
|
|||
|
||||
func (wb *wrappedBody) Read(b []byte) (int, error) {
|
||||
n, err := wb.body.Read(b)
|
||||
// Record the number of bytes read
|
||||
wb.read.Add(int64(n))
|
||||
|
||||
switch err {
|
||||
case nil:
|
||||
// nothing to do here but fall through to the return
|
||||
case io.EOF:
|
||||
wb.recordBytesRead()
|
||||
wb.span.End()
|
||||
default:
|
||||
wb.span.RecordError(err)
|
||||
|
|
@ -184,7 +264,20 @@ func (wb *wrappedBody) Read(b []byte) (int, error) {
|
|||
return n, err
|
||||
}
|
||||
|
||||
// recordBytesRead is a function that ensures the number of bytes read is recorded once and only once.
|
||||
func (wb *wrappedBody) recordBytesRead() {
|
||||
// note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that
|
||||
// two goroutines are racing to call this method, the number of bytes read will no longer increase. Using
|
||||
// CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish
|
||||
// calling wb.record(wb.read.Load()).
|
||||
if wb.recorded.CompareAndSwap(false, true) {
|
||||
// Record the total number of bytes read
|
||||
wb.record(wb.read.Load())
|
||||
}
|
||||
}
|
||||
|
||||
func (wb *wrappedBody) Close() error {
|
||||
wb.recordBytesRead()
|
||||
wb.span.End()
|
||||
if wb.body != nil {
|
||||
return wb.body.Close()
|
||||
|
|
|
|||
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
|
|
@ -16,7 +16,7 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http
|
|||
|
||||
// Version is the current release version of the otelhttp instrumentation.
|
||||
func Version() string {
|
||||
return "0.47.0"
|
||||
return "0.48.0"
|
||||
// This string is updated by the pre_release.sh script during release
|
||||
}
|
||||
|
||||
|
|
|
|||
54
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
54
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
|
|
@ -8,6 +8,54 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.23.0] 2024-02-06
|
||||
|
||||
This release contains the first stable, `v1`, release of the following modules:
|
||||
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus`
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus/test`
|
||||
- `go.opentelemetry.io/otel/example/opencensus`
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
|
||||
- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
|
||||
|
||||
See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
|
||||
|
||||
### Added
|
||||
|
||||
- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808)
|
||||
- Experimental exemplar exporting is added to the metric SDK.
|
||||
See [metric documentation](./sdk/metric/EXPERIMENTAL.md#exemplars) for more information about this feature and how to enable it. (#4871)
|
||||
- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`.
|
||||
This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876)
|
||||
|
||||
### Changed
|
||||
|
||||
- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict.
|
||||
Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned.
|
||||
It is up to the user to decide if they want to use the returned `Resource` or not.
|
||||
It may have desired attributes overwritten or include stale semantic conventions. (#4876)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449)
|
||||
- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820)
|
||||
- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827)
|
||||
|
||||
## [1.23.0-rc.1] 2024-01-18
|
||||
|
||||
This is a release candidate for the v1.23.0 release.
|
||||
That release is expected to include the `v1` release of the following modules:
|
||||
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus`
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus/test`
|
||||
- `go.opentelemetry.io/otel/example/opencensus`
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
|
||||
- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
|
||||
|
||||
See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
|
||||
|
||||
## [1.22.0/0.45.0] 2024-01-17
|
||||
|
||||
### Added
|
||||
|
|
@ -28,7 +76,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
### Changed
|
||||
|
||||
- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754)
|
||||
- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.19.0` version of the OpenTelemetry specification. (#4754)
|
||||
- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754)
|
||||
- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`.
|
||||
If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671)
|
||||
- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722)
|
||||
|
|
@ -2775,7 +2823,9 @@ It contains api and sdk for trace and meter.
|
|||
- CircleCI build CI manifest files.
|
||||
- CODEOWNERS file to track owners of this project.
|
||||
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.22.0...HEAD
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.0...HEAD
|
||||
[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0
|
||||
[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1
|
||||
[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0
|
||||
[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
|
||||
[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
|
||||
|
|
|
|||
2
vendor/go.opentelemetry.io/otel/CODEOWNERS
generated
vendored
2
vendor/go.opentelemetry.io/otel/CODEOWNERS
generated
vendored
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
* @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu
|
||||
|
||||
CODEOWNERS @MrAlias @MadVikingGod @pellared
|
||||
CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole
|
||||
2
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
2
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
|
|
@ -617,13 +617,13 @@ should be canceled.
|
|||
|
||||
- [Evan Torrie](https://github.com/evantorrie), Verizon Media
|
||||
- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics
|
||||
- [David Ashpole](https://github.com/dashpole), Google
|
||||
- [Chester Cheung](https://github.com/hanyuancheung), Tencent
|
||||
- [Damien Mathieu](https://github.com/dmathieu), Elastic
|
||||
- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
|
||||
|
||||
### Maintainers
|
||||
|
||||
- [David Ashpole](https://github.com/dashpole), Google
|
||||
- [Aaron Clawson](https://github.com/MadVikingGod), LightStep
|
||||
- [Robert Pająk](https://github.com/pellared), Splunk
|
||||
- [Tyler Yahn](https://github.com/MrAlias), Splunk
|
||||
|
|
|
|||
2
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
|
|
@ -427,7 +427,7 @@ func (l *Set) MarshalJSON() ([]byte, error) {
|
|||
return json.Marshal(l.equivalent.iface)
|
||||
}
|
||||
|
||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
||||
// MarshalLog is the marshaling function used by the logging system to represent this Set.
|
||||
func (l Set) MarshalLog() interface{} {
|
||||
kvs := make(map[string]string)
|
||||
for _, kv := range l.ToSlice() {
|
||||
|
|
|
|||
264
vendor/go.opentelemetry.io/otel/metric/noop/noop.go
generated
vendored
Normal file
264
vendor/go.opentelemetry.io/otel/metric/noop/noop.go
generated
vendored
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package noop provides an implementation of the OpenTelemetry metric API that
|
||||
// produces no telemetry and minimizes used computation resources.
|
||||
//
|
||||
// Using this package to implement the OpenTelemetry metric API will
|
||||
// effectively disable OpenTelemetry.
|
||||
//
|
||||
// This implementation can be embedded in other implementations of the
|
||||
// OpenTelemetry metric API. Doing so will mean the implementation defaults to
|
||||
// no operation for methods it does not implement.
|
||||
package noop // import "go.opentelemetry.io/otel/metric/noop"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.opentelemetry.io/otel/metric"
|
||||
"go.opentelemetry.io/otel/metric/embedded"
|
||||
)
|
||||
|
||||
var (
|
||||
// Compile-time check this implements the OpenTelemetry API.
|
||||
|
||||
_ metric.MeterProvider = MeterProvider{}
|
||||
_ metric.Meter = Meter{}
|
||||
_ metric.Observer = Observer{}
|
||||
_ metric.Registration = Registration{}
|
||||
_ metric.Int64Counter = Int64Counter{}
|
||||
_ metric.Float64Counter = Float64Counter{}
|
||||
_ metric.Int64UpDownCounter = Int64UpDownCounter{}
|
||||
_ metric.Float64UpDownCounter = Float64UpDownCounter{}
|
||||
_ metric.Int64Histogram = Int64Histogram{}
|
||||
_ metric.Float64Histogram = Float64Histogram{}
|
||||
_ metric.Int64ObservableCounter = Int64ObservableCounter{}
|
||||
_ metric.Float64ObservableCounter = Float64ObservableCounter{}
|
||||
_ metric.Int64ObservableGauge = Int64ObservableGauge{}
|
||||
_ metric.Float64ObservableGauge = Float64ObservableGauge{}
|
||||
_ metric.Int64ObservableUpDownCounter = Int64ObservableUpDownCounter{}
|
||||
_ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{}
|
||||
_ metric.Int64Observer = Int64Observer{}
|
||||
_ metric.Float64Observer = Float64Observer{}
|
||||
)
|
||||
|
||||
// MeterProvider is an OpenTelemetry No-Op MeterProvider.
|
||||
type MeterProvider struct{ embedded.MeterProvider }
|
||||
|
||||
// NewMeterProvider returns a MeterProvider that does not record any telemetry.
|
||||
func NewMeterProvider() MeterProvider {
|
||||
return MeterProvider{}
|
||||
}
|
||||
|
||||
// Meter returns an OpenTelemetry Meter that does not record any telemetry.
|
||||
func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter {
|
||||
return Meter{}
|
||||
}
|
||||
|
||||
// Meter is an OpenTelemetry No-Op Meter.
|
||||
type Meter struct{ embedded.Meter }
|
||||
|
||||
// Int64Counter returns a Counter used to record int64 measurements that
|
||||
// produces no telemetry.
|
||||
func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) {
|
||||
return Int64Counter{}, nil
|
||||
}
|
||||
|
||||
// Int64UpDownCounter returns an UpDownCounter used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) {
|
||||
return Int64UpDownCounter{}, nil
|
||||
}
|
||||
|
||||
// Int64Histogram returns a Histogram used to record int64 measurements that
|
||||
// produces no telemetry.
|
||||
func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {
|
||||
return Int64Histogram{}, nil
|
||||
}
|
||||
|
||||
// Int64ObservableCounter returns an ObservableCounter used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) {
|
||||
return Int64ObservableCounter{}, nil
|
||||
}
|
||||
|
||||
// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to
|
||||
// record int64 measurements that produces no telemetry.
|
||||
func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) {
|
||||
return Int64ObservableUpDownCounter{}, nil
|
||||
}
|
||||
|
||||
// Int64ObservableGauge returns an ObservableGauge used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) {
|
||||
return Int64ObservableGauge{}, nil
|
||||
}
|
||||
|
||||
// Float64Counter returns a Counter used to record int64 measurements that
|
||||
// produces no telemetry.
|
||||
func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) {
|
||||
return Float64Counter{}, nil
|
||||
}
|
||||
|
||||
// Float64UpDownCounter returns an UpDownCounter used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) {
|
||||
return Float64UpDownCounter{}, nil
|
||||
}
|
||||
|
||||
// Float64Histogram returns a Histogram used to record int64 measurements that
|
||||
// produces no telemetry.
|
||||
func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {
|
||||
return Float64Histogram{}, nil
|
||||
}
|
||||
|
||||
// Float64ObservableCounter returns an ObservableCounter used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) {
|
||||
return Float64ObservableCounter{}, nil
|
||||
}
|
||||
|
||||
// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to
|
||||
// record int64 measurements that produces no telemetry.
|
||||
func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) {
|
||||
return Float64ObservableUpDownCounter{}, nil
|
||||
}
|
||||
|
||||
// Float64ObservableGauge returns an ObservableGauge used to record int64
|
||||
// measurements that produces no telemetry.
|
||||
func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) {
|
||||
return Float64ObservableGauge{}, nil
|
||||
}
|
||||
|
||||
// RegisterCallback performs no operation.
|
||||
func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) {
|
||||
return Registration{}, nil
|
||||
}
|
||||
|
||||
// Observer acts as a recorder of measurements for multiple instruments in a
|
||||
// Callback, it performing no operation.
|
||||
type Observer struct{ embedded.Observer }
|
||||
|
||||
// ObserveFloat64 performs no operation.
|
||||
func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) {
|
||||
}
|
||||
|
||||
// ObserveInt64 performs no operation.
|
||||
func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) {
|
||||
}
|
||||
|
||||
// Registration is the registration of a Callback with a No-Op Meter.
|
||||
type Registration struct{ embedded.Registration }
|
||||
|
||||
// Unregister unregisters the Callback the Registration represents with the
|
||||
// No-Op Meter. This will always return nil because the No-Op Meter performs no
|
||||
// operation, including hold any record of registrations.
|
||||
func (Registration) Unregister() error { return nil }
|
||||
|
||||
// Int64Counter is an OpenTelemetry Counter used to record int64 measurements.
|
||||
// It produces no telemetry.
|
||||
type Int64Counter struct{ embedded.Int64Counter }
|
||||
|
||||
// Add performs no operation.
|
||||
func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {}
|
||||
|
||||
// Float64Counter is an OpenTelemetry Counter used to record float64
|
||||
// measurements. It produces no telemetry.
|
||||
type Float64Counter struct{ embedded.Float64Counter }
|
||||
|
||||
// Add performs no operation.
|
||||
func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {}
|
||||
|
||||
// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64
|
||||
// measurements. It produces no telemetry.
|
||||
type Int64UpDownCounter struct{ embedded.Int64UpDownCounter }
|
||||
|
||||
// Add performs no operation.
|
||||
func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {}
|
||||
|
||||
// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record
|
||||
// float64 measurements. It produces no telemetry.
|
||||
type Float64UpDownCounter struct{ embedded.Float64UpDownCounter }
|
||||
|
||||
// Add performs no operation.
|
||||
func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {}
|
||||
|
||||
// Int64Histogram is an OpenTelemetry Histogram used to record int64
|
||||
// measurements. It produces no telemetry.
|
||||
type Int64Histogram struct{ embedded.Int64Histogram }
|
||||
|
||||
// Record performs no operation.
|
||||
func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {}
|
||||
|
||||
// Float64Histogram is an OpenTelemetry Histogram used to record float64
|
||||
// measurements. It produces no telemetry.
|
||||
type Float64Histogram struct{ embedded.Float64Histogram }
|
||||
|
||||
// Record performs no operation.
|
||||
func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {}
|
||||
|
||||
// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record
|
||||
// int64 measurements. It produces no telemetry.
|
||||
type Int64ObservableCounter struct {
|
||||
metric.Int64Observable
|
||||
embedded.Int64ObservableCounter
|
||||
}
|
||||
|
||||
// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record
|
||||
// float64 measurements. It produces no telemetry.
|
||||
type Float64ObservableCounter struct {
|
||||
metric.Float64Observable
|
||||
embedded.Float64ObservableCounter
|
||||
}
|
||||
|
||||
// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record
|
||||
// int64 measurements. It produces no telemetry.
|
||||
type Int64ObservableGauge struct {
|
||||
metric.Int64Observable
|
||||
embedded.Int64ObservableGauge
|
||||
}
|
||||
|
||||
// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record
|
||||
// float64 measurements. It produces no telemetry.
|
||||
type Float64ObservableGauge struct {
|
||||
metric.Float64Observable
|
||||
embedded.Float64ObservableGauge
|
||||
}
|
||||
|
||||
// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
|
||||
// used to record int64 measurements. It produces no telemetry.
|
||||
type Int64ObservableUpDownCounter struct {
|
||||
metric.Int64Observable
|
||||
embedded.Int64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
|
||||
// used to record float64 measurements. It produces no telemetry.
|
||||
type Float64ObservableUpDownCounter struct {
|
||||
metric.Float64Observable
|
||||
embedded.Float64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
// Int64Observer is a recorder of int64 measurements that performs no operation.
|
||||
type Int64Observer struct{ embedded.Int64Observer }
|
||||
|
||||
// Observe performs no operation.
|
||||
func (Int64Observer) Observe(int64, ...metric.ObserveOption) {}
|
||||
|
||||
// Float64Observer is a recorder of float64 measurements that performs no
|
||||
// operation.
|
||||
type Float64Observer struct{ embedded.Float64Observer }
|
||||
|
||||
// Observe performs no operation.
|
||||
func (Float64Observer) Observe(float64, ...metric.ObserveOption) {}
|
||||
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
|
|
@ -16,5 +16,5 @@ package otel // import "go.opentelemetry.io/otel"
|
|||
|
||||
// Version is the current release version of OpenTelemetry in use.
|
||||
func Version() string {
|
||||
return "1.22.0"
|
||||
return "1.23.0"
|
||||
}
|
||||
|
|
|
|||
16
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
16
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
|
|
@ -14,19 +14,25 @@
|
|||
|
||||
module-sets:
|
||||
stable-v1:
|
||||
version: v1.22.0
|
||||
version: v1.23.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel
|
||||
- go.opentelemetry.io/otel/bridge/opencensus
|
||||
- go.opentelemetry.io/otel/bridge/opencensus/test
|
||||
- go.opentelemetry.io/otel/bridge/opentracing
|
||||
- go.opentelemetry.io/otel/bridge/opentracing/test
|
||||
- go.opentelemetry.io/otel/example/dice
|
||||
- go.opentelemetry.io/otel/example/namedtracer
|
||||
- go.opentelemetry.io/otel/example/opencensus
|
||||
- go.opentelemetry.io/otel/example/otel-collector
|
||||
- go.opentelemetry.io/otel/example/passthrough
|
||||
- go.opentelemetry.io/otel/example/zipkin
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
|
||||
- go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
|
||||
- go.opentelemetry.io/otel/exporters/stdout/stdouttrace
|
||||
- go.opentelemetry.io/otel/exporters/zipkin
|
||||
- go.opentelemetry.io/otel/metric
|
||||
|
|
@ -34,16 +40,10 @@ module-sets:
|
|||
- go.opentelemetry.io/otel/sdk/metric
|
||||
- go.opentelemetry.io/otel/trace
|
||||
experimental-metrics:
|
||||
version: v0.45.0
|
||||
version: v0.45.1
|
||||
modules:
|
||||
- go.opentelemetry.io/otel/bridge/opencensus
|
||||
- go.opentelemetry.io/otel/bridge/opencensus/test
|
||||
- go.opentelemetry.io/otel/example/opencensus
|
||||
- go.opentelemetry.io/otel/example/prometheus
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||
- go.opentelemetry.io/otel/exporters/prometheus
|
||||
- go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
|
||||
experimental-schema:
|
||||
version: v0.0.7
|
||||
modules:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue