Skip to content

Commit 29b1a15

Browse files
remove deprecated ConnectionTracingID and ConnectionTracingKey (#5521)
1 parent 23b11e7 commit 29b1a15

File tree

5 files changed

+0
-30
lines changed

5 files changed

+0
-30
lines changed

connection.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ func (e *errCloseForRecreating) Error() string {
9999

100100
var deadlineSendImmediately = monotime.Time(42 * time.Millisecond) // any value > time.Time{} and before time.Now() is fine
101101

102-
var connTracingID atomic.Uint64 // to be accessed atomically
103-
func nextConnTracingID() ConnectionTracingID { return ConnectionTracingID(connTracingID.Add(1)) }
104-
105102
type blockMode uint8
106103

107104
const (

integrationtests/self/http_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -899,16 +899,11 @@ func TestHTTPConnContext(t *testing.T) {
899899
require.NoError(t, err)
900900
require.Equal(t, http.StatusOK, resp.StatusCode)
901901

902-
var tracingID quic.ConnectionTracingID
903902
select {
904903
case ctx := <-connCtxChan:
905904
serv, ok := ctx.Value(http3.ServerContextKey).(*http3.Server)
906905
require.True(t, ok)
907906
require.Equal(t, server, serv)
908-
909-
id, ok := ctx.Value(quic.ConnectionTracingKey).(quic.ConnectionTracingID)
910-
require.True(t, ok)
911-
tracingID = id
912907
default:
913908
t.Fatal("handler was not called")
914909
}
@@ -922,10 +917,6 @@ func TestHTTPConnContext(t *testing.T) {
922917
serv, ok := ctx.Value(http3.ServerContextKey).(*http3.Server)
923918
require.True(t, ok)
924919
require.Equal(t, server, serv)
925-
926-
id, ok := ctx.Value(quic.ConnectionTracingKey).(quic.ConnectionTracingID)
927-
require.True(t, ok)
928-
require.Equal(t, tracingID, id)
929920
default:
930921
t.Fatal("handler was not called")
931922
}

interface.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ type TokenStore interface {
5858
// when the server rejects a 0-RTT connection attempt.
5959
var Err0RTTRejected = errors.New("0-RTT rejected")
6060

61-
// ConnectionTracingKey can be used to associate a [logging.ConnectionTracer] with a [Conn].
62-
// It is set on the Conn.Context() context,
63-
// as well as on the context passed to logging.Tracer.NewConnectionTracer.
64-
//
65-
// Deprecated: Applications can set their own tracing key using Transport.ConnContext.
66-
var ConnectionTracingKey = connTracingCtxKey{}
67-
68-
// ConnectionTracingID is the type of the context value saved under the ConnectionTracingKey.
69-
//
70-
// Deprecated: Applications can set their own tracing key using Transport.ConnContext.
71-
type ConnectionTracingID uint64
72-
73-
type connTracingCtxKey struct{}
74-
7561
// QUICVersionContextKey can be used to find out the QUIC version of a TLS handshake from the
7662
// context returned by tls.Config.ClientInfo.Context.
7763
var QUICVersionContextKey = handshake.QUICVersionContextKey

server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,6 @@ func (s *baseServer) handleInitialImpl(p receivedPacket, hdr *wire.Header) error
800800
} else {
801801
cancel = cancel1
802802
}
803-
ctx = context.WithValue(ctx, ConnectionTracingKey, nextConnTracingID())
804803
var qlogTrace qlogwriter.Trace
805804
if config.Tracer != nil {
806805
// Use the same connection ID that is passed to the client's GetLogWriter callback.

transport.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ func (t *Transport) doDial(
283283
return nil, err
284284
}
285285

286-
tracingID := nextConnTracingID()
287-
ctx = context.WithValue(ctx, ConnectionTracingKey, tracingID)
288-
289286
t.mutex.Lock()
290287
if t.closeErr != nil {
291288
t.mutex.Unlock()

0 commit comments

Comments
 (0)