Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromToOtlpExporter ¶
type PromToOtlpExporter struct {
// contains filtered or unexported fields
}
PromToOtlpExporter clones Prometheus WriteRequests to an OTLP/HTTP endpoint Implements RemoteWriteClient
func NewPromToOtlpExporter ¶
func NewPromToOtlpExporter(opts PromToOtlpExporterOpts) *PromToOtlpExporter
func (*PromToOtlpExporter) CloseIdleConnections ¶
func (c *PromToOtlpExporter) CloseIdleConnections()
func (*PromToOtlpExporter) Write ¶
func (c *PromToOtlpExporter) Write(ctx context.Context, wr *prompb.WriteRequest) error
Write sends the given WriteRequest to the given OTLP endpoint
type PromToOtlpExporterOpts ¶
type PromToOtlpExporterOpts struct {
Transformer *transform.RequestTransformer
Destination string
AddResourceAttributes map[string]string
// Close controls whether the client closes the connection after each request.
Close bool
// Timeout is the timeout for the http client and the http request.
Timeout time.Duration
// InsecureSkipVerify controls whether the client verifies the server's certificate chain and host name.
InsecureSkipVerify bool
// IdleConnTimeout is the maximum amount of time an idle (keep-alive) connection
// will remain idle before closing itself.
IdleConnTimeout time.Duration
// ResponseHeaderTimeout is the amount of time to wait for a server's response headers
// after fully writing the request (including its body, if any).
ResponseHeaderTimeout time.Duration
// MaxIdleConns controls the maximum number of idle (keep-alive) connections across all hosts.
MaxIdleConns int
// MaxIdleConnsPerHost, if non-zero, controls the maximum idle (keep-alive) per host.
MaxIdleConnsPerHost int
// MaxConnsPerHost, if non-zero, controls the maximum connections per host.
MaxConnsPerHost int
// TLSHandshakeTimeout specifies the maximum amount of time to
// wait for a TLS handshake. Zero means no timeout.
TLSHandshakeTimeout time.Duration
// DisableHTTP2 controls whether the client disables HTTP/2 support.
DisableHTTP2 bool
// DisableKeepAlives controls whether the client disables HTTP keep-alives.
DisableKeepAlives bool
}
func (PromToOtlpExporterOpts) WithDefaults ¶
func (c PromToOtlpExporterOpts) WithDefaults() PromToOtlpExporterOpts
Click to show internal directories.
Click to hide internal directories.