Documentation
¶
Index ¶
- Variables
- type Option
- func WithDefaultExporters() Option
- func WithLogConsoleExporter() Option
- func WithLogGrpcExporter(ctx context.Context, otlpEndpoint string) Option
- func WithMetricConsoleExporter() Option
- func WithMetricGrpcExporter(ctx context.Context, otlpEndpoint string, scrapeInterval time.Duration) Option
- func WithSlogHandler(mh *slogx.MultiHandler) Option
- func WithSpanConsoleExporter() Option
- func WithSpanGrpcExporter(ctx context.Context, otlpEndpoint string) Option
- func WithSpanHTTPExporter(ctx context.Context, otlpEndpoint string) Option
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAtLeastOneExporter = errors.New("at least one exporter must be provided or use withDefaultExporters option")
Functions ¶
This section is empty.
Types ¶
type Option ¶
func WithDefaultExporters ¶ added in v0.1.2
func WithDefaultExporters() Option
func WithLogConsoleExporter ¶
func WithLogConsoleExporter() Option
func WithLogGrpcExporter ¶
func WithMetricConsoleExporter ¶
func WithMetricConsoleExporter() Option
func WithMetricGrpcExporter ¶
func WithSlogHandler ¶ added in v0.1.0
func WithSlogHandler(mh *slogx.MultiHandler) Option
WithSlogHandler позволяет передать уже инициализированный MultiHandler. OTel log bridge будет inject'нут в него, вместо создания нового логгера.
func WithSpanConsoleExporter ¶
func WithSpanConsoleExporter() Option
func WithSpanGrpcExporter ¶
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
func NewTelemetryProvider ¶ added in v0.1.2
func NewTelemetryProvider( ctx context.Context, serviceName, version, enviroment string, opts ...Option, ) (*Telemetry, error)
NewTelemetryProvider creates a new telemetry instance. Without any exporters and without WithDefaultExporters option NewTelemetryProvider return error - ErrAtLeastOneExporter
Click to show internal directories.
Click to hide internal directories.