Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TextFormat represents log_format: text TextFormat LogFormatType = "text" // JSONFormat represents log_format: json JSONFormat LogFormatType = "json" // OTLPLogFormat represents log_format: otlp OTLPLogFormat LogFormatType = "otlp" // RemovedGraphiteFormat represents the no longer supported graphite metric format RemovedGraphiteFormat MetricFormatType = "graphite" // RemovedCarbon2Format represents the no longer supported carbon2 metric format RemovedCarbon2Format MetricFormatType = "carbon2" // PrometheusFormat represents metric_format: prometheus PrometheusFormat MetricFormatType = "prometheus" // OTLPMetricFormat represents metric_format: otlp OTLPMetricFormat MetricFormatType = "otlp" // OTLPTraceFormat represents trace_format: otlp OTLPTraceFormat TraceFormatType = "otlp" // NoCompression represents disabled compression NoCompression configcompression.Type = "" // MetricsPipeline represents metrics pipeline MetricsPipeline PipelineType = "metrics" // LogsPipeline represents metrics pipeline LogsPipeline PipelineType = "logs" // TracesPipeline represents traces pipeline TracesPipeline PipelineType = "traces" // DefaultCompress defines default Compress DefaultCompress bool = true // DefaultCompressEncoding defines default CompressEncoding DefaultCompressEncoding configcompression.Type = "gzip" // DefaultMaxRequestBodySize defines default MaxRequestBodySize in bytes DefaultMaxRequestBodySize int = 1 * 1024 * 1024 // DefaultLogFormat defines default LogFormat DefaultLogFormat LogFormatType = OTLPLogFormat // DefaultMetricFormat defines default MetricFormat DefaultMetricFormat MetricFormatType = OTLPMetricFormat // DefaultClient defines default Client DefaultClient string = "otelcol" // DefaultLogKey defines default LogKey value DefaultLogKey string = "log" // DefaultDropRoutingAttribute defines default DropRoutingAttribute DefaultDropRoutingAttribute string = "" // DefaultStickySessionEnabled defines default StickySessionEnabled value DefaultStickySessionEnabled bool = false )
Variables ¶
View Source
var Type = component.MustNewType(typeStr)
Functions ¶
func CreateDefaultClientConfig ¶
func CreateDefaultClientConfig() confighttp.ClientConfig
CreateDefaultClientConfig returns default http client settings
func DecomposeHistograms ¶
DecomposeHistograms decomposes any histograms present in the metric data into individual Sums and Gauges This is a noop if no Histograms are present, but otherwise makes a copy of the whole structure This exists because Sumo doesn't support OTLP histograms yet, and has the same semantics as the conversion to Prometheus format in prometheus_formatter.go
func NewFactory ¶
NewFactory returns a new factory for the sumologic exporter.
Types ¶
type Config ¶
type Config struct { confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` configretry.BackOffConfig `mapstructure:"retry_on_failure"` // Compression encoding format, either empty string, gzip or deflate (default gzip) // Empty string means no compression // NOTE: CompressEncoding is deprecated and will be removed in an upcoming release CompressEncoding configcompression.Type `mapstructure:"compress_encoding"` // Max HTTP request body size in bytes before compression (if applied). // By default 1MB is recommended. MaxRequestBodySize int `mapstructure:"max_request_body_size"` // Logs related configuration // Format to post logs into Sumo. (default json) // * text - Logs will appear in Sumo Logic in text format. // * json - Logs will appear in Sumo Logic in json format. // * otlp - Logs will be send in otlp format and will appear in Sumo Logic in text format. LogFormat LogFormatType `mapstructure:"log_format"` // Metrics related configuration // The format of metrics you will be sending, either otlp or prometheus (Default is otlp) MetricFormat MetricFormatType `mapstructure:"metric_format"` // Decompose OTLP Histograms into individual metrics, similar to how they're represented in Prometheus format DecomposeOtlpHistograms bool `mapstructure:"decompose_otlp_histograms"` // Traces related configuration // The format of traces you will be sending, currently only otlp format is supported TraceFormat TraceFormatType `mapstructure:"trace_format"` // Sumo specific options // Name of the client Client string `mapstructure:"client"` // StickySessionEnabled defines if sticky session support is enable. // By default this is false. StickySessionEnabled bool `mapstructure:"sticky_session_enabled"` }
Config defines configuration for Sumo Logic exporter.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.