Documentation
¶
Index ¶
- func ActualMetrics(t *testing.T, reader *metric.ManualReader) metricdata.ResourceMetrics
- func ForceFlush(ctx context.Context)
- func InitializeMetrics(ctx context.Context, config OtelConfig) (*metric.MeterProvider, error)
- func MockMetric(config OtelConfig) (*metric.ManualReader, *metric.MeterProvider)
- type OtelConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActualMetrics ¶
func ActualMetrics(t *testing.T, reader *metric.ManualReader) metricdata.ResourceMetrics
func ForceFlush ¶
func InitializeMetrics ¶
func InitializeMetrics(ctx context.Context, config OtelConfig) (*metric.MeterProvider, error)
func MockMetric ¶
func MockMetric(config OtelConfig) (*metric.ManualReader, *metric.MeterProvider)
Types ¶
type OtelConfig ¶ added in v0.0.2
type OtelConfig struct { OtelMetricEndpoint string // is used by the otel sdk to identify the endpoint to send metrics to. According to document it Will be set implicitly by the otel sdk. But it does not work. I set it explicitly. OtelServiceName string // is used by the otel sdk to identify the service name. I found no way to set it explicitly by the otel sdk. According to the specification setting an attribute with name "service.name" should work, but it does not. }
Click to show internal directories.
Click to hide internal directories.