mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 11:42:24 -05:00 
			
		
		
		
	[chore]: Bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc (#2818)
Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) from 1.24.0 to 1.25.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								db2dcc3455
							
						
					
				
			
			
				commit
				
					
						c097745c38
					
				
			
		
					 286 changed files with 4546 additions and 16869 deletions
				
			
		
							
								
								
									
										82
									
								
								vendor/google.golang.org/grpc/rpc_util.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										82
									
								
								vendor/google.golang.org/grpc/rpc_util.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -189,6 +189,20 @@ type EmptyCallOption struct{} | |||
| func (EmptyCallOption) before(*callInfo) error      { return nil } | ||||
| func (EmptyCallOption) after(*callInfo, *csAttempt) {} | ||||
| 
 | ||||
| // StaticMethod returns a CallOption which specifies that a call is being made | ||||
| // to a method that is static, which means the method is known at compile time | ||||
| // and doesn't change at runtime. This can be used as a signal to stats plugins | ||||
| // that this method is safe to include as a key to a measurement. | ||||
| func StaticMethod() CallOption { | ||||
| 	return StaticMethodCallOption{} | ||||
| } | ||||
| 
 | ||||
| // StaticMethodCallOption is a CallOption that specifies that a call comes | ||||
| // from a static method. | ||||
| type StaticMethodCallOption struct { | ||||
| 	EmptyCallOption | ||||
| } | ||||
| 
 | ||||
| // Header returns a CallOptions that retrieves the header metadata | ||||
| // for a unary RPC. | ||||
| func Header(md *metadata.MD) CallOption { | ||||
|  | @ -730,17 +744,19 @@ type payloadInfo struct { | |||
| 	uncompressedBytes []byte | ||||
| } | ||||
| 
 | ||||
| func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor) ([]byte, error) { | ||||
| 	pf, buf, err := p.recvMsg(maxReceiveMessageSize) | ||||
| // recvAndDecompress reads a message from the stream, decompressing it if necessary. | ||||
| // | ||||
| // Cancelling the returned cancel function releases the buffer back to the pool. So the caller should cancel as soon as | ||||
| // the buffer is no longer needed. | ||||
| func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, | ||||
| ) (uncompressedBuf []byte, cancel func(), err error) { | ||||
| 	pf, compressedBuf, err := p.recvMsg(maxReceiveMessageSize) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	if payInfo != nil { | ||||
| 		payInfo.compressedLength = len(buf) | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil); st != nil { | ||||
| 		return nil, st.Err() | ||||
| 		return nil, nil, st.Err() | ||||
| 	} | ||||
| 
 | ||||
| 	var size int | ||||
|  | @ -748,21 +764,35 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei | |||
| 		// To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor, | ||||
| 		// use this decompressor as the default. | ||||
| 		if dc != nil { | ||||
| 			buf, err = dc.Do(bytes.NewReader(buf)) | ||||
| 			size = len(buf) | ||||
| 			uncompressedBuf, err = dc.Do(bytes.NewReader(compressedBuf)) | ||||
| 			size = len(uncompressedBuf) | ||||
| 		} else { | ||||
| 			buf, size, err = decompress(compressor, buf, maxReceiveMessageSize) | ||||
| 			uncompressedBuf, size, err = decompress(compressor, compressedBuf, maxReceiveMessageSize) | ||||
| 		} | ||||
| 		if err != nil { | ||||
| 			return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) | ||||
| 			return nil, nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) | ||||
| 		} | ||||
| 		if size > maxReceiveMessageSize { | ||||
| 			// TODO: Revisit the error code. Currently keep it consistent with java | ||||
| 			// implementation. | ||||
| 			return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) | ||||
| 			return nil, nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) | ||||
| 		} | ||||
| 	} else { | ||||
| 		uncompressedBuf = compressedBuf | ||||
| 	} | ||||
| 
 | ||||
| 	if payInfo != nil { | ||||
| 		payInfo.compressedLength = len(compressedBuf) | ||||
| 		payInfo.uncompressedBytes = uncompressedBuf | ||||
| 
 | ||||
| 		cancel = func() {} | ||||
| 	} else { | ||||
| 		cancel = func() { | ||||
| 			p.recvBufferPool.Put(&compressedBuf) | ||||
| 		} | ||||
| 	} | ||||
| 	return buf, nil | ||||
| 
 | ||||
| 	return uncompressedBuf, cancel, nil | ||||
| } | ||||
| 
 | ||||
| // Using compressor, decompress d, returning data and size. | ||||
|  | @ -782,6 +812,9 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize | |||
| 			// size is used as an estimate to size the buffer, but we | ||||
| 			// will read more data if available. | ||||
| 			// +MinRead so ReadFrom will not reallocate if size is correct. | ||||
| 			// | ||||
| 			// TODO: If we ensure that the buffer size is the same as the DecompressedSize, | ||||
| 			// we can also utilize the recv buffer pool here. | ||||
| 			buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) | ||||
| 			bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) | ||||
| 			return buf.Bytes(), int(bytesRead), err | ||||
|  | @ -797,18 +830,15 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize | |||
| // dc takes precedence over compressor. | ||||
| // TODO(dfawley): wrap the old compressor/decompressor using the new API? | ||||
| func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor) error { | ||||
| 	buf, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor) | ||||
| 	buf, cancel, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	defer cancel() | ||||
| 
 | ||||
| 	if err := c.Unmarshal(buf, m); err != nil { | ||||
| 		return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) | ||||
| 	} | ||||
| 	if payInfo != nil { | ||||
| 		payInfo.uncompressedBytes = buf | ||||
| 	} else { | ||||
| 		p.recvBufferPool.Put(&buf) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
|  | @ -932,19 +962,6 @@ func setCallInfoCodec(c *callInfo) error { | |||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| // channelzData is used to store channelz related data for ClientConn, addrConn and Server. | ||||
| // These fields cannot be embedded in the original structs (e.g. ClientConn), since to do atomic | ||||
| // operation on int64 variable on 32-bit machine, user is responsible to enforce memory alignment. | ||||
| // Here, by grouping those int64 fields inside a struct, we are enforcing the alignment. | ||||
| type channelzData struct { | ||||
| 	callsStarted   int64 | ||||
| 	callsFailed    int64 | ||||
| 	callsSucceeded int64 | ||||
| 	// lastCallStartedTime stores the timestamp that last call starts. It is of int64 type instead of | ||||
| 	// time.Time since it's more costly to atomically update time.Time variable than int64 variable. | ||||
| 	lastCallStartedTime int64 | ||||
| } | ||||
| 
 | ||||
| // The SupportPackageIsVersion variables are referenced from generated protocol | ||||
| // buffer files to ensure compatibility with the gRPC version used.  The latest | ||||
| // support package version is 7. | ||||
|  | @ -958,6 +975,7 @@ const ( | |||
| 	SupportPackageIsVersion5 = true | ||||
| 	SupportPackageIsVersion6 = true | ||||
| 	SupportPackageIsVersion7 = true | ||||
| 	SupportPackageIsVersion8 = true | ||||
| ) | ||||
| 
 | ||||
| const grpcUA = "grpc-go/" + Version | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue