Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestServer ¶
NewTestServer creates a new Server for testing, where received traces will call the callback function. The returned string is the address where traces can be sent using OTLP.
func PrometheusExporter ¶ added in v0.35.0
func PrometheusExporter(reg prometheus.Registerer) (otelmetric.Reader, error)
This function is used by both production code and unit tests. It makes sure that uint tests use the same conventions for metric readers as production code.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a Tracing testing server that invokes a function every time a span is received.
func NewServer ¶
NewServer creates an OTLP-accepting server that calls a function when a trace is received. This is primarily useful for testing.
func NewServerWithRandomPort ¶
NewServerWithRandomPort calls NewServer with a random port >49152 and <65535. It will try up to five times before failing.