Documentation
¶
Index ¶
- Constants
- Variables
- func MarshalProtos[T proto.Message](protos []T) ([]byte, error)
- func UnmarshalProtos[T proto.Message](pb []byte, base T, out *[]T) error
- type DBTX
- type DBs
- type InsertLogParams
- type InsertSpanParams
- type Log
- type Queries
- func (q *Queries) InsertLog(ctx context.Context, arg InsertLogParams) (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) SelectSpansSince(ctx context.Context, arg SelectSpansSinceParams) ([]Span, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SelectLogsSinceParams
- 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 ¶
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 InsertLogParams struct {
TraceID sql.NullString
SpanID sql.NullString
Timestamp int64
Severity int64
Body []byte
Attributes []byte
}
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
}
type Log ¶
type Log struct {
ID int64
TraceID sql.NullString
SpanID sql.NullString
Timestamp int64
Severity int64
Body []byte
Attributes []byte
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) InsertSpan ¶
func (*Queries) SelectLogsSince ¶
func (*Queries) SelectSpansSince ¶
-- name: InsertMetric :one INSERT INTO metrics (
name, description, unit, type, timestamp, data_points
) VALUES (
?, ?, ?, ?, ?, ?
) RETURNING id;
type SelectLogsSinceParams ¶
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
}
func (*Span) ReadOnly ¶
func (span *Span) ReadOnly() sdktrace.ReadOnlySpan
Click to show internal directories.
Click to hide internal directories.