Documentation
¶
Index ¶
- Constants
- Variables
- func LogsToPB(dbLog []Log) []*otlplogsv1.ResourceLogs
- func MarshalProtoJSONs[T proto.Message](protos []T) ([]byte, error)
- func MetricsToPB(dbMetrics []Metric) []*otlpmetricsv1.ResourceMetrics
- func UnmarshalProtoJSONs[T proto.Message](pb []byte, base T, out *[]T) error
- type DBTX
- type DBs
- type InsertLogParams
- type InsertSpanParams
- type Log
- type Metric
- type Queries
- func (q *Queries) InsertLog(ctx context.Context, arg InsertLogParams) (int64, error)
- func (q *Queries) InsertMetric(ctx context.Context, data []byte) (int64, error)
- func (q *Queries) InsertSpan(ctx context.Context, arg InsertSpanParams) (int64, error)
- func (q *Queries) SelectLogsSince(ctx context.Context, arg SelectLogsSinceParams) ([]Log, error)
- func (q *Queries) SelectMetricsSince(ctx context.Context, arg SelectMetricsSinceParams) ([]Metric, error)
- func (q *Queries) SelectSpansSince(ctx context.Context, arg SelectSpansSinceParams) ([]Span, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SelectLogsSinceParams
- type SelectMetricsSinceParams
- type SelectSpansSinceParams
- type Span
Constants ¶
View Source
const CollectGarbageAfter = time.Hour
CollectGarbageAfter is the time after which a database is considered garbage and can be deleted.
Variables ¶
View Source
var Schema string
Functions ¶
func LogsToPB ¶ added in v0.13.1
func LogsToPB(dbLog []Log) []*otlplogsv1.ResourceLogs
func MarshalProtoJSONs ¶ added in v0.13.1
func MetricsToPB ¶ added in v0.13.6
func MetricsToPB(dbMetrics []Metric) []*otlpmetricsv1.ResourceMetrics
Types ¶
type DBs ¶
type DBs struct {
Root string
}
func (*DBs) Create ¶
Create creates a new database for the given clientID and runs the schema migration. This operation must be idempotent.
type InsertLogParams ¶
type InsertSpanParams ¶
type InsertSpanParams struct { TraceID string SpanID string TraceState string ParentSpanID sql.NullString Flags int64 Name string Kind string StartTime int64 EndTime sql.NullInt64 Attributes []byte DroppedAttributesCount int64 Events []byte DroppedEventsCount int64 Links []byte DroppedLinksCount int64 StatusCode int64 StatusMessage string InstrumentationScope []byte Resource []byte ResourceSchemaUrl string }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) InsertMetric ¶ added in v0.13.6
func (*Queries) InsertSpan ¶
func (*Queries) SelectLogsSince ¶
func (*Queries) SelectMetricsSince ¶ added in v0.13.6
func (*Queries) SelectSpansSince ¶
type SelectLogsSinceParams ¶
type SelectMetricsSinceParams ¶ added in v0.13.6
type SelectSpansSinceParams ¶
type Span ¶
type Span struct { ID int64 TraceID string SpanID string TraceState string ParentSpanID sql.NullString Flags int64 Name string Kind string StartTime int64 EndTime sql.NullInt64 Attributes []byte DroppedAttributesCount int64 Events []byte DroppedEventsCount int64 Links []byte DroppedLinksCount int64 StatusCode int64 StatusMessage string InstrumentationScope []byte Resource []byte ResourceSchemaUrl string }
func (*Span) ReadOnly ¶
func (span *Span) ReadOnly() sdktrace.ReadOnlySpan
Click to show internal directories.
Click to hide internal directories.