Documentation
¶
Index ¶
- type Client
- type Exporter
- func (e *Exporter) Export(ctx context.Context, res *resource.Resource, ...) error
- func (e *Exporter) Shutdown(ctx context.Context) error
- func (e *Exporter) Start(ctx context.Context) error
- func (e *Exporter) TemporalityFor(descriptor *sdkapi.Descriptor, kind aggregation.Kind) aggregation.Temporality
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Start should establish connection(s) to endpoint(s). It is // called just once by the exporter, so the implementation // does not need to worry about idempotence and locking. Start(ctx context.Context) error // Stop should close the connections. The function is called // only once by the exporter, so the implementation does not // need to worry about idempotence, but it may be called // concurrently with UploadMetrics, so proper // locking is required. The function serves as a // synchronization point - after the function returns, the // process of closing connections is assumed to be finished. Stop(ctx context.Context) error // UploadMetrics should transform the passed metrics to the // wire format and send it to the collector. May be called // concurrently. UploadMetrics(ctx context.Context, protoMetrics []*metricpb.ResourceMetrics) error }
Client manages connections to the collector, handles the transformation of data into wire format, and the transmission of that data to the collector.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter exports metrics data in the OTLP wire format.
func NewUnstarted ¶
NewUnstarted constructs a new Exporter and does not start it.
func (*Exporter) Export ¶
func (e *Exporter) Export(ctx context.Context, res *resource.Resource, ilr metricsdk.InstrumentationLibraryReader) error
Export exports a batch of metrics.
func (*Exporter) Shutdown ¶
Shutdown flushes all exports and closes all connections to the receiving endpoint.
func (*Exporter) TemporalityFor ¶ added in v0.25.0
func (e *Exporter) TemporalityFor(descriptor *sdkapi.Descriptor, kind aggregation.Kind) aggregation.Temporality
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option are setting options passed to an Exporter on creation.
func WithMetricAggregationTemporalitySelector ¶ added in v0.25.0
func WithMetricAggregationTemporalitySelector(selector aggregation.TemporalitySelector) Option
WithMetricAggregationTemporalitySelector defines the aggregation.TemporalitySelector used for selecting aggregation.Temporality (i.e., Cumulative vs. Delta aggregation). If not specified otherwise, exporter will use a cumulative temporality selector.
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
metrictransform
Package metrictransform provides translations for opentelemetry-go concepts and structures to otlp structures.
|
Package metrictransform provides translations for opentelemetry-go concepts and structures to otlp structures. |
otlpmetricgrpc
module
|
|
otlpmetrichttp
module
|