Documentation
¶
Overview ¶
No op implementation for non linux platforms (new relix agent sdk only support linux right now)
Index ¶
- Variables
- func Init(app, key string)
- func NewRequestTx(name string, url string) *tx
- func NewTx(name string) *tx
- func RecordMetrics(interval time.Duration)
- func RecordMetricsWithRecorder(r Recorder)
- func WithTx(ctx context.Context, t Tx) context.Context
- type NRTxReporter
- type NRTxTracer
- func (t *NRTxTracer) BeginDatastoreSegment(txnID, parentID int64, table, operation, sql, rollupName string) (int64, error)
- func (t *NRTxTracer) BeginExternalSegment(txnID, parentID int64, host, name string) (int64, error)
- func (t *NRTxTracer) BeginGenericSegment(txnID, parentID int64, name string) (int64, error)
- func (t *NRTxTracer) BeginTransaction() (int64, error)
- func (t *NRTxTracer) EndSegment(txnID, parentID int64) error
- func (t *NRTxTracer) EndTransaction(txnID int64) error
- func (t *NRTxTracer) SetTransactionName(txnID int64, name string) error
- func (t *NRTxTracer) SetTransactionRequestURL(txnID int64, url string) error
- type Recorder
- type SegmentStack
- type Tx
- type TxReporter
- type TxTracer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTxAlreadyStarted = errors.New("transaction already started")
Functions ¶
func NewRequestTx ¶
NewRequestTx returns a new transaction with a request url.
func RecordMetrics ¶
RecordMetrics records metrics with the default metric recorder.
func RecordMetricsWithRecorder ¶
func RecordMetricsWithRecorder(r Recorder)
RecordMetricsWithRecorder records metrics with the given recorder.
Types ¶
type NRTxReporter ¶
type NRTxReporter struct{}
func (*NRTxReporter) ReportError ¶
func (r *NRTxReporter) ReportError(txnID int64, exceptionType, errorMessage, stackTrace, stackFrameDelim string) (int, error)
type NRTxTracer ¶
type NRTxTracer struct{}
func (*NRTxTracer) BeginDatastoreSegment ¶
func (t *NRTxTracer) BeginDatastoreSegment(txnID, parentID int64, table, operation, sql, rollupName string) (int64, error)
func (*NRTxTracer) BeginExternalSegment ¶
func (t *NRTxTracer) BeginExternalSegment(txnID, parentID int64, host, name string) (int64, error)
func (*NRTxTracer) BeginGenericSegment ¶
func (t *NRTxTracer) BeginGenericSegment(txnID, parentID int64, name string) (int64, error)
func (*NRTxTracer) BeginTransaction ¶
func (t *NRTxTracer) BeginTransaction() (int64, error)
func (*NRTxTracer) EndSegment ¶
func (t *NRTxTracer) EndSegment(txnID, parentID int64) error
func (*NRTxTracer) EndTransaction ¶
func (t *NRTxTracer) EndTransaction(txnID int64) error
func (*NRTxTracer) SetTransactionName ¶
func (t *NRTxTracer) SetTransactionName(txnID int64, name string) error
func (*NRTxTracer) SetTransactionRequestURL ¶
func (t *NRTxTracer) SetTransactionRequestURL(txnID int64, url string) error
type SegmentStack ¶
func NewSegmentStack ¶
func NewSegmentStack() *SegmentStack
func (*SegmentStack) Peek ¶
func (s *SegmentStack) Peek() int64
Peek returns id from the top of the stack. It returns rootSegment if the stack is empty.
func (*SegmentStack) Pop ¶
func (s *SegmentStack) Pop() (int64, bool)
Pop pops a segment id off of the segment stack. It returns false if the stack is empty.
func (*SegmentStack) Push ¶
func (s *SegmentStack) Push(id int64)
Push pushes a segment id onto the segment stack.
type Tx ¶
type Tx interface { Start() error End() error StartGeneric(name string) error StartDatastore(table, operation, sql, rollupName string) error StartExternal(host, name string) error EndSegment() error ReportError(exceptionType, errorMessage, stackTrace, stackFrameDelim string) error }
Tx represents a transaction.
type TxReporter ¶
type TxReporter interface {
ReportError(txnID int64, exceptionType, errorMessage, stackTrace, stackFrameDelim string) (int, error)
}
TxReporter reports the first error that occured during a transaction.
type TxTracer ¶
type TxTracer interface { BeginTransaction() (int64, error) EndTransaction(txnID int64) error SetTransactionName(txnID int64, name string) error SetTransactionRequestURL(txnID int64, url string) error BeginGenericSegment(txnID int64, parentID int64, name string) (int64, error) BeginDatastoreSegment(txnID int64, parentID int64, table string, operation string, sql string, rollupName string) (int64, error) BeginExternalSegment(txnID int64, parentID int64, host string, name string) (int64, error) EndSegment(txnID int64, parentID int64) error }
TxTracer handles transaction tracing.
Click to show internal directories.
Click to hide internal directories.