mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@8b7bcb900d3c
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -25,7 +25,7 @@ import (
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
@ -272,7 +272,7 @@ func (ct *clientTracer) span(hook string) trace.Span {
|
||||
}
|
||||
|
||||
func (ct *clientTracer) getConn(host string) {
|
||||
ct.start("http.getconn", "http.getconn", semconv.HTTPHostKey.String(host))
|
||||
ct.start("http.getconn", "http.getconn", semconv.NetHostName(host))
|
||||
}
|
||||
|
||||
func (ct *clientTracer) gotConn(info httptrace.GotConnInfo) {
|
||||
@ -297,7 +297,7 @@ func (ct *clientTracer) gotFirstResponseByte() {
|
||||
}
|
||||
|
||||
func (ct *clientTracer) dnsStart(info httptrace.DNSStartInfo) {
|
||||
ct.start("http.dns", "http.dns", semconv.HTTPHostKey.String(info.Host))
|
||||
ct.start("http.dns", "http.dns", semconv.NetHostName(info.Host))
|
||||
}
|
||||
|
||||
func (ct *clientTracer) dnsDone(info httptrace.DNSDoneInfo) {
|
||||
@ -342,7 +342,7 @@ func (ct *clientTracer) wroteHeaderField(k string, v []string) {
|
||||
if _, ok := ct.redactedHeaders[k]; ok {
|
||||
value = "****"
|
||||
}
|
||||
ct.root.SetAttributes(attribute.String("http."+k, value))
|
||||
ct.root.SetAttributes(attribute.String("http.request.header."+k, value))
|
||||
}
|
||||
|
||||
func (ct *clientTracer) wroteHeaders() {
|
||||
|
@ -22,7 +22,9 @@ import (
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/baggage"
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.opentelemetry.io/otel/semconv/v1.17.0/httpconv"
|
||||
"go.opentelemetry.io/otel/semconv/v1.17.0/netconv"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
@ -64,11 +66,11 @@ func Extract(ctx context.Context, req *http.Request, opts ...Option) ([]attribut
|
||||
c := newConfig(opts)
|
||||
ctx = c.propagators.Extract(ctx, propagation.HeaderCarrier(req.Header))
|
||||
|
||||
attrs := append(
|
||||
semconv.HTTPServerAttributesFromHTTPRequest("", "", req),
|
||||
semconv.NetAttributesFromHTTPRequest("tcp", req)...,
|
||||
)
|
||||
|
||||
attrs := append(httpconv.ServerRequest("", req), netconv.Transport("tcp"))
|
||||
if req.ContentLength > 0 {
|
||||
a := semconv.HTTPRequestContentLength(int(req.ContentLength))
|
||||
attrs = append(attrs, a)
|
||||
}
|
||||
return attrs, baggage.FromContext(ctx), trace.SpanContextFromContext(ctx)
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net
|
||||
|
||||
// Version is the current release version of the httptrace instrumentation.
|
||||
func Version() string {
|
||||
return "0.37.0"
|
||||
return "0.40.0"
|
||||
// This string is updated by the pre_release.sh script during release
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user