opencensus

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package opencensus wraps the opencensus client to implement the interface found in metrics.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Counter wraps a OpenCensus Int64 measure.

func (*Counter) Close

func (c *Counter) Close()

Close is not necessary or supported for opencensus Counters. This method is implemented to satisfy the interface in metrics.go.

func (*Counter) Init

func (c *Counter) Init(name, description, unit string, aggr aggregation.Aggregation, tagKeys ...string) error

Init should be called once before the Record method is called on this counter. TagKeys are labels used for filtering the monitoring graphs. Subsequent calls to Record() should provide the TagValues to the TagKeys in the same order specified in Init. TagKeys should be a closed set of values, for example FHIR Resource type. Please see the OpenCensus documentation for details. Counters should not store any PHI.

func (*Counter) MaybeGetResult

func (c *Counter) MaybeGetResult() map[string]int64

MaybeGetResult is not necessary or supported for opencensus Counters. This method is implemented to satisfy the interface in metrics.go.

func (*Counter) Record

func (c *Counter) Record(ctx context.Context, val int64, tagValues ...string) error

Record adds val to the counter. The tagValues must match the tagKeys provided in the call to Init. Init must be called before the first call to Record. Counters should not store any PHI.

type Latency

type Latency struct {
	// contains filtered or unexported fields
}

Latency wraps an OpenCensus Float64 measure.

func (*Latency) Close

func (l *Latency) Close()

Close is not necessary or supported for opencensus Latency. This method is implemented to satisfy the interface in metrics.go.

func (*Latency) Init

func (l *Latency) Init(name, description, unit string, buckets []float64, tagKeys ...string) error

Init should be called once before the Record method is called on this metric. TagKeys are labels used for filtering the monitoring graphs. Subsequent calls to Record() should provide the TagValues to the TagKeys in the same order specified in Init. TagKeys should be a closed set of values, for example FHIR Resource type. Please see the OpenCensus documentation for details. Metrics should not store any PHI.

func (*Latency) MaybeGetResult

func (l *Latency) MaybeGetResult() map[string][]int

MaybeGetResult is not necessary or supported for opencensus Latency. This method is implemented to satisfy the interface in metrics.go.

func (*Latency) Record

func (l *Latency) Record(ctx context.Context, val float64, tagValues ...string) error

Record adds val to the distribution. The tagValues must match the tagKeys provided in the call to Init. Init must be called before the first call to Record. Metrics should not store any PHI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL