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(), error)
- func StartTraceExporter(ctx context.Context, exporterConfig TraceExporterConfig, ...) (func(), 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.
func StartMetricExporter ¶ added in v0.37.0
func StartMetricExporter( ctx context.Context, exporterConfig MetricExporterConfig, resource *resource.Resource, ) (func(), error)
StartMetricExporter starts the OpenTelemetry Cloud Monitoring exporter.
func StartTraceExporter ¶ added in v0.37.0
func StartTraceExporter( ctx context.Context, exporterConfig TraceExporterConfig, resource *resource.Resource, ) (func(), error)
StartTraceExporter starts the OpenTelemetry Cloud Trace exporter.
Types ¶
Click to show internal directories.
Click to hide internal directories.