package metrics
import "github.com/lightstep/lightstep-tracer-go/internal/metrics"
Index ¶
- Constants
- type CPU
- type Memory
- type Metrics
- type NIC
- type ProcessCPU
- type Reporter
- func NewReporter(opts ...ReporterOption) *Reporter
- func (r *Reporter) Measure(ctx context.Context, intervals int64) error
- type ReporterOption
- func WithReporterAccessToken(accessToken string) ReporterOption
- func WithReporterAddress(address string) ReporterOption
- func WithReporterAttributes(attributes map[string]string) ReporterOption
- func WithReporterMeasurementDuration(measurementDuration time.Duration) ReporterOption
- func WithReporterTimeout(timeout time.Duration) ReporterOption
- func WithReporterTracerID(tracerID uint64) ReporterOption
- type Runtime
Constants ¶
const ( ReporterPlatformKey = "lightstep.reporter_platform" ReporterPlatformVersionKey = "lightstep.reporter_platform_version" ReporterVersionKey = "lightstep.reporter_version" )
Types ¶
type CPU ¶
type Memory ¶
type Metrics ¶
type Metrics struct { ProcessCPU ProcessCPU CPU map[string]CPU NIC map[string]NIC Memory Memory Runtime Runtime }
func Measure ¶
type NIC ¶
type ProcessCPU ¶
type Reporter ¶
type Reporter struct { Start time.Time End time.Time MetricsCount int // contains filtered or unexported fields }
func NewReporter ¶
func NewReporter(opts ...ReporterOption) *Reporter
func (*Reporter) Measure ¶
Measure takes a snapshot of system metrics and sends them to a LightStep endpoint.
type ReporterOption ¶
type ReporterOption func(*config)
func WithReporterAccessToken ¶
func WithReporterAccessToken(accessToken string) ReporterOption
WithReporterAccessToken sets an access token for communicating with LightStep
func WithReporterAddress ¶
func WithReporterAddress(address string) ReporterOption
WithReporterAddress sets the address of the LightStep endpoint
func WithReporterAttributes ¶
func WithReporterAttributes(attributes map[string]string) ReporterOption
WithReporterAttributes sets attributes reported back to LightStep
func WithReporterMeasurementDuration ¶
func WithReporterMeasurementDuration(measurementDuration time.Duration) ReporterOption
WithReporterMeasurementDuration sets the duration reported back to LightStep
func WithReporterTimeout ¶
func WithReporterTimeout(timeout time.Duration) ReporterOption
WithReporterTimeout sets the timeout when communicating with LightStep
func WithReporterTracerID ¶
func WithReporterTracerID(tracerID uint64) ReporterOption
WithReporterTracerID sets the tracer ID reported back to LightStep
type Runtime ¶
Source Files ¶
metrics.go package.go reporter.go
- Version
- v0.25.0
- Published
- Jun 1, 2021
- Platform
- windows/amd64
- Imports
- 21 packages
- Last checked
- 8 hours ago –
Tools for package owners.