mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-18 04:43:12 +02:00
Produce OpenTelemetry metrics (#185)
* .golangci.yml: remove mentions of deprecated linters * Fix "staticcheck" linter error by using grpc.NewClient * Configure OpenTelemetry Metrics only for now. * Produce OpenTelemetry metrics * Update DeploymentGuide.md Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> * Update DeploymentGuide.md Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> * Introduce "org.cirruslabs.orchard.controller.worker_status" --------- Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
This commit is contained in:
co-authored by
Fedor Korotkov
parent
1f5bb26d20
commit
ff0497b1d8
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/cirruslabs/orchard/internal/command/ssh"
|
||||
"github.com/cirruslabs/orchard/internal/command/vnc"
|
||||
"github.com/cirruslabs/orchard/internal/command/worker"
|
||||
"github.com/cirruslabs/orchard/internal/opentelemetry"
|
||||
"github.com/cirruslabs/orchard/internal/version"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -26,6 +27,14 @@ func NewRootCmd() *cobra.Command {
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
Version: version.FullVersion,
|
||||
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
|
||||
// Configure OpenTelemetry
|
||||
if err := opentelemetry.Configure(cmd.Context()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
addGroupedCommands(command, "Working With Resources:",
|
||||
|
||||
Reference in New Issue
Block a user