otel

package
v0.0.0-...-c5966c3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, url string, opts ...ExporterOption) error

Types

type ExporterOption

type ExporterOption func(*config)

func WithAttributes

func WithAttributes(attrs map[string]string) ExporterOption

WithAttributes is option to add additional attributes to the resource metadata

func WithTLS

func WithTLS(tlsConfig *tls.Config) ExporterOption

WithTLS is option to enable TLS for the exporter

func WithTransportType

func WithTransportType(t TransportType) ExporterOption

WithTransportType is option to specify the Exporter transport protocol Supported HTTP and gRPC (default)

type MockExporterOption

type MockExporterOption struct {
	mock.Mock
}

MockExporterOption is an autogenerated mock type for the ExporterOption type

func NewMockExporterOption

func NewMockExporterOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockExporterOption

NewMockExporterOption creates a new instance of MockExporterOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockExporterOption) EXPECT

func (*MockExporterOption) Execute

func (_m *MockExporterOption) Execute(_a0 *config)

Execute provides a mock function with given fields: _a0

type MockExporterOption_Execute_Call

type MockExporterOption_Execute_Call struct {
	*mock.Call
}

MockExporterOption_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*MockExporterOption_Execute_Call) Return

func (*MockExporterOption_Execute_Call) Run

func (_c *MockExporterOption_Execute_Call) Run(run func(_a0 *config)) *MockExporterOption_Execute_Call

func (*MockExporterOption_Execute_Call) RunAndReturn

func (_c *MockExporterOption_Execute_Call) RunAndReturn(run func(*config)) *MockExporterOption_Execute_Call

type MockExporterOption_Expecter

type MockExporterOption_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockExporterOption_Expecter) Execute

func (_e *MockExporterOption_Expecter) Execute(_a0 interface{}) *MockExporterOption_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 *config

type TransportType

type TransportType string

TransportType represents OpenTelemetry exporter transport type

const (
	TransportGRPC TransportType = "grpc"
	TransportHTTP TransportType = "http"
)

func (TransportType) IsValid

func (t TransportType) IsValid() bool

func (TransportType) String

func (t TransportType) String() string

Jump to

Keyboard shortcuts

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