observability

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const AccountUnset = "unset"
View Source
const DATETIME = "DATETIME(6)"
View Source
const DOUBLE = "DOUBLE"
View Source
const DatabaseUnset = "unset"
View Source
const JSON = "JSON"
View Source
const LogsTableName = "logs"
View Source
const MetricsTableName = "metrics"
View Source
const STRING = "VARCHAR(1024)"
View Source
const SpansTableName = "spans"
View Source
const TEXT = "TEXT"
View Source
const UINT64 = "BIGINT UNSIGNED"

Variables

View Source
var (
	MetricNameColumn      = table.StringColumn("name", "metric name")
	MetricTimestampColumn = table.DatetimeColumn(`timestamp`, `metric data collect time`)
	MetricValueColumn     = table.ValueColumn(`value`, `metric value`)
	MetricLabelsColumn    = table.JsonColumn(`labels`, `key-value json mark labels`)
	MetricSeriesIDColumn  = table.StringColumn("series_id", `abstract of json labels`)
)
View Source
var (
	LogsTraceIDCol     = table.UuidStringColumn("trace_id", "related request's TraceId")
	LogsSpanIDCol      = table.SpanIDStringColumn("span_id", "related request's SpanId")
	LogsTimestampCol   = table.DatetimeColumn(`timestamp`, "log recorded timestamp")
	LogsCollectTimeCol = table.DatetimeColumn(`collect_time`, "log recorded timestamp")
	LogsLoggerNameCol  = table.StringColumn("logger_name", "logger name")
	LogsLevelCol       = table.StringColumn("level", "log level, enum: debug, info, warn, error, panic, fatal")
	LogsCallerCol      = table.StringColumn("caller", "log caller, like: package/file.go:123")
	LogsMessageCol     = table.TextColumn("message", "log message content")
	LogsStackCol       = table.StringColumn("stack", "log caller stack info")
	LogsLabelsCol      = table.JsonColumn(`labels`, `key-value json mark labels`)
)
View Source
var (
	SpansTraceIDCol       = table.UuidStringColumn("trace_id", "TraceId")
	SpansSpanIDCol        = table.SpanIDStringColumn("span_id", "SpanId")
	SpansParentTraceIDCol = table.SpanIDStringColumn("parent_span_id", "Parent span Id")
	SpansSpanKindCol      = table.StringDefaultColumn("span_kind", "internal", "span kind")
	SpansSpanNameCol      = table.StringColumn("span_name", "span name")
	SpansStartTimeCol     = table.DatetimeColumn("start_time", "start time")
	SpansEndTimeCol       = table.DatetimeColumn("end_time", "end time")
	SpansDurationCol      = table.UInt64Column("duration", "exec time, unit: ns")
	SpansResourceCol      = table.JsonColumn(`resource`, `key-value json`)
	SpansAttributesCol    = table.JsonColumn(`attributes`, `key-value json`)
	SpansStatusCol        = table.JsonColumn(`status`, `key-value json`)
	SpansEventsCol        = table.JsonColumn(`event`, `key-value json`)
	SpansLinksCol         = table.JsonColumn(`links`, `array json`)
)
View Source
var LogsTable = &table.Table{
	Account:  AccountUnset,
	Database: DatabaseUnset,
	Table:    LogsTableName,
	Columns: []table.Column{
		LogsTraceIDCol, LogsSpanIDCol,
		LogsTimestampCol, LogsCollectTimeCol,
		LogsLoggerNameCol, LogsLevelCol, LogsCallerCol, LogsMessageCol, LogsStackCol,
		LogsLabelsCol,
	},
	PrimaryKeyColumn: []table.Column{},
	Engine:           table.ExternalTableEngine,
	Comment:          `logs data`,
	PathBuilder:      table.NewAccountDatePathBuilder(table.WithDatabase(true)),
	AccountColumn:    nil,

	SupportUserAccess:  false,
	SupportConstAccess: true,
}
View Source
var MetricTable = &table.Table{
	Account:  AccountUnset,
	Database: DatabaseUnset,
	Table:    MetricsTableName,
	Columns: []table.Column{
		MetricNameColumn, MetricTimestampColumn, MetricValueColumn, MetricLabelsColumn, MetricSeriesIDColumn,
	},
	PrimaryKeyColumn: []table.Column{},
	Engine:           table.ExternalTableEngine,
	Comment:          `metric data`,
	PathBuilder:      table.NewAccountDatePathBuilder(table.WithDatabase(true)),
	AccountColumn:    nil,

	SupportUserAccess:  false,
	SupportConstAccess: true,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL