Skip to content

Commit

Permalink
Prometheus grpc histogram always anabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiancl25 committed May 24, 2023
1 parent 0777b3f commit 02ed6f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions mlserver/grpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def _create_server(self):

if self._settings.metrics_endpoint:
interceptors.append(
PromServerInterceptor(
enable_handling_time_histogram=self._settings.grpc_response_latency_histogram
)
PromServerInterceptor(enable_handling_time_histogram=True)
)

self._server = aio.server(
Expand Down
4 changes: 0 additions & 4 deletions mlserver/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def json(self, by_alias=True, exclude_unset=True, exclude_none=True, **kwargs):


class CORSSettings(BaseSettings):

class Config:
env_file = ENV_FILE_SETTINGS
env_prefix = ENV_PREFIX_SETTINGS
Expand Down Expand Up @@ -191,9 +190,6 @@ class Config:
grpc_max_message_length: Optional[int] = None
"""Maximum length (i.e. size) of gRPC payloads."""

grpc_response_latency_histogram : bool = False
"""Enables/Disables the use of a histogram to measure the grpc response latency. This enables a feature of the library used for prometheus grpc instrumentation (https://github.com/lchenn/py-grpc-prometheus#histograms)"""

# CORS settings
cors_settings: Optional[CORSSettings] = None

Expand Down

0 comments on commit 02ed6f5

Please sign in to comment.