Skip to content

Commit

Permalink
Rename grpc histogram metrics flag for consistency with flytepropeller (
Browse files Browse the repository at this point in the history
#4280)

* Rename grpc histogram metrics flag for consistency with flytepropeller

Signed-off-by: Katrina Rogan <[email protected]>

* una mas

Signed-off-by: Katrina Rogan <[email protected]>

* consistency

Signed-off-by: Katrina Rogan <[email protected]>

---------

Signed-off-by: Katrina Rogan <[email protected]>
  • Loading branch information
katrogan authored Oct 23, 2023
1 parent 2516bfa commit 4fc4988
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions flyteadmin/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ type DataProxyUploadConfig struct {
}

type GrpcConfig struct {
Port int `json:"port" pflag:",On which grpc port to serve admin"`
ServerReflection bool `json:"serverReflection" pflag:",Enable GRPC Server Reflection"`
MaxMessageSizeBytes int `json:"maxMessageSizeBytes" pflag:",The max size in bytes for incoming gRPC messages"`
EnableGrpcHistograms bool `json:"enableGrpcHistograms" pflag:",Enable grpc histograms"`
Port int `json:"port" pflag:",On which grpc port to serve admin"`
ServerReflection bool `json:"serverReflection" pflag:",Enable GRPC Server Reflection"`
MaxMessageSizeBytes int `json:"maxMessageSizeBytes" pflag:",The max size in bytes for incoming gRPC messages"`
EnableGrpcLatencyMetrics bool `json:"enableGrpcLatencyMetrics" pflag:",Enable grpc latency metrics. Note Histograms metrics can be expensive on Prometheus servers."`
}

// KubeClientConfig contains the configuration used by flyteadmin to configure its internal Kubernetes Client.
Expand Down
2 changes: 1 addition & 1 deletion flyteadmin/pkg/config/serverconfig_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flyteadmin/pkg/config/serverconfig_flags_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flyteadmin/pkg/server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func newGRPCServer(ctx context.Context, pluginRegistry *plugins.Registry, cfg *c
pluginRegistry.RegisterDefault(plugins.PluginIDUnaryServiceMiddleware, grpcmiddleware.ChainUnaryServer(
RequestIDInterceptor, auth.BlanketAuthorization, auth.ExecutionUserIdentifierInterceptor))

if cfg.GrpcConfig.EnableGrpcHistograms {
if cfg.GrpcConfig.EnableGrpcLatencyMetrics {
logger.Debugf(ctx, "enabling grpc histogram metrics")
grpcprometheus.EnableHandlingTimeHistogram()
}
Expand Down

0 comments on commit 4fc4988

Please sign in to comment.