Documentation ¶
Index ¶
- func NewRequestLoggingHandler() func(http.Handler) http.Handler
- func SetCloudLoggingFieldFormat()
- func WithCloudLoggingSpanContext(ctx context.Context, projectID string) context.Context
- type SpanContextConnectInterceptor
- func (i *SpanContextConnectInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *SpanContextConnectInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *SpanContextConnectInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCloudLoggingFieldFormat ¶
func SetCloudLoggingFieldFormat()
SetCloudLoggingFieldFormat sets zerolog field names that are compatible with the Cloud Logging format.
func WithCloudLoggingSpanContext ¶
WithCloudLoggingSpanContext retrieves a span context using OpenTelemetry API and initialize context sub logger. Sub logger has two fields that are compatible with the Cloud Logging format.
Types ¶
type SpanContextConnectInterceptor ¶
type SpanContextConnectInterceptor struct {
// contains filtered or unexported fields
}
SpanContextConnectInterceptor is a connect-go interceptor which sets zerolog sub logger into context.Context.
func NewCloudLoggingTraceContextInterceptor ¶
func NewCloudLoggingTraceContextInterceptor(googleCloudProjectID string) *SpanContextConnectInterceptor
NewCloudLoggingTraceContextInterceptor initializes a pointer of SpanContextConnectInterceptor.
func (*SpanContextConnectInterceptor) WrapStreamingClient ¶
func (i *SpanContextConnectInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*SpanContextConnectInterceptor) WrapStreamingHandler ¶
func (i *SpanContextConnectInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
func (*SpanContextConnectInterceptor) WrapUnary ¶
func (i *SpanContextConnectInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
Click to show internal directories.
Click to hide internal directories.