Documentation
¶
Index ¶
Constants ¶
const ( // TagNone disables tagging of payloads to Humio TagNone tag = "none" // TagTraceID tags payloads to Humio using the trace ID, or an empty string if // the trace ID is missing TagTraceID tag = "trace_id" // TagServiceName tags payloads to Humio using the service name, or an empty // string if it is missing TagServiceName tag = "service_name" )
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates an exporter factory for Humio
Types ¶
type Config ¶
type Config struct { // Inherited settings confighttp.HTTPClientSettings `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` // Whether gzip compression should be disabled when sending data to Humio DisableCompression bool `mapstructure:"disable_compression"` // Name of tagging strategy used to target specific data sources for storage inside Humio Tag Tagger `mapstructure:"tag"` // Configuration options specific to logs Logs LogsConfig `mapstructure:"logs"` // Configuration options specific to traces Traces TracesConfig `mapstructure:"traces"` // contains filtered or unexported fields }
Config represents the Humio configuration settings
type HumioLink ¶ added in v0.26.0
type HumioLink struct { TraceID string `json:"trace_id"` SpanID string `json:"span_id"` TraceState string `json:"state,omitempty"` }
HumioLink represents a relation between two spans
type HumioSpan ¶ added in v0.26.0
type HumioSpan struct { TraceID string `json:"trace_id"` SpanID string `json:"span_id"` ParentSpanID string `json:"parent_id,omitempty"` Name string `json:"name"` Kind string `json:"kind"` Start int64 `json:"start"` End int64 `json:"end"` StatusCode string `json:"status,omitempty"` StatusDescription string `json:"status_descr,omitempty"` ServiceName string `json:"service"` Links []*HumioLink `json:"links,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` }
HumioSpan represents a span as it is stored inside Humio
type HumioStructuredEvent ¶
type HumioStructuredEvent struct { // The time where the event occurred Timestamp time.Time // Whether to serialize the timestamp as Unix or ISO AsUnix bool // The event payload Attributes interface{} }
HumioStructuredEvent represents a single structured event to send to Humio
func (*HumioStructuredEvent) MarshalJSON ¶
func (e *HumioStructuredEvent) MarshalJSON() ([]byte, error)
MarshalJSON formats the timestamp in a HumioStructuredEvent as either an ISO string or a Unix timestamp in milliseconds with time zone
type HumioStructuredEvents ¶
type HumioStructuredEvents struct { // Tags used to target specific data sources in Humio Tags map[string]string `json:"tags,omitempty"` // The series of structured events Events []*HumioStructuredEvent `json:"events"` }
HumioStructuredEvents represents a payload of multiple structured events to send to Humio
type HumioUnstructuredEvents ¶
type HumioUnstructuredEvents struct { // Key-value pairs to associate with the messages as metadata Fields map[string]string `json:"fields,omitempty"` // Tags used to target specific data sources in Humio Tags map[string]string `json:"tags,omitempty"` // The name of the parser to handle these messages inside Humio Type string `json:"type,omitempty"` // The series of unstructured messages Messages []string `json:"messages"` }
HumioUnstructuredEvents represents a payload of multiple unstructured events (strings) to send to Humio
type LogsConfig ¶
type LogsConfig struct { // Ingest token for identifying and authorizing with a Humio repository IngestToken string `mapstructure:"ingest_token"` // The name of a custom log parser to use, if no parser is associated with the ingest token LogParser string `mapstructure:"log_parser"` }
LogsConfig represents the Humio configuration settings specific to logs
type TagOrganizer ¶ added in v0.26.0
type TagOrganizer struct {
// contains filtered or unexported fields
}
TagOrganizer represents a type for organizing HumioStructuredEvents by tag while a tree of structured data from OpenTelemetry is being converted into Humio's format. Depending on the tagging strategy, the structure of resource- and instrumentation logs/spans is not necessarily optimal for sending to Humio
type Tagger ¶ added in v0.26.0
type Tagger interface {
Tag() tag
}
Tagger represents a tagging strategy understood by the Humio exporter
type TracesConfig ¶
type TracesConfig struct { // Ingest token for identifying and authorizing with a Humio repository IngestToken string `mapstructure:"ingest_token"` // Whether to use Unix timestamps, or to fall back to ISO 8601 formatted strings UnixTimestamps bool `mapstructure:"unix_timestamps"` }
TracesConfig represents the Humio configuration settings specific to traces