# Metrics

## MetricsServer

### Methods

### on\_worker\_stop()

```python
on_worker_stop(worker: Worker) -> None
```

### start()

```python
start()
```

### stop()

```python
stop(sig: Optional[int] = None)
```

## configure\_metrics()

```python
configure_metrics(settings: Settings)
```

*No description available.*

## log()

```python
log(metrics)
```

Logs a new set of metric values. Each kwarg of this method will be treated as a separate metric / value pair. If any of the metrics does not exist, a new one will be created with a default description.

## register()

```python
register(name: str, description: str) -> Histogram
```

Registers a new metric with its description. If the metric already exists, it will just return the existing one.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seldon.ai/mlserver/api-reference/pythonapi/metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
