Versions in this module Expand all Collapse all v0 v0.7.0 Oct 29, 2024 Changes in this version + var DefaultMetricsConfig = MetricsConfig + var DefaultTraceConfig = TraceConfig + func CreateMetricSink(registerer prometheus.Registerer, cfg MetricsConfig) (*mp.PrometheusSink, error) + func CreateMetrics(sink *mp.PrometheusSink, global bool) (*metrics.Metrics, error) + func CreatePropagator() propagation.TextMapPropagator + func CreateResource(ctx context.Context, id string, role blockless.NodeRole) (*resource.Resource, error) + func CreateTracerProvider(resource *resource.Resource, batchTimeout time.Duration, ...) *trace.TracerProvider + func GetMetricsHTTPHandler() http.Handler + func InitializeMetrics(opts ...MetricsOption) (*metrics.Metrics, error) + func NewGRPCExporter(ctx context.Context, cfg TraceGRPCConfig) (*otlptrace.Exporter, error) + func NewHTTPExporter(ctx context.Context, cfg TraceHTTPConfig) (*otlptrace.Exporter, error) + func NewInMemExporter() *tracetest.InMemoryExporter + type MetricsConfig struct + Counters []prometheus.CounterDefinition + Gauges []prometheus.GaugeDefinition + Global bool + Summaries []prometheus.SummaryDefinition + type MetricsOption func(*MetricsConfig) + func WithCounters(counters []prometheus.CounterDefinition) MetricsOption + func WithGauges(gauges []prometheus.GaugeDefinition) MetricsOption + func WithSummaries(summaries []prometheus.SummaryDefinition) MetricsOption + type ShutdownFunc func(context.Context) error + func InitializeTracing(ctx context.Context, log zerolog.Logger, opts ...TraceOption) (ShutdownFunc, error) + type TraceConfig struct + ExporterBatchTimeout time.Duration + GRPC TraceGRPCConfig + HTTP TraceHTTPConfig + ID string + InMem TraceInMemConfig + Role blockless.NodeRole + type TraceGRPCConfig struct + AllowInsecure bool + Enabled bool + Endpoint string + UseCompression bool + type TraceHTTPConfig struct + AllowInsecure bool + Enabled bool + Endpoint string + UseCompression bool + type TraceInMemConfig struct + Enabled bool + type TraceOption func(*TraceConfig) + func WithBatchTraceTimeout(t time.Duration) TraceOption + func WithGRPCTracing(endpoint string) TraceOption + func WithHTTPTracing(endpoint string) TraceOption + func WithID(id string) TraceOption + func WithNodeRole(r blockless.NodeRole) TraceOption