Documentation
¶
Index ¶
- type Client
- func (c *Client) Errorf(err error, extraMsg string, args ...interface{})
- func (c *Client) Flush(maxWait time.Duration)
- func (c *Client) InstrumentPGSegment(dbHost, dbPort, dbName, query string) func()
- func (c *Client) InstrumentSegment(name string, tags map[string]string) func()
- func (c *Client) InstrumentWebTxn(name string, w http.ResponseWriter, r *http.Request) (http.ResponseWriter, func())
- func (c *Client) LogDebugf(msg string, args ...interface{})
- func (c *Client) LogInfof(msg string, args ...interface{})
- func (c *Client) LogWarnf(msg string, args ...interface{})
- func (c *Client) SetInCtx(ctx context.Context) context.Context
- func (c *Client) WithOperationID(id string) *Client
- func (c *Client) WithRequest(r *http.Request) *Client
- func (c *Client) WithResponseInfo(status int, responseSize string, latency time.Duration) *Client
- func (c *Client) WithTag(k, v string) *Client
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the watchdog client
func (*Client) InstrumentPGSegment ¶
InstrumentPGSegment starts a Postgres segment instrumentation. The return is the `End` func to close the segment We are unable to use nrpgx integration to instrument because there's a bug where it won't capture the query properly. Ref - https://github.com/newrelic/go-agent/issues/208 So instead we are constructing our own datastore segment using the same implementation as nrgpx, but additionally, also setting the ParameterizedQuery.
func (*Client) InstrumentSegment ¶
func (*Client) InstrumentWebTxn ¶
func (c *Client) InstrumentWebTxn(name string, w http.ResponseWriter, r *http.Request) (http.ResponseWriter, func())
func (*Client) WithOperationID ¶
func (*Client) WithResponseInfo ¶
Click to show internal directories.
Click to hide internal directories.