Documentation
¶
Index ¶
- func NewLoggerProvider(ctx context.Context, opt *Config) (log.LoggerProvider, func(), error)
- func NewMeterProvider(ctx context.Context, opt *Config) (metric.MeterProvider, http.Handler, func(), error)
- func NewTracerProvider(ctx context.Context, opt *Config) (trace.TracerProvider, func(), error)
- type Config
- type Endpoint
- type ExporterType
- type GRPC
- type HTTP
- type LogsConfig
- type MetricsConfig
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerProvider ¶
func NewMeterProvider ¶
func NewTracerProvider ¶
Types ¶
type Config ¶
type Config struct {
ServiceName string `mapstructure:"serviceName"`
Environment string `mapstructure:"environment"`
GzipCompression bool `mapstructure:"gzipCompression"`
Trace Trace `mapstructure:"trace"`
Metrics MetricsConfig `mapstructure:"metrics"`
Logs LogsConfig `mapstructure:"logs"`
}
type ExporterType ¶
type ExporterType string
const ( ExporterTypePull ExporterType = "pull" ExporterTypePush ExporterType = "push" )
type LogsConfig ¶
type MetricsConfig ¶
type MetricsConfig struct {
Enabled bool `mapstructure:"enabled"`
ExporterType ExporterType `mapstructure:"exporterType"`
// push 用(ExporterType == "push" の時のみ使用)
HTTP *HTTP `mapstructure:"http"`
GRPC *GRPC `mapstructure:"grpc"`
}
Click to show internal directories.
Click to hide internal directories.