Ai Observability

Monitoring Machine Learning Models in Production: What to Track and Why

groundcover Team
14
min read
Ai Observability
ML model monitoring flow: data, model services, prediction, user, and behavior, with model monitoring spanning every stage.

Once upon a time, most businesses used machine learning models to meet narrow and specific use cases, like powering sales forecasts or product recommendation engines. Since the advent of modern generative and agentic AI, however, machine learning models have grown from a niche platform into one of the pillars of IT estates.

By extension, the ability to monitor machine learning models has become an essential facet of broader monitoring and observability strategies. Monitoring models is the only way to ensure that they’re meeting the organization’s performance, quality and security requirements.

The question facing modern IT teams, however, is how to monitor machine learning models effectively and at scale. Given that there are many different types of models, multiple types of monitoring and a multitude of monitoring tools and approaches, where should an engineering team start when planning and implementing a monitoring strategy?

Read on for a detailed answer to that question as we explain what machine learning model monitoring means, how it works, what to monitor, and real-world best practices for efficient and scalable monitoring.

What is machine learning model monitoring?

Machine learning model monitoring is the process of systematically tracking and analyzing a model’s inputs and outputs, as well as its performance.

As the next section explains, there are multiple types of machine learning model monitoring, each focused on a different aspect of model behavior. What they share in common, however, is the goal of ensuring that the models an organization relies on meet its needs on an ongoing basis.

There are also multiple types of models – such as classification models (which are designed to sort data into categories), regression models (which can help predict trends based on historical data), and large language models (which can generate text, images, and other content by emulating patterns within their training data), to name a few. Since the architecture, training process, and operating environment of different types of models can vary widely, model monitoring tools and techniques also vary. But again, at a high level, they all focus on the common goal of helping businesses understand what their models are doing, as well as identify and troubleshoot problems.

Types of machine learning model monitoring

Key types of machine learning model monitoring include:

  • Data drift monitoring: Tracks changes in the statistical distribution of input data over time, with the goal of identifying when production data begins to differ from the data used to train a model.
  • Concept drift monitoring: Detects changes in the relationship between input features and target outcomes, which can make a model's learned patterns and predictions less reliable.
  • Prediction drift monitoring: Tracks changes in a model's prediction distributions over time to identify shifts in its outputs that may indicate changing inputs, model behavior, or underlying conditions.
  • Model performance monitoring: Evaluates how accurately and reliably a model performs in production based on metrics such as precision, recall, accuracy, and error rates.
  • Data integrity and quality monitoring: Checks production data for missing values, invalid formats, inconsistencies, duplicates, and other quality problems that could compromise model predictions.
Monitoring type What it tracks Primary purpose
Data drift monitoring Changes in the statistical distribution of production input data. Identify when real-world data diverges from training data.
Concept drift monitoring Changes in the relationship between input features and target outcomes. Detect when learned patterns become less reliable for making predictions.
Prediction drift monitoring Changes in the distribution of model predictions over time. Identify shifts in model outputs that may signal changing conditions or model behavior.
Model performance monitoring Production metrics such as accuracy, precision, recall, and error rates. Evaluate whether a model continues to deliver reliable results.
Data integrity and quality monitoring Missing values, invalid formats, duplicates, and data inconsistencies. Catch input data problems that could compromise model predictions.

Where ML model monitoring fits in the MLOps lifecycle

The machine learning operations (MLOps) lifecycle is the set of processes that a team uses to develop, test, deploy, and manage an ML model.

Within this lifecycle, model monitoring typically occurs during the post-deployment phase. The main goal of ML model monitoring is to detect issues with a model once it is “live” and handling real-world requests or tasks.

That said, it’s also possible – and, in some cases, desirable – to perform pre-deployment monitoring. This approach, sometimes called a “shift-left” strategy, allows teams to test a model prior to deploying it into production. In turn, they can detect and correct defects before they impact the business.

That said, some of the issues that ML model monitoring helps to detect, like conceptual and prediction drift, usually develop over time, and therefore can only be detected once a model has been operating in production for a while. But problems like poor data integrity in model output can often be identified pre-deployment.

Who owns what: The data science and engineering divide in production monitoring

One of the challenges in effective ML model monitoring is that it involves two distinct groups of stakeholders: data scientists and engineers. Each has a distinct role to play, but they must also collaborate effectively in handing issues off to one another.

What data scientists are responsible for monitoring

Data scientists “own” the data that models ingest. They also have the expertise necessary to assess the quality and integrity of output data. Both skills mean that data scientists should take the lead in detecting and assessing data-related model issues, including:

  • Drift in a model’s training data.
  • Conceptual or predictive drift caused by changes in the data a model ingests.
  • Quality or integrity issues in the data that a model outputs.

What engineers are responsible for monitoring

Meanwhile, engineers (specifically, engineers with machine learning expertise) are the primary stakeholders for monitoring the rest of the processes and resources necessary to operate models effectively, including:

  • The overall model architecture and design.
  • The infrastructure that hosts the model.
  • Integrations with third-party resources (like AI agents or MCP servers) that are part of the model’s operations.

Where the handoff creates blind spots in production

While the distinction between roles may seem clear enough in theory, it can become messy in practice due to the difficulty of determining where data-related responsibilities start and end.

For instance, if a model’s performance is poor because the input ingestion process takes too long, data scientists might blame the infrastructure that hosts the data, and expect engineers to fix the problem. But engineers might believe that data scientists need to resolve the issue because they own all data resources.

Working through challenges like this one requires both teams to come together, trace issues to their root cause and resolve them collectively. In the case of poor performance due to a data ingestion issue, engineers could help by improving the I/O rates of the data hosting infrastructure, while data engineers work to deduplicate the data in order to improve performance by reducing the amount of information that the model needs to ingest.

What needs to be monitored when a machine learning model goes live

Effective ML model monitoring requires a full-stack approach that tracks a variety of data points. Most fall into one of two “levels”: The functional level (which focuses on how the model acts and reasons) and the operational level (which deals with the model’s performance).

Here’s a closer look at what to monitor at each level.

Functional level: Inputs, outputs, and ground truth

Since the goal of functional-level monitoring is to determine how effectively a model reasons, teams should capture inputs and outputs, then compare them to “ground truth” (meaning accurate, desired output or answers).

In cases where a model’s inputs vary from ground truth, data scientists and engineers should trace the issue to its root cause. It might be a problem like drift in input data that causes a model to make inaccurate predictions. It could also be an infrastructure issue, such as a permission change that prevents a model from accessing a complete set of input data and causes incomplete reasoning as a result.

Operational level: Pipelines, system performance and costs

At the operational level, teams should monitor data that reveals the health, performance, and cost of a model’s pipeline, as well as the overall system of which it’s a part.

For example, they should track how long a model takes to respond to requests and investigate instances where high response latency occurs. Likewise, they should analyze how many tokens a model uses when processing a request (if it’s a type of model that breaks data into tokens – not all do) to gain a granular understanding of the costs associated with using the model.

Correlating this data with other monitoring and observability insights, like infrastructure resource utilization and network latency, is important for gaining the context necessary to get to the root cause of problems quickly.

How to instrument an ML model for production monitoring before it ships

In ML model monitoring, instrumentation refers to the process of generating data from within models so that monitoring tools can collect and analyze it. The exact way that this is done varies widely between different types of models. A particular challenge in some cases is that certain types of models (like large language models) function essentially as “black boxes,” making it very difficult to instrument the models in a way that provides internal insight into how they behave. In other cases, like simple regression models, it’s typically easier to embed instrumentation within models.

In general, however, the instrumentation process involves these core steps, no matter which type of model a team is working with:

  1. Log inputs, outputs, and prediction metadata on every request: First, to generate data that can be collected and analyzed for monitoring purposes, the team adds logic (to models themselves and/or to the environment that hosts them) that logs all inputs and outputs, along with metadata (like where input data originated and how long it takes to move across the data) that provides valuable interpretive context.
  2. Set baselines during validation to detect drift: Detecting model drift requires the ability to understand how model input and output vary over time. To this end, it’s important to define a baseline that reflects how a model originally behaves.
  3. Build proxy metrics for when ground truth arrives late: Sometimes, ground truth (meaning, again, the “right” or desired answer) is not evident at the time a model is deployed; for instance, if a model’s job is to forecast next quarter’s sales, you won’t know how accurate it is until next quarter ends and the actual data comes in. Still, teams can use proxy metrics (such as preliminary sales data or early trends) and evaluate model behavior against them.

Why production ML monitoring breaks down without infrastructure context

Again, effective ML model monitoring requires a full-stack approach that combines model analysis with infrastructure context.

After all, most types of problems that can occur with a production model (like slow performance, inaccurate predictions, or misformatted output) can stem not just from internal problems with a model’s design or data, but also from infrastructure issues (such as servers that are slow to accept new requests because they’re maxed out on CPU and memory, or transformation errors within a model’s data pipeline). These are distinct categories of root causes, and the job of fixing them falls to different teams (again, data scientists own data-related issues, while engineers oversee the infrastructure).

The only way to tell the difference is to bring infrastructure context into the picture when monitoring model inputs and outputs.

ML model monitoring tools worth knowing

A growing number of tools are available to help organizations monitor ML models. Here’s a rundown of some popular open source options, which are helpful for basic model monitoring:

  • Evidently AI: An open-source Python framework for monitoring ML models, detecting data and prediction drift, evaluating model performance and identifying data quality problems.
  • NannyML: An open-source monitoring library that detects data drift and estimates model performance when ground-truth labels are delayed or unavailable.
  • Alibi Detect: An open-source Python library that provides algorithms for detecting outliers, data drift and adversarial examples across tabular, text and image data.
  • Whylogs: An open-source data profiling library that generates statistical summaries of datasets to help identify data quality issues and changes in production data distributions.

While these tools offer the benefit of free access, most focus primarily on model monitoring in a narrow sense, and need to be combined with broader observability tools to provide full-stack context. Alternatively, teams can use an end-to-end solution like groundcover. More on that below.

Tool Description Key monitoring capabilities
Evidently AI Open-source Python framework for evaluating and monitoring machine learning models. Detects data and prediction drift, evaluates model performance and identifies data quality issues.
NannyML Open-source ML monitoring library designed to assess model reliability in production. Detects data drift and estimates model performance when ground-truth labels are delayed or unavailable.
Alibi Detect Open-source Python library for identifying unusual data patterns and potential model threats. Detects outliers, data drift and adversarial examples across tabular, text and image data.
whylogs Open-source data profiling library that generates statistical summaries of datasets. Identifies data quality issues and changes in production data distributions.

Production ML monitoring best practices engineers actually follow

Monitoring ML models is most effective and scalable when teams adopt best practices like the following:

  • Establish baselines before deployment: Measure model accuracy, prediction distributions, input data characteristics, and latency during validation (i.e., pre-deployment) so engineers have reliable reference points for identifying changes in production.
  • Monitor data and concept drift continuously: Track changes in input distributions and relationships between features and outcomes to identify when production conditions no longer match the assumptions underlying a model. Drift is not usually possible to predict, but teams should still monitor in real time so they detect statistically significant instances of drift as soon as they occur.
  • Connect model monitoring to operational alerting: Integrate monitoring tools with existing observability and incident management systems so engineers receive actionable alerts when model performance, data quality, or prediction behavior deteriorates.
  • Automate model evaluation and retraining workflows: Use production data and newly available ground-truth labels to evaluate model performance periodically, trigger retraining when necessary, and validate updated models before deploying them.

Connecting ML pipeline telemetry to infrastructure root causes with groundcover

When it comes to delivering full-stack model visibility at both the functional and operational levels, groundcover does it all.

groundcover comprehensively traces and logs to capture every input and output. It also systematically monitors the infrastructure that hosts models, as well as agents and applications that interact with them. And it brings all of this data together to provide fully contextualized, end-to-end visibility into model behavior and performance.

What’s more, because groundcover uses eBPF and OpenTelemetry to collect data, it offers a highly flexible ML model monitoring solution that works with virtually any type of model or hosting environment.

groundcover AI Observability traces view with spans by operation, cost by token type, trace latency, and a list of LLM traces with duration, tokens, and cost.

Model monitoring as a pillar of AI success

When used to address business needs, ML models are only as reliable as the monitoring process that tracks them. No matter which types of models your organization deploys or what it does with them, systematically tracking model input and output, and correlating that data with infrastructure metrics to gain holistic visibility into model behaviors, is a cornerstone of effective AI strategy.

FAQs

Data science teams typically own model-specific monitoring, including accuracy, drift, prediction quality, and retraining decisions. Platform engineering teams manage infrastructure health, resource utilization, pipeline reliability, and monitoring integrations.

Both teams may need to collaborate on incident response, at least until it becomes clear what the root cause of an issue is and whether it’s something that the data science or engineering team needs to resolve.

Automatic retraining is appropriate when monitoring confirms persistent data or concept drift and reliable new training data is available. Alerts involving unexplained performance drops, data quality issues or infrastructure failures should trigger manual investigation before retraining, since these issues may result from problems with a model’s host environment rather than the model’s data.

groundcover correlates ML pipeline degradation with infrastructure changes by combining eBPF-based telemetry, distributed traces, logs, and infrastructure metrics to connect changes in model-serving latency or pipeline performance with events such as deployments, resource contention or configuration changes.

Sign up for Updates

Keep up with all things cloud-native observability.

We care about data. Check out our privacy policy.