-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vendor: OTEL v1.19.0 / v0.45.0, containerd v1.7.11 #46830
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c14bd4f
vendor: vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
thaJeztah 49ad102
vendor: github.com/containerd/containerd v1.7.9
thaJeztah 7028a03
vendor: github.com/containerd/containerd v1.7.10
thaJeztah fcf03cd
vendor: github.com/containerd/containerd v1.7.11
thaJeztah 7d991b6
vendor: github.com/moby/buildkit v0.12.5-0.20231208203051-3b6880d2a00f
thaJeztah 4d2a324
update to go.opentelemetry.io/otel/semconv/v1.21.0, remove "httpconv"…
thaJeztah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ import ( | |
"go.opentelemetry.io/otel/propagation" | ||
"go.opentelemetry.io/otel/sdk/resource" | ||
"go.opentelemetry.io/otel/sdk/trace" | ||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0" | ||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0" | ||
"gotest.tools/v3/icmd" | ||
) | ||
|
||
|
@@ -34,7 +34,7 @@ func (d devZero) Read(p []byte) (n int, err error) { | |
|
||
var tracingOnce sync.Once | ||
|
||
// configureTracing sets up an OTLP tracing exporter for use in tests. | ||
// ConfigureTracing sets up an OTLP tracing exporter for use in tests. | ||
func ConfigureTracing() func(context.Context) { | ||
if os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT") == "" { | ||
// No OTLP endpoint configured, so don't bother setting up tracing. | ||
|
@@ -52,9 +52,7 @@ func ConfigureTracing() func(context.Context) { | |
tp = trace.NewTracerProvider( | ||
trace.WithSpanProcessor(sp), | ||
trace.WithSampler(trace.AlwaysSample()), | ||
trace.WithResource(resource.NewSchemaless( | ||
attribute.KeyValue{Key: semconv.ServiceNameKey, Value: attribute.StringValue("integration-test-client")}, | ||
)), | ||
trace.WithResource(resource.NewSchemaless(semconv.ServiceName("integration-test-client"))), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is not strictly needed, but while working on this code, I found the |
||
) | ||
otel.SetTracerProvider(tp) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this part if we don't have the "httpconv.ClientRequest"? (disabled that part, per suggestion above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe outside the scope of this PR, but worth exploring updating this logic to use
http.Transport
with a custom dialer sincehttputil.NewClientConn
is deprecated. Theotelhttp
library could wrap the transport in that case and maybe simplify this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually could probably be even easier to just wrap
clientconn.Do
as anhttp.RoundTripper
and could use https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#NewTransport. Not sure if that matches what the old functionality was doing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playing around with that idea here #46920. I'm curious if that makes this clearer or cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @dmcgowan re: refactoring the actual (non-OTel) logic here for a future release, at which point we can bring back OTel "for free" in the process.
That said, I think your simplified status handling here is fine