Documentation ¶
Index ¶
- func NewMetricsExporter(config configmodels.Exporter, pushMetricsData PushMetricsData, ...) (exporter.MetricsExporter, error)
- func NewTraceExporter(config configmodels.Exporter, pushTraceData PushTraceData, ...) (exporter.TraceExporter, error)
- func NumTimeSeries(md consumerdata.MetricsData) int
- type ExporterOption
- type ExporterOptions
- type PushMetricsData
- type PushTraceData
- type Shutdown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricsExporter ¶
func NewMetricsExporter(config configmodels.Exporter, pushMetricsData PushMetricsData, options ...ExporterOption) (exporter.MetricsExporter, error)
NewMetricsExporter creates an MetricsExporter that can record metrics and can wrap every request with a Span. If no options are passed it just adds the exporter format as a tag in the Context. TODO: Add support for retries.
func NewTraceExporter ¶
func NewTraceExporter(config configmodels.Exporter, pushTraceData PushTraceData, options ...ExporterOption) (exporter.TraceExporter, error)
NewTraceExporter creates an TraceExporter that can record metrics and can wrap every request with a Span. If no options are passed it just adds the exporter format as a tag in the Context. TODO: Add support for retries.
func NumTimeSeries ¶
func NumTimeSeries(md consumerdata.MetricsData) int
NumTimeSeries returns the number of timeseries in a MetricsData.
Types ¶
type ExporterOption ¶
type ExporterOption func(*ExporterOptions)
ExporterOption apply changes to ExporterOptions.
func WithMetrics ¶
func WithMetrics(recordMetrics bool) ExporterOption
WithMetrics makes new Exporter to record metrics for every request.
func WithShutdown ¶
func WithShutdown(shutdown Shutdown) ExporterOption
WithShutdown overrides the default Shutdown function for an exporter. The default shutdown function does nothing and always returns nil.
func WithTracing ¶
func WithTracing(recordTrace bool) ExporterOption
WithTracing makes new Exporter to wrap every request with a trace Span.
type ExporterOptions ¶
type ExporterOptions struct {
// contains filtered or unexported fields
}
ExporterOptions contains options concerning how an Exporter is configured.
type PushMetricsData ¶
type PushMetricsData func(ctx context.Context, td consumerdata.MetricsData) (droppedTimeSeries int, err error)
PushMetricsData is a helper function that is similar to ConsumeMetricsData but also returns the number of dropped metrics.
type PushTraceData ¶
type PushTraceData func(ctx context.Context, td consumerdata.TraceData) (droppedSpans int, err error)
PushTraceData is a helper function that is similar to ConsumeTraceData but also returns the number of dropped spans.