Documentation ¶
Index ¶
- func DiffLogProtos(t testing.TB, x, y *protos.LogExpectFixture) string
- func DiffMetricProtos(t testing.TB, x, y *protos.MetricExpectFixture) string
- func DiffTraceProtos(t testing.TB, x, y *protos.TraceExpectFixture) string
- func NewLogTestExporter(ctx context.Context, t testing.TB, l *cloudmock.LogsTestServer, ...) *collector.LogsExporter
- func NewMetricTestExporter(ctx context.Context, t testing.TB, m *cloudmock.MetricsTestServer, ...) *collector.MetricsExporter
- func NewTraceTestExporter(ctx context.Context, t testing.TB, s *cloudmock.TracesTestServer, ...) *collector.TraceExporter
- type InMemoryOCExporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffLogProtos ¶
func DiffLogProtos(t testing.TB, x, y *protos.LogExpectFixture) string
Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.
func DiffMetricProtos ¶
func DiffMetricProtos(t testing.TB, x, y *protos.MetricExpectFixture) string
Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.
func DiffTraceProtos ¶
func DiffTraceProtos(t testing.TB, x, y *protos.TraceExpectFixture) string
Diff uses cmp.Diff(), protocmp, and some custom options to compare two protobuf messages.
func NewLogTestExporter ¶
func NewLogTestExporter( ctx context.Context, t testing.TB, l *cloudmock.LogsTestServer, cfg collector.Config, extraConfig *logsutil.ExporterConfig, ) *collector.LogsExporter
func NewMetricTestExporter ¶
func NewMetricTestExporter( ctx context.Context, t testing.TB, m *cloudmock.MetricsTestServer, cfg collector.Config, ) *collector.MetricsExporter
NewMetricsTestExporter creates and starts a googlecloud exporter by updating the given cfg copy to point to the test server.
func NewTraceTestExporter ¶
func NewTraceTestExporter( ctx context.Context, t testing.TB, s *cloudmock.TracesTestServer, cfg collector.Config, ) *collector.TraceExporter
Types ¶
type InMemoryOCExporter ¶
type InMemoryOCExporter struct {
// contains filtered or unexported fields
}
OC stats/metrics exporter used to capture self observability metrics.
func NewInMemoryOCViewExporter ¶
func NewInMemoryOCViewExporter() (*InMemoryOCExporter, error)
NewInMemoryOCViewExporter creates a new in memory OC exporter for testing. Be sure to defer a call to Shutdown().
func (*InMemoryOCExporter) Proto ¶
func (i *InMemoryOCExporter) Proto(ctx context.Context) (*protos.SelfObservabilityMetric, error)
Click to show internal directories.
Click to hide internal directories.