Skip to content
Permalink
Browse files

[skip ci] Updating doc

  • Loading branch information...
Depado committed Jan 3, 2018
1 parent b8b7d9f commit e35fa08acb42f9e2f4a24e75b51a6d29140d14e5
Showing with 10 additions and 3 deletions.
  1. +10 −3 README.md
@@ -19,6 +19,7 @@ Simply run :
- No support for Prometheus' Push Gateway
- Options on constructor
- Adds a `path` label to get the matched route
- Ability to ignore routes

## Usage

@@ -32,7 +33,10 @@ import (
func main() {
r := gin.Default()
p := ginprom.New(ginprom.Subsystem("gin"), ginprom.Path("/metrics"), ginprom.Engine(r))
p := ginprom.New(
ginprom.Subsystem("gin"),
ginprom.Path("/metrics"),
)
r.Use(p.Instrument())
r.GET("/hello/:id", func(c *gin.Context) {})
@@ -52,6 +56,9 @@ Specify the subsystem
Default : "gin"

`Engine(e *gin.Engine)`
Specify the Gin engine directly when intializing.
Specify the Gin engine directly when initializing.
Saves a call to `Use(e *gin.Engine)`
Default : `nil`
Default : `nil`

`Ignore(paths ...string)`
Specify which paths should not be taken into account by the middleware.

0 comments on commit e35fa08

Please sign in to comment.
You can’t perform that action at this time.