Documentation ¶
Overview ¶
converter_influxdbreceiver.go
Index ¶
- func AppendConfig(file *builder.File, cfg *otelcol.Config, labelPrefix string, ...) diag.Diagnostics
- func Convert(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
- func ConvertWithoutValidation(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
- func StringifyBlock(block *builder.Block) string
- func StringifyInstanceID(id componentstatus.InstanceID) string
- func StringifyKind(k component.Kind) string
- func ToTokenizedConsumers(components []componentID) []otelcol.Consumer
- type ComponentConverter
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendConfig ¶
func AppendConfig(file *builder.File, cfg *otelcol.Config, labelPrefix string, extraConverters []ComponentConverter) diag.Diagnostics
AppendConfig converts the provided OpenTelemetry config into an equivalent Alloy config and appends the result to the provided file.
func Convert ¶
func Convert(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
Convert implements an Opentelemetry Collector config converter.
For compatibility with other converters, the extraArgs paramater is defined but unused, and a critical error diagnostic is returned if extraArgs is non-empty.
func ConvertWithoutValidation ¶
func ConvertWithoutValidation(in []byte, extraArgs []string) ([]byte, diag.Diagnostics)
ConvertWithoutValidation is similar to `otelcolconvert.go`'s Convert but without validating generated configs This is to help testing `sigv4authextension` converter as its Validate() method calls up external cloud service and we can't inject mock SigV4 credential provider since the attribute is set as internal in the upstream. Remove this once credentials provider is open for mocking.
func StringifyBlock ¶
func StringifyInstanceID ¶
func StringifyInstanceID(id componentstatus.InstanceID) string
func StringifyKind ¶
func ToTokenizedConsumers ¶
Types ¶
type ComponentConverter ¶
type ComponentConverter interface { // Factory should return the factory for the OpenTelemetry Collector // component. Factory() component.Factory // InputComponentName should return the name of the Alloy component where // other Alloy components forward OpenTelemetry data to. // // For example, a converter which emits a chain of components // (otelcol.receiver.prometheus -> prometheus.remote_write) should return // "otelcol.receiver.prometheus", which is the first component that receives // OpenTelemetry data in the chain. // // Converters which emit components that do not receive data from other // components must return an empty string. InputComponentName() string // ConvertAndAppend should convert the provided OpenTelemetry Collector // component configuration into Alloy configuration and append the result to // [state.Body]. Implementations are expected to append configuration where // all required arguments are set and all optional arguments are set to the // values from the input configuration or the Alloy default. // // ConvertAndAppend may be called more than once with the same component used // in different pipelines. Use [state.AlloyComponentLabel] to get a guaranteed // unique Alloy component label for the current state. ConvertAndAppend(state *State, id componentstatus.InstanceID, cfg component.Config) diag.Diagnostics }
ComponentConverter represents a converter which converts an OpenTelemetry Collector component into an Alloy component.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State represents the State of the conversion. The State tracks:
- The OpenTelemetry Collector config being converted.
- The current OpenTelemetry Collector pipelines being converted.
- The current OpenTelemetry Collector component being converted.
func (*State) AlloyComponentLabel ¶
AlloyComponentLabel returns the unique Alloy label for the OpenTelemetry Component component being converted. It is safe to use this label to create multiple Alloy components in a chain.
func (*State) Body ¶
Body returns the body of the file being generated. Implementations of [componentConverter] should use this to append components.
func (*State) LookupExtension ¶
func (*State) Next ¶
func (state *State) Next(c componentstatus.InstanceID, signal pipeline.Signal) []componentID
Next returns the set of Alloy component IDs for a given data type that the current component being converted should forward data to.
Source Files ¶
- converter.go
- converter_attributesprocessor.go
- converter_basicauthextension.go
- converter_batchprocessor.go
- converter_bearertokenauthextension.go
- converter_datadogexporter.go
- converter_datadogreceiver.go
- converter_debugexporter.go
- converter_deltatocumulativeprocessor.go
- converter_filestatsreceiver.go
- converter_filterprocessor.go
- converter_groupbyattrsprocessor.go
- converter_headerssetterextension.go
- converter_helpers.go
- converter_influxdbreceiver.go
- converter_intervalprocessor.go
- converter_jaegerreceiver.go
- converter_jaegerremotesamplingextension.go
- converter_k8sattributesprocessor.go
- converter_kafkaexporter.go
- converter_kafkareceiver.go
- converter_loadbalancingexporter.go
- converter_memorylimiterprocessor.go
- converter_oauth2clientauthextension.go
- converter_opencensusreceiver.go
- converter_otlpexporter.go
- converter_otlphttpexporter.go
- converter_otlpreceiver.go
- converter_probabilisticsamplerprocessor.go
- converter_servicegraphconnector.go
- converter_sigv4authextension.go
- converter_solacereceiver.go
- converter_spanmetricsconnector.go
- converter_spanprocessor.go
- converter_splunkhecexporter.go
- converter_syslogexporter.go
- converter_syslogreceiver.go
- converter_tailsamplingprocessor.go
- converter_transformprocessor.go
- converter_vcenterreceiver.go
- converter_zipkinreceiver.go
- otelcolconvert.go
- pipeline_group.go
- utils.go