Documentation ¶
Overview ¶
Package logz provides the structured log with the OpenTelemetry.
Example:
ctx := r.Context() // r is *http.Request logz.Infof(ctx, "info log. requestURL: %s", r.URL.String())
Index ¶
- func Criticalf(ctx context.Context, format string, a ...interface{})
- func Debugf(ctx context.Context, format string, a ...interface{})
- func Errorf(ctx context.Context, format string, a ...interface{})
- func HTTPMiddleware(label string) func(http.Handler) http.Handler
- func HTTPMiddleware2(label string) func(http.Handler) http.Handler
- func Infof(ctx context.Context, format string, a ...interface{})
- func InitCloudTracer(opts ...option.ClientOption) error
- func InitStdoutTracer() error
- func InitTracer() error
- func SetProjectID(pID string)
- func Warningf(ctx context.Context, format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPMiddleware2 ¶ added in v0.1.1
HTTPMiddleware is middleware for HTTP handler
func InitCloudTracer ¶
func InitCloudTracer(opts ...option.ClientOption) error
InitCloudTracer initializes tracer of OpenTelemetry, that is for Cloud Logging(formerly known as Stackdriver Logging)
func InitStdoutTracer ¶
func InitStdoutTracer() error
InitStdoutTracer initializes tracer of OpenTelemetry, that is for stdout
func InitTracer ¶ added in v0.1.1
func InitTracer() error
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
contrib
|
|
example
|
|
nethttp
Module
|
|
nethttptrace
Module
|
|
go111
module
|
|
internal
|
|
Click to show internal directories.
Click to hide internal directories.