Package octest supports testing of OpenCensus integrations.
Diff compares the list of spans and metric counts obtained from OpenCensus instrumentation (using the TestExporter in this package, or similar) with an expected list of calls. Only the name and code are compared. Order matters for traces (though not for metrics).
Call holds the expected contents of a measured call. It is used for both metric and trace comparison.
TestExporter is an exporter of OpenCensus traces and metrics, for testing. It should be created with NewTestExporter.
NewTestExporter creates a TestExporter and registers it with OpenCensus.
Counts returns the first exported data that includes aggregated counts.
ExportSpan "exports" a span by remembering it.
ExportView exports a view by writing it to the Stats channel.
Unregister unregisters the exporter from OpenCensus.