# Observability & Tracing Calculator AI Agent Connect

> Deterministic engine for distributed tracing metrics, cost estimation, and anomaly detection.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_1WXAMwTDvWAo9gwPxvsjfD55XYplaDAzSL8dINPh/ai-agent-connect
- **Tags:** tracing, metrics, latency, cost-estimation, anomalies, distributed-systems

## Description

This MCP server provides a deterministic calculation engine for analyzing distributed tracing data across multi-agent systems. It allows AI agents to calculate critical performance metrics like P99 latency and error rates, estimate telemetry storage costs, and identify system instabilities through anomaly detection. Use `analyze_trace_performance` to evaluate health indicators, `estimate_observability_costs` for budget planning, and `detect_tracing_anomalies` to find performance outliers.

## Tools

### analyze_trace_performance
Analyze key performance metrics and health indicators for provided traces

### detect_tracing_anomalies
Detect specific spans or sampling issues indicating instability

### estimate_observability_costs
Estimate the cost to store and process telemetry data

## Prompt Examples

**Prompt:** 
```
Analyze these traces: [{'spanId': '1', 'parentId': null, 'agentId': 'A', 'startTime': 1000, 'durationMs': 50, 'status': 'SUCCESS'}, {'spanId': '2', 'parentId': '1', 'agentId': 'B', 'startTime': 1050, 'durationMs': 200, 'status': 'SUCCESS'}]. Is the P99 latency within 250ms?
```

**Response:** 
```
The P99 latency is 200ms, which is within the 250ms threshold.
```

**Prompt:** 
```
Estimate the cost for 100 traces per hour, with a 1% sample rate, 500 bytes per span, and 30 days of retention.
```

**Response:** 
```
The estimated storage cost for the specified parameters is 0.0000432 MB.
```

**Prompt:** 
```
Check for anomalies in this trace data: [{'spanId': '1', 'durationMs': 10}, {'spanId': '2', 'durationMs': 500}].
```

**Response:** 
```
One anomalous span was detected with a duration of 500ms.
```

## Frequently Asked Questions

**How can I check if my system is meeting its performance SLAs?**
You can use the `analyze_trace_performance` tool. It calculates P99 latency and error rates, and will automatically flag a violation if they exceed your specified thresholds.

**How does the tool estimate storage costs?**
The `estimate_observability_costs` tool calculates the total storage cost by multiplying the trace volume per hour by the average span size and the number of retention days.

**What defines an anomalous span in this server?**
Using `detect_tracing_anomalies`, a span is flagged as anomalous if its duration is greater than three times the standard deviation of all span durations in the dataset.
