Documentation ¶
Index ¶
- Variables
- func SetupMetrics(ctx context.Context, cfg *config.Settings, serviceName string) (*sdkmetric.MeterProvider, error)
- type AbandonOpError
- type Exporter
- type MockExporter
- type MockExporter_Expecter
- type MockExporter_ExportSpans_Call
- func (_c *MockExporter_ExportSpans_Call) Return(_a0 error) *MockExporter_ExportSpans_Call
- func (_c *MockExporter_ExportSpans_Call) Run(run func(ctx context.Context, spans []trace.ReadOnlySpan)) *MockExporter_ExportSpans_Call
- func (_c *MockExporter_ExportSpans_Call) RunAndReturn(run func(context.Context, []trace.ReadOnlySpan) error) *MockExporter_ExportSpans_Call
- type Server
Constants ¶
This section is empty.
Variables ¶
var NatsConfig string
NatsConfig holds the current configuration of the SHAR Telemetry Server
Functions ¶
func SetupMetrics ¶ added in v1.1.785
func SetupMetrics(ctx context.Context, cfg *config.Settings, serviceName string) (*sdkmetric.MeterProvider, error)
SetupMetrics initialises metrics
Types ¶
type AbandonOpError ¶
type AbandonOpError struct {
Err error
}
AbandonOpError signifies an operation should trigger abandoning the active task.
func (*AbandonOpError) Error ¶
func (w *AbandonOpError) Error() string
type Exporter ¶ added in v1.0.331
type Exporter interface {
ExportSpans(ctx context.Context, spans []tracesdk.ReadOnlySpan) error
}
Exporter represents an interface to the span exporter
type MockExporter ¶ added in v1.1.754
MockExporter is an autogenerated mock type for the Exporter type
func NewMockExporter ¶ added in v1.1.754
func NewMockExporter(t interface { mock.TestingT Cleanup(func()) }) *MockExporter
NewMockExporter creates a new instance of MockExporter. 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 (*MockExporter) EXPECT ¶ added in v1.1.754
func (_m *MockExporter) EXPECT() *MockExporter_Expecter
func (*MockExporter) ExportSpans ¶ added in v1.1.754
func (_m *MockExporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error
ExportSpans provides a mock function with given fields: ctx, spans
type MockExporter_Expecter ¶ added in v1.1.754
type MockExporter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockExporter_Expecter) ExportSpans ¶ added in v1.1.754
func (_e *MockExporter_Expecter) ExportSpans(ctx interface{}, spans interface{}) *MockExporter_ExportSpans_Call
ExportSpans is a helper method to define mock.On call
- ctx context.Context
- spans []trace.ReadOnlySpan
type MockExporter_ExportSpans_Call ¶ added in v1.1.754
MockExporter_ExportSpans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportSpans'
func (*MockExporter_ExportSpans_Call) Return ¶ added in v1.1.754
func (_c *MockExporter_ExportSpans_Call) Return(_a0 error) *MockExporter_ExportSpans_Call
func (*MockExporter_ExportSpans_Call) Run ¶ added in v1.1.754
func (_c *MockExporter_ExportSpans_Call) Run(run func(ctx context.Context, spans []trace.ReadOnlySpan)) *MockExporter_ExportSpans_Call
func (*MockExporter_ExportSpans_Call) RunAndReturn ¶ added in v1.1.754
func (_c *MockExporter_ExportSpans_Call) RunAndReturn(run func(context.Context, []trace.ReadOnlySpan) error) *MockExporter_ExportSpans_Call
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the shar server type responsible for hosting the telemetry server.