Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TimeSerieSQL = func(clustered bool) string { dist := "" if clustered { dist = "_dist" } return fmt.Sprintf(`INSERT INTO time_series%s ( date, fingerprint, labels, name)`, dist) } )
Functions ¶
func NewFactory ¶
NewFactory creates a factory for Logging exporter
func TracesTagsV2InputSQL ¶
func TracesV2InputSQL ¶
Types ¶
type Config ¶
type Config struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` configretry.BackOffConfig `mapstructure:"retry_on_failure"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` // ClientSideTraceProcessing is a boolean that indicates whether to process traces on the client side. ClientSideTraceProcessing bool `mapstructure:"client_side_trace_processing"` ClusteredClickhouse bool `mapstructure:"clustered_clickhouse"` // DSN is the ClickHouse server Data Source Name. // For tcp protocol reference: [ClickHouse/clickhouse-go#dsn](https://github.com/ClickHouse/clickhouse-go#dsn). // For http protocol reference: [mailru/go-clickhouse/#dsn](https://github.com/mailru/go-clickhouse/#dsn). DSN string `mapstructure:"dsn"` // Logs is used to configure the log data. Logs LogsConfig `mapstructure:"logs"` // Metrics is used to configure the metric data. Metrics MetricsConfig `mapstructure:"metrics"` }
Config defines configuration for logging exporter.
type LogsConfig ¶
type LogsConfig struct { // AttributeLabels is the string representing attribute labels. AttributeLabels string `mapstructure:"attribute_labels"` // ResourceLabels is the string representing resource labels. ResourceLabels string `mapstructure:"resource_labels"` // Format is the string representing the format. Format string `mapstructure:"format"` }
LogsConfig holds the configuration for log data.
type MetricsConfig ¶
type MetricsConfig struct { // Namespace is the prefix attached to each exported metric name. // See: https://prometheus.io/docs/practices/naming/#metric-names Namespace string `mapstructure:"namespace"` }
MetricsConfig holds the configuration for metric data.
type Sample ¶
type Sample struct { Fingerprint uint64 `ch:"fingerprint"` TimestampNs int64 `ch:"timestamp_ns"` Value float64 `ch:"value"` String string `ch:"string"` }
Sample represent sample data `CREATE TABLE IF NOT EXISTS samples_v3 (
fingerprint UInt64, timestamp_ns Int64 CODEC(DoubleDelta), value Float64 CODEC(Gorilla), string String
) ENGINE = MergeTree PARTITION BY toStartOfDay(toDateTime(timestamp_ns / 1000000000)) ORDER BY ({{SAMPLES_ORDER_RUL}})`
type TempoTrace ¶
type TempoTrace struct { OID string `ch:"oid"` TraceID []byte `ch:"trace_id"` SpanID []byte `ch:"span_id"` ParentID []byte `ch:"parent_id"` Name string `ch:"name"` TimestampNs int64 `ch:"timestamp_ns"` DurationNs int64 `ch:"duration_ns"` ServiceName string `ch:"service_name"` PayloadType int8 `ch:"payload_type"` Payload string `ch:"payload"` }
type TempoTraceTag ¶
type TimeSerie ¶
type TimeSerie struct { Date time.Time `ch:"date"` Fingerprint uint64 `ch:"fingerprint"` Labels string `ch:"labels"` Name string `ch:"name"` }
TimeSerie represent TimeSerie `CREATE TABLE IF NOT EXISTS time_series (
date Date, fingerprint UInt64, labels String, name String
) ENGINE = ReplacingMergeTree(date) PARTITION BY date ORDER BY fingerprint
type TraceInput ¶
type TraceInput struct { TraceID string `ch:"trace_id"` SpanID string `ch:"span_id"` ParentID string `ch:"parent_id"` Name string `ch:"name"` TimestampNs int64 `ch:"timestamp_ns"` DurationNs int64 `ch:"duration_ns"` ServiceName string `ch:"service_name"` PayloadType int8 `ch:"payload_type"` Payload string `ch:"payload"` Tags [][]string `ch:"tags"` }
TraceInput represent trace model