Documentation
¶
Index ¶
- Constants
- type Agent
- func (a *Agent) Configure(agentKey string, appName string)
- func (a *Agent) MeasureHandler(pattern string, handler http.Handler) (string, http.Handler)
- func (a *Agent) MeasureHandlerFunc(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) (string, func(http.ResponseWriter, *http.Request))
- func (a *Agent) MeasureSegment(segmentName string) *Segment
- func (a *Agent) Profile() *Span
- func (a *Agent) ProfileHandler(pattern string, handler http.Handler) (string, http.Handler)
- func (a *Agent) ProfileHandlerFunc(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) (string, func(http.ResponseWriter, *http.Request))
- func (a *Agent) ReadMetrics() []interface{}
- func (a *Agent) RecordAndRecoverPanic()
- func (a *Agent) RecordError(err interface{})
- func (a *Agent) RecordPanic()
- func (a *Agent) Start(options Options)
- type Options
- type Segment
- type Span
Constants ¶
const ErrorGroupHandledExceptions string = "Handled exceptions"
const ErrorGroupRecoveredPanics string = "Recovered panics"
const ErrorGroupUnrecoveredPanics string = "Unrecovered panics"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// compatibility < 1.2.0
DashboardAddress string
AgentKey string
AppName string
HostName string
Debug bool
// contains filtered or unexported fields
}
func Start ¶ added in v1.4.3
Starts the agent with configuration options. Required options are AgentKey and AppName.
func (*Agent) MeasureHandler ¶ added in v1.3.10
A helper function to measure HTTP handler execution by wrapping http.Handle method parameters.
func (*Agent) MeasureHandlerFunc ¶ added in v1.3.10
func (a *Agent) MeasureHandlerFunc(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) (string, func(http.ResponseWriter, *http.Request))
A helper function to measure HTTP handler function execution by wrapping http.HandleFunc method parameters.
func (*Agent) MeasureSegment ¶ added in v1.1.2
Starts measurement of execution time of a code segment. To stop measurement call Stop on returned Segment object. After calling Stop the segment is recorded, aggregated and reported with regular intervals.
func (*Agent) Profile ¶
Use this method to instruct the agent to start and stop profiling. It does not guarantee that any profiler will be started. The decision is made by the agent based on the overhead constraints. The method returns Span object, on which the Stop() method should be called.
func (*Agent) ProfileHandler ¶
A helper function to profile HTTP handler execution by wrapping http.Handle method parameters.
func (*Agent) ProfileHandlerFunc ¶
func (a *Agent) ProfileHandlerFunc(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) (string, func(http.ResponseWriter, *http.Request))
A helper function to profile HTTP handler function execution by wrapping http.HandleFunc method parameters.
func (*Agent) ReadMetrics ¶
func (a *Agent) ReadMetrics() []interface{}
Returns reported metrics in standalone mode.
func (*Agent) RecordAndRecoverPanic ¶ added in v1.2.0
func (a *Agent) RecordAndRecoverPanic()
Aggregates and reports panics with regular intervals. This function also recovers from panics
func (*Agent) RecordError ¶ added in v1.2.0
func (a *Agent) RecordError(err interface{})
Aggregates and reports errors with regular intervals.
func (*Agent) RecordPanic ¶ added in v1.2.0
func (a *Agent) RecordPanic()
Aggregates and reports panics with regular intervals.
Directories
¶
| Path | Synopsis |
|---|---|
|
pprof/profile
Package profile provides a representation of profile.proto and methods to encode/decode profiles in this format.
|
Package profile provides a representation of profile.proto and methods to encode/decode profiles in this format. |
