Commit Graph

19 Commits

Author SHA1 Message Date
Tonis Tiigi
e05a89e0b8 improve stacks of cancels from defers
In this case the current stack trace points to the line
where the context was created. Instead the stack should be
captured when the defer is running so the return path to
the defer call is also part of the stack.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-19 18:40:00 -08:00
Tonis Tiigi
ab2c224e72 session: remove session name property
This seems to be completely unused.

I believe it is remnant of pre-buildkit session implementation
and was used for either logging of some transfer reuse.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-19 17:22:04 -07:00
Jonathan A. Sternberg
c3105e49d9 otel: update usage of otelgrpc interceptors to use stat handlers
The otelgrpc interceptors were deprecated. This updates the areas where
these were used to use the stat handlers instead of the interceptors.
This helps with creating a single method for both unary and stream rpcs
and also ensures we aren't using a deprecated function for the future.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-03-29 16:39:25 -05:00
Sebastiaan van Stijn
841e397d54 vendor: OTEL v0.46.1 / v1.21.0
Temporarily adding some "nolint" tags, and a TODO for replacing some
deprecated features;

    client/client.go:105:43: SA1019: otelgrpc.UnaryClientInterceptor is deprecated: Use [NewClientHandler] instead. (staticcheck)
            unary = append(unary, filterInterceptor(otelgrpc.UnaryClientInterceptor(otelgrpc.WithTracerProvider(tracerProvider), otelgrpc.WithPropagators(propagators))))
                                                    ^
    client/client.go:106:27: SA1019: otelgrpc.StreamClientInterceptor is deprecated: Use [NewClientHandler] instead. (staticcheck)
            stream = append(stream, otelgrpc.StreamClientInterceptor(otelgrpc.WithTracerProvider(tracerProvider), otelgrpc.WithPropagators(propagators)))
                                    ^
    solver/jobs.go:515:13: SA1019: trace.NewNoopTracerProvider is deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] instead. (staticcheck)
        _, span := trace.NewNoopTracerProvider().Tracer("").Start(ctx, "")
                   ^
    util/tracing/detect/detect.go:108:7: SA1019: trace.NewNoopTracerProvider is deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] instead. (staticcheck)
        tp = trace.NewNoopTracerProvider()
             ^
    cmd/buildkitd/main.go:273:19: SA1019: otelgrpc.StreamServerInterceptor is deprecated: Use [NewServerHandler] instead. (staticcheck)
            streamTracer := otelgrpc.StreamServerInterceptor(
                            ^
    cmd/buildkitd/main.go:664:15: SA1019: otelgrpc.UnaryServerInterceptor is deprecated: Use [NewServerHandler] instead. (staticcheck)
        withTrace := otelgrpc.UnaryServerInterceptor(
                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-22 18:46:05 +01:00
Tonis Tiigi
8a2a3e83ec replace context.WithCancel with WithCancelCause
Keep stack traces for cancellation errors where possible.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-12-06 22:15:06 -08:00
Tonis Tiigi
64580e7bc0 session: fix run and close synchronization
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-05-18 22:10:25 -07:00
Tonis Tiigi
7489cc8be0 vendor: update opentelemetry to 1.0.0-rc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-19 10:02:26 -07:00
Tonis Tiigi
b10f25944b correctly validate span from context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Tonis Tiigi
9717e62b78 session: avoid tracing health checkpoint
Upstream fixes needed for cleaner solution

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Tonis Tiigi
8f50bae3f1 replace opentracing with opentelemetry tracers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00
Tonis Tiigi
725f5e1207 grpc interceptors for errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-22 18:31:32 -07:00
Ondrej Fabry
7218446f8e Correct trivial typos
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-11-18 00:10:57 +01:00
Vincent Demeester
08373f2381 Clean some small dependencies on docker/docker package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-01 16:05:24 -08:00
Tonis Tiigi
6e40e83d35 Remove net/context dependencies
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-17 09:11:22 -08:00
Tonis Tiigi
29b72a3912 solver: add some trace points
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-08 18:03:12 -08:00
Tonis Tiigi
b94704e55c session: fix session closing and tracing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-01-08 18:03:06 -08:00
Tonis Tiigi
2e48745f57 session: remove confusing uuid variable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-17 16:08:26 -07:00
Tonis Tiigi
5c2e675d18 source: add local file source fundamentals
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-12 23:23:20 -07:00
Tonis Tiigi
fed5c1d9ce session: copy over session package from moby/moby
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-12 22:32:44 -07:00