By Tripti Sheth and Anshul Jain.
In our Engineering Energizers Q&A series, we highlight the engineering minds driving innovation across Salesforce. Today, we spotlight Tripti Sheth, Senior Director of Software Engineering, whose team had to evaluate tens of thousands of custom service-health expressions across billions of heterogeneous incoming metrics, at minute-level granularity, without changing the mathematical results of a batch-based system. Using AI, her team reproduced and validated the homegrown query language’s behavior. The streaming architecture now detects incidents in 2 to 5 minutes, down from about 24 hours.
Explore how her team harnessed AI to recreate complex query transformations for stream processing, validated mathematical parity against the original system, and prevented expensive processing from overwhelming the streaming hot path. Meeting those requirements made service level objectives (SLOs) useful for timely service degradation detection, preserving the meaning of service-health signals while delivering them soon enough to act on.

Real-Time SLO: Flink job architecture.
What made your mission to turn batch SLO monitoring into real-time detection so difficult?
A day-old health signal could explain service degradation but arrive too late to help detect it as it unfolded. Closing that gap meant making calculations designed for stored time-series data work continuously over incoming metrics. Service owners building complex and distributed services across Agentforce, Data 360, Sales Cloud and others had combined the query language’s transformations in different ways, and those calculations had to retain their mathematical behavior under the new execution model.
The mission is to make SLOs operational. The previous platform supported availability reporting and weekly reviews, but service owners generally used its findings to understand incidents after they occurred. The team needed those same health signals to support timely detection. The batch architecture imposed delays at each stage: metrics reached storage, a scheduled job ran, and calculations finished before results became available. Real-Time SLO left-shifts computation onto incoming telemetry, producing service-health indicators at minute-level granularity and supporting an incident-detection window of approximately two to five minutes. AI helped the team develop and validate the capabilities required for that change. The streaming architecture handles runtime computation and delivers faster signals and alerts.
Previously, discovering and defining SLOs for a service was a manual effort that depended on tribal knowledge and hand-built representations. With a dedicated Claude skill for SLO authoring, service owners can now interpret and author SLOs for their own services across complex, distributed architectures across Agentforce.
What made using AI to reproduce AQL query behavior for stream processing so challenging?
The difficulty lay in the language’s extensive transformations and the ways expressions combined them. Understanding an individual filter or transform was insufficient: the streaming library needed to reproduce the behavior of complete service-health expressions. Manually building that understanding across a specialized, homegrown language was a substantial engineering task.
Those expressions use ARGUS Query Language, or AQL. ARGUS is our internal time-series storage system, built around OpenTSDB, and AQL adds transformations over the underlying data. Because engineers may rarely write AQL, understanding its full capabilities required looking beyond the expressions they routinely used.
We used AI to help develop that broader understanding and build an equivalent library for streaming execution. The platform parses an AQL expression into an abstract syntax tree (AST), identifies how it filters, downsamples, groups, and merges metrics, and executes those operations over the stream. It translates each part of the expression (filtering, downsampling, aggregation and transformation) generically to well-defined job operators without changing the job graph. This allowed service owners to change expressions dynamically and onboard them to the stream right away, without restarting the job or causing downtime for others.
This retained AQL while moving its calculations from batch to streaming. AI-assisted development helped implement equivalents of the database-backed operations needed by existing expressions. Building those equivalents addressed implementation; establishing that they returned the original results required a separate validation framework.
Why was validating AI-generated code for SLO calculations harder than checking that it ran?
Successful execution could conceal the failure that mattered most: a different service-health result. A library that ran without errors had not necessarily preserved an existing SLO. Validation had to compare its calculations with established ARGUS behavior, including variations in how queries used the language’s transformations.
The team built a parity test suite that runs AQL against the existing database, obtains its output, and compares it with the corresponding streaming computation. The original execution path provided a direct reference for evaluating the new implementation and checking mathematical parity. AI assisted with this response-driven testing as well as development. It helped obtain raw data, execute the original AQL, run the streaming pipeline, compare outputs and reason about the differences. Alongside unit tests, these checks supported validation of the transformations and their use across different expressions.
The framework let the team iterate faster because changes could be checked against existing behavior. The team could use AI to develop or modify the streaming job, then run comparisons to determine whether the results matched. Once correctness could be validated, the next challenge was executing those operations fast enough to keep pace with incoming telemetry.
What made scaling Flink stream processing across billions of metrics & tens of thousands of expressions so difficult?
An equivalent calculation that could not keep pace with incoming telemetry would leave the detection problem unresolved. Tens of thousands of expressions had to be evaluated across billions of metrics at minute-level granularity. Heavy processing, data skew, and compute-intensive regular expressions matching, all had to be addressed without slowing the hot computational path.
The team placed computation before database storage. Services emit metrics describing request volume, failures, and other aspects of their health into an internal Kafka buffer. Real-time SLO consumes that stream, then merges, aggregates, downsamples and transforms the relevant metrics into a service-health indicator for each minute. The Flink cluster performs the stateful stream processing and writes results to an internal event store powered by Druid.
Supporting that workload required several optimizations:
- Inverted indexes to help handle the platform’s metric and expression volume.
- Separate hot and cold jobs so heavier processing and inverted index calculation would not interfere with the hot path.
- Smart fingerprinting of metrics to optimize the compute intensive operation.
- Salted sharding to address data skew.
- Regular-expression optimization to make compute-intensive operations on incoming metrics more efficient.
Together, these changes supported the throughput needed for minute-level SLO computation. Making that capability useful across services introduced another challenge: helping owners define meaningful SLOs and determine which existing expressions could use the streaming model.
Why was defining useful real-time SLOs difficult even for engineers who knew their services?
Understanding a service’s code did not automatically reveal which telemetry to combine or how to express its health in AQL. Engineers across Agentforce, Service Cloud, and others had to connect implementation knowledge, emitted metrics, and query semantics before producing a useful SLO. Existing expressions added a compatibility problem: not every batch-style transformation could move unchanged into streaming execution.
The team built an expert suite of AI skills that examines a service’s codebase and telemetry, then proposes an SLO. This brings service understanding and query-language expertise together, helping owners create useful signals without independently mastering AQL. For existing SLOs across microservices comprising of Agentforce, Data 360, Service Cloud and more, AI assistance helps interpret expressions, assess quality and real-time compatibility, and determine whether conversion can preserve their mathematical value. The skills support both SLO authoring and migration while accounting for differences among service configurations. Providing shared expertise also helps reduce repeated prompting and token consumption. Developers can use skills optimized for SLO creation instead of independently working through the same telemetry and language questions.
SLOs are a shared signal among service owners, SREs, and stakeholders. The team used AI to accelerate implementation and compared the new calculations against the existing system to validate correctness. Streaming execution then made those service-health signals available within minutes while preserving the behavior teams relied on. That combination supports the mission: give engineers meaningful signals while an incident is unfolding, when earlier detection can still guide their response.
Learn more
- Stay connected — join our Talent Community!
- Check out our Technology and Product teams to learn how you can get involved.