Documentation ¶
Index ¶
- Constants
- func ContextWithSIGTERM(logger log.Logger) (context.Context, context.CancelFunc)
- func DefaultLogger(opts ...level.Option) log.Logger
- func SetVerboseLevel(level int)
- func StaticLogger() log.Logger
- func StaticSetup(logger log.Logger)
- func VerboseLevel() int
- type Config
- type Counter
- type Option
- func WithCompressor(compressor string) Option
- func WithExportTimeout(t time.Duration) Option
- func WithHeaders(headers map[string]string) Option
- func WithLogger(logger log.Logger) Option
- func WithMetricReportingPeriod(p time.Duration) Option
- func WithMetricsExporterEndpoint(url string) Option
- func WithMetricsExporterInsecure(insecure bool) Option
- func WithPropagators(propagators ...string) Option
- func WithResourceAttributes(attributes map[string]string) Option
- func WithSpanExporterEndpoint(url string) Option
- func WithSpanExporterInsecure(insecure bool) Option
- type Telemetry
- type Timer
- type Timing
Constants ¶
const ( // Note: These are duplicated from ../config, to avoid package cycles. DefaultExportTimeout = time.Second * 60 DefaultReportingPeriod = time.Second * 30 )
Variables ¶
This section is empty.
Functions ¶
func ContextWithSIGTERM ¶
ContextWithSIGTERM returns a context that will be cancelled on SIGTERM.
func SetVerboseLevel ¶
func SetVerboseLevel(level int)
func StaticLogger ¶
func StaticSetup ¶
func VerboseLevel ¶
func VerboseLevel() int
Types ¶
type Config ¶
type Config struct { SpanExporterEndpoint string SpanExporterEndpointInsecure bool MetricsExporterEndpoint string MetricsExporterEndpointInsecure bool Propagators []string MetricReportingPeriod time.Duration ResourceAttributes map[string]string Headers map[string]string ExportTimeout time.Duration Compressor string // contains filtered or unexported fields }
type Option ¶
type Option func(*Config)
func WithCompressor ¶
func WithExportTimeout ¶
WithExportTimeout configures the timeout used for Export().
func WithHeaders ¶
func WithLogger ¶
func WithMetricReportingPeriod ¶
WithMetricReportingPeriod configures the metric reporting period, how often the controller collects and exports metric data.
func WithMetricsExporterEndpoint ¶
WithMetricsExporterEndpoint configures the endpoint for sending metricss via OTLP
func WithMetricsExporterInsecure ¶
WithMetricsExporterInsecure permits connecting to the trace endpoint without a certificate
func WithPropagators ¶
WithPropagators configures propagators
func WithResourceAttributes ¶
WithResourceAttributes configures attributes on the resource
func WithSpanExporterEndpoint ¶
WithSpanExporterEndpoint configures the endpoint for sending spans via OTLP
func WithSpanExporterInsecure ¶
WithSpanExporterInsecure permits connecting to the trace endpoint without a certificate
type Telemetry ¶
type Telemetry struct { *controller.Controller // contains filtered or unexported fields }
func ConfigureOpentelemetry ¶
func InternalOnly ¶
func InternalOnly() *Telemetry
type Timer ¶
type Timer metric.Float64ValueRecorder
Timer is a simple instrument for measuring a section of code, a kind of light-weight span that outputs a ValueRecorder of its duration.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
package doevery provides primitives for per-call-site rate-limiting.
|
package doevery provides primitives for per-call-site rate-limiting. |