traceutils

package
v1.3.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestServer

func NewTestServer(t *testing.T, callback func(ptrace.Traces)) string

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

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.

func SpanKindStr added in v1.1.0

func SpanKindStr(sk ptrace.SpanKind) string

SpanKindStr returns a string representation of the SpanKind as it's defined in the proto. The function provides old behavior of ptrace.SpanKind.String() to support graceful adoption of https://github.com/open-telemetry/opentelemetry-collector/pull/6250.

func StatusCodeStr added in v1.1.0

func StatusCodeStr(sk ptrace.StatusCode) string

StatusCodeStr returns a string representation of the StatusCode as it's defined in the proto. The function provides old behavior of ptrace.StatusCode.String() to support graceful adoption of https://github.com/open-telemetry/opentelemetry-collector/pull/6250.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL