Skip to content

Commit

Permalink
docs: Use updated metricstool to generate metrics reference
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis committed Mar 1, 2024
1 parent 04a32c5 commit f775376
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 112 deletions.
13 changes: 12 additions & 1 deletion cmd/tetra/metrics/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,18 @@ func New() *cobra.Command {
},
}

return metricsmd.NewCmd(nil, nil, map[string]string{}, targets, overrides, initMetrics)
config := &metricsmd.Config{
Targets: targets,
LabelOverrides: overrides,
InitMetrics: initMetrics,
HeadingLevel: 1,
}

cmd, err := metricsmd.NewCmd(nil, nil, config)
if err != nil {
slog.Error("failed to create metrics-docs command", "error", err)
}
return cmd
}

func initMetrics(target string, reg *prometheus.Registry, _ *slog.Logger) error {
Expand Down
Loading

0 comments on commit f775376

Please sign in to comment.