Documentation ¶
Index ¶
- func NewMetricsExporter(config configmodels.Exporter, pushMetricsData PushMetricsData, ...) (exporter.MetricsExporter, error)
- func NewOTLPTraceExporter(config configmodels.Exporter, dataPusher otlpTraceDataPusher, ...) (exporter.OTLPTraceExporter, error)
- func NewTraceExporter(config configmodels.Exporter, dataPusher traceDataPusher, ...) (exporter.TraceExporter, error)
- func NumTimeSeries(md consumerdata.MetricsData) int
- type ExporterOption
- type ExporterOptions
- type PushMetricsData
- 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 NewOTLPTraceExporter ¶
func NewOTLPTraceExporter( config configmodels.Exporter, dataPusher otlpTraceDataPusher, options ...ExporterOption, ) (exporter.OTLPTraceExporter, error)
NewOTLPTraceExporter creates an OTLPTraceExporter that can record metrics and can wrap every request with a Span.
func NewTraceExporter ¶
func NewTraceExporter( config configmodels.Exporter, dataPusher traceDataPusher, 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.
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 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.
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.