Skip to content

Commit

Permalink
feat(monitor): added metric config desc
Browse files Browse the repository at this point in the history
  • Loading branch information
Suyghur authored and kesonan committed Oct 31, 2023
1 parent 70b3ee7 commit 672bdd7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/tutorials/monitor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ go_goroutines 12

```go
srv := rest.MustNewServer(rest.RestConf{
Port: 8080,
Port: 8002,
ServiceConf: service.ServiceConf{
DevServer: devserver.Config{
Enabled: true,
Expand All @@ -161,6 +161,22 @@ srv := rest.MustNewServer(rest.RestConf{
})
```

对应配置:

```yaml
Name: user-api
Host: 0.0.0.0
Port: 8002
Mode: dev
......
DevServer:
Enabled: true
Port: 6470
MetricsPath: /metrics
EnableMetrics: false
```

go-zero 默认集成的 prometheus 指标如下:

### RPC Server
Expand Down

0 comments on commit 672bdd7

Please sign in to comment.