Documentation ¶
Overview ¶
Package opencensus for the Stackdriver Prometheus collector.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestExporter ¶
type TestExporter struct {
// contains filtered or unexported fields
}
TestExporter keeps exported metric data in memory to aid in testing the instrumentation.
Metrics can be retrieved with `GetPoint()`. In order to deterministically retrieve the most recent values, you must first invoke `ReadAndExport()`.
func NewTestExporter ¶
func NewTestExporter(metricReader *metricexport.Reader) *TestExporter
NewTestExporter returns a new exporter.
func (*TestExporter) ExportMetrics ¶
func (e *TestExporter) ExportMetrics(ctx context.Context, data []*metricdata.Metric) error
ExportMetrics records the view data.
func (*TestExporter) GetPoint ¶
func (e *TestExporter) GetPoint(metricName string, labels map[string]string) (metricdata.Point, bool)
GetPoint returns the latest point for the time series identified by the given labels.
func (*TestExporter) ReadAndExport ¶
func (e *TestExporter) ReadAndExport()
ReadAndExport reads the current values for all metrics and makes them available to this exporter.
func (*TestExporter) String ¶
func (e *TestExporter) String() string
Click to show internal directories.
Click to hide internal directories.