Documentation ¶
Index ¶
- Variables
- func NewLogs() plog.Logs
- func NewMetrics() pmetric.Metrics
- func NewOTLPHTTPExporter(ctx context.Context, logger log.Logger, cfg Config) (otelexporter.Metrics, otelexporter.Logs, otelexporter.Traces, error)
- func NewTraces() ptrace.Traces
- type Config
- type Host
- func (h *Host) GetExporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
- func (h *Host) GetExtensions() map[otelcomponent.ID]otelextension.Extension
- func (h *Host) GetFactory(kind otelcomponent.Kind, componentType otelcomponent.Type) otelcomponent.Factory
- func (h *Host) ReportFatalError(err error)
- type HostOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultEndpoint = "http://localhost:4318" DefaultConfig = Config{ MetricsEndpoint: DefaultEndpoint + "/v1/metrics", LogsEndpoint: DefaultEndpoint + "/v1/logs", TracesEndpoint: DefaultEndpoint + "/v1/traces", } )
Functions ¶
func NewMetrics ¶
func NewOTLPHTTPExporter ¶
func NewOTLPHTTPExporter(ctx context.Context, logger log.Logger, cfg Config) (otelexporter.Metrics, otelexporter.Logs, otelexporter.Traces, error)
Types ¶
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host implements otelcomponent.Host for Grafana Agent Flow.
func (*Host) GetExporters ¶
func (h *Host) GetExporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
GetExporters implements otelcomponent.Host.
func (*Host) GetExtensions ¶
func (h *Host) GetExtensions() map[otelcomponent.ID]otelextension.Extension
GetExtensions implements otelcomponent.Host.
func (*Host) GetFactory ¶
func (h *Host) GetFactory(kind otelcomponent.Kind, componentType otelcomponent.Type) otelcomponent.Factory
GetFactory implements otelcomponent.Host.
func (*Host) ReportFatalError ¶
ReportFatalError implements otelcomponent.Host.
type HostOption ¶
type HostOption func(*Host)
HostOption customizes behavior of the Host.
func WithHostExporters ¶
func WithHostExporters(exporters map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component) HostOption
WithHostExporters provides a custom set of exporters to the Host.
func WithHostExtensions ¶
func WithHostExtensions(extensions map[otelcomponent.ID]otelextension.Extension) HostOption
WithHostExtensions provides a custom set of extensions to the Host.
Click to show internal directories.
Click to hide internal directories.