Documentation
¶
Index ¶
- Constants
- func GetChiRouterName(stmt dst.Stmt) string
- func InstrumentChiMiddleware(manager *parser.InstrumentationManager, stmt dst.Stmt, c *dstutil.Cursor, ...) bool
- func InstrumentChiRouterLiteral(manager *parser.InstrumentationManager, stmt dst.Stmt, c *dstutil.Cursor, ...) bool
- func NrChiMiddleware(routerName string, agentVariableName dst.Expr) (*dst.ExprStmt, string)
Constants ¶
View Source
const (
GochiImportPath = "github.com/go-chi/chi/v5"
)
View Source
const (
NrChiImportPath = "github.com/newrelic/go-agent/v3/integrations/nrgochi"
)
Variables ¶
This section is empty.
Functions ¶
func GetChiRouterName ¶
Return the variable name of the Chi router object. Ex:
router := chi.NewRouter() ^^^^^^
func InstrumentChiMiddleware ¶
func InstrumentChiMiddleware(manager *parser.InstrumentationManager, stmt dst.Stmt, c *dstutil.Cursor, tracing *tracestate.State) bool
InstrumentChiMiddleware detects whether a Chi Router has been initialized and adds New Relic Go Agent Middleware via the router.Use() method to instrument the routes registered to the router.
func InstrumentChiRouterLiteral ¶
func InstrumentChiRouterLiteral(manager *parser.InstrumentationManager, stmt dst.Stmt, c *dstutil.Cursor, tracing *tracestate.State) bool
InstrumentChiRouterLiteral detects if a Chi Router route uses a function literal and adds Txn/Segment tracing logic directly to the function literal block.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.