package sqltrace

import "sourcegraph.com/sourcegraph/appdash/sqltrace"

Package sqltrace implements utility types for tracing SQL queries.

Index

Types

type SQLEvent

type SQLEvent struct {
	SQL        string
	Tag        string
	ClientSend time.Time
	ClientRecv time.Time
}

SQLEvent is an SQL query event for use with appdash. It's primary function is to measure the time between when the query is sent and later received.

func (SQLEvent) End

func (e SQLEvent) End() time.Time

End implements the appdash TimespanEvent interface by returning the time at which the SQL query returned / was received.

func (SQLEvent) Important

func (SQLEvent) Important() []string

Important implements the appdash ImportantEvent by returning the SQL and Tag keys.

func (SQLEvent) Schema

func (SQLEvent) Schema() string

Schema implements the appdash Event interface by returning this event's constant schema string, "SQL".

func (SQLEvent) Start

func (e SQLEvent) Start() time.Time

Start implements the appdash TimespanEvent interface by returning the time at which the SQL query was sent out.

Source Files

sql.go

Version
v0.0.0-20211028080628-e2786a622600 (latest)
Published
Oct 28, 2021
Platform
js/wasm
Imports
2 packages
Last checked
4 hours ago

Tools for package owners.