Documentation ¶
Overview ¶
Package collector implements a test OTEL collector to use in unit tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricRecord ¶
type MetricRecord struct { ResourceAttributes map[string]string Attributes map[string]string Name string Unit string Type pmetric.MetricType IntVal int64 FloatVal float64 Count int }
MetricRecord stores some metadata from the received metrics
type TestCollector ¶
type TestCollector struct { ServerEndpoint string // contains filtered or unexported fields }
TestCollector is a dummy OLTP test collector that allows retrieving part of the collected metrics Useful for unit testing
func (*TestCollector) Records ¶
func (tc *TestCollector) Records() chan MetricRecord
func (*TestCollector) ResetRecords ¶ added in v1.7.0
func (tc *TestCollector) ResetRecords()
func (*TestCollector) ResetTraceRecords ¶ added in v1.7.0
func (tc *TestCollector) ResetTraceRecords()
func (*TestCollector) TraceRecords ¶
func (tc *TestCollector) TraceRecords() chan TraceRecord
Click to show internal directories.
Click to hide internal directories.