Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Globals ¶
type Globals struct {
Version VersionFlag `name:"version" short:"v" help:"print version and quit"`
}
type MetricsCmd ¶
type MetricsCmd struct {
Post MetricsPostCmd `cmd:"post" help:"post a metric datapoint"`
}
type MetricsPostCmd ¶
type MetricsPostCmd struct {
OTLPEndpoint string `name:"otlp-endpoint" required:"" env:"OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_METRICS_ENDPOINT" help:"OTLP endpoint"`
OTLPHeaders map[string]string `name:"otlp-headers" mapsep:"," env:"OTEL_EXPORTER_OTLP_HEADERS,OTEL_EXPORTER_OTLP_METRICS_HEADERS" help:"OTLP headers"`
OTLPProtocol string `name:"otlp-protocol" env:"OTEL_EXPORTER_OTLP_PROTOCOL" default:"grpc" enum:"grpc,http" help:"OTLP protocol"`
OTLPInsecure bool `name:"otlp-insecure" help:"disable secure connection (required for such as localhost)"`
MetricName string `name:"name" short:"n" required:"" help:"metric name"`
MetricType string `name:"type" short:"t" default:"gauge" enum:"gauge,sum" help:"metric type"`
MetricDescription string `name:"description" short:"d" help:"metric description"`
MetricUnit string `name:"unit" short:"u" default:"1" help:"metric unit"`
ResourceAttrs map[string]string `name:"resource-attrs" mapsep:"," help:"resource attributes"`
ScopeName string `name:"scope-name" help:"instrumentation scope name"`
ScopeVersion string `name:"scope-version" help:"instrumentation scope version"`
ScopeSchemaURL string `name:"scope-schemaurl" help:"instrumentation scope schema url"`
ScopeAttrs map[string]string `name:"scope-attrs" mapsep:"," help:"instrumentation scope attributes"`
DataPointAttrs map[string]string `name:"datapoint-attrs" mapsep:"," aliases:"attrs" help:"datapoint attributes (--attrs is an alias)"`
DataPointTimestamp int64 `name:"timestamp" help:"datapoint timestamp (unix seconds)"`
DataPointValue float64 `arg:"" required:"" help:"datapoint value"`
}
func (*MetricsPostCmd) Run ¶
func (c *MetricsPostCmd) Run(globals *Globals) error
type VersionCmd ¶
type VersionCmd struct{}
func (*VersionCmd) Run ¶
func (c *VersionCmd) Run(globals *Globals) error
type VersionFlag ¶
type VersionFlag string
func (VersionFlag) BeforeApply ¶
func (VersionFlag) Decode ¶
func (v VersionFlag) Decode(ctx *kong.DecodeContext) error
func (VersionFlag) IsBool ¶
func (v VersionFlag) IsBool() bool
Click to show internal directories.
Click to hide internal directories.