Documentation ¶
Overview ¶
Package cloudotel provides primitives for OpenTelemetry.
Index ¶
- func NewErrorLogger(logger *zap.Logger, level zapcore.Level, message string) otel.ErrorHandler
- func NewResource(ctx context.Context) (*resource.Resource, error)
- func RegisterErrorHandler(ctx context.Context)
- func StartMetricExporter(ctx context.Context, exporterConfig MetricExporterConfig, ...) (func(context.Context) error, error)
- func StartTraceExporter(ctx context.Context, exporterConfig TraceExporterConfig, ...) (func(context.Context) error, error)
- type MetricExporterConfig
- type TraceExporterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorLogger ¶
NewErrorLogger returns a new otel.ErrorHandler that logs errors using the provided logger, level and message.
func NewResource ¶
NewResource creates and detects attributes for a new OpenTelemetry resource.
func RegisterErrorHandler ¶ added in v0.37.0
RegisterErrorHandler registers a global OpenTelemetry error handler.
Types ¶
type MetricExporterConfig ¶ added in v0.37.0
type MetricExporterConfig struct { Enabled bool `onGCE:"false"` Interval time.Duration `default:"60s"` RuntimeInstrumentation bool `onGCE:"true"` HostInstrumentation bool `onGCE:"true"` OpenCensusProducer bool `default:"false"` }
MetricExporterConfig configures the metrics exporter.
Click to show internal directories.
Click to hide internal directories.