Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportMetrics ¶
ReportMetrics sets up a MeterProvider for metrics reporting and returns it along with a cleanup function.
func TestWithMetrics(t *testing.T) {
exporter := glossymetric.NewTest(t)
mp := oteltesting.ReportMetrics(t, exporter)
}
func ReportTraces ¶
func ReportTraces(tb testing.TB, exporter trace.SpanExporter) *trace.TracerProvider
ReportTraces configures a trace provider for collecting and reporting spans, with cleanup on test completion.
func TestWithTrace(t *testing.T) {
exporter := glossytrace.NewTest(t, glossytrace.WithFlamegraph(), glossytrace.WithSpanAttributes())
tp := testingx.ReportTraces(t, exporter)
}
func TestMainReportMetrics ¶
TestMainReportMetrics sets up a MeterProvider with a metric exporter for testing and returns it along with a flush function.
func TestMain(m *testing.M) {
exporter := glossymetric.NewTestingM(m)
mp, flush := oteltesting.TestMainReportMetrics(m, exporter)
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.