API Monitoring, Metrics, at Health Checks

Subaybayan ang Smart Money API na may komprehensibong health checks, performance metrics, at alerting. Track ang uptime, latency, error rates, at SLA compliance.

Na-publish noong March 21, 2026 13 min read Operations

Monitoring Overview

Ang Smart Money API ay nagbibigay ng komprehensibong monitoring capabilities para subaybayan ang service health, performance, at reliability. Ipatupad ang mga monitoring strategies na ito para ma-detect ang mga isyu nang maaga at mapanatili ang mataas na uptime.

Tatlong layers ng monitoring:

  • Health Checks — Endpoint availability at basic functionality
  • Metrics — Performance data (latency, throughput, error rates)
  • Logging — Request/response details para sa debugging at audit

Target Metrics: 99.9% uptime, <100ms p95 latency, <0.1% error rate, <5 second mean time to detect.

Health Checks

API Health Endpoint

Health Check
// Simple liveness check (no auth required)
GET /health
// Response
HTTP/1.1 200 OK
{
"status": "healthy",
"timestamp": 1709980800000,
"uptime": 99.95
}

Detailed Health Status

Detailed Health
// Detailed status with component health
GET /v1/status
-H "Authorization: Bearer token"
{
"status": "operational",
"components": {
"api": "healthy",
"database": "healthy",
"cache": "healthy",
"exchanges": "healthy"
},
"metrics": {
"p95_latency_ms": 85,
"error_rate": 0.0012,
"uptime_percent": 99.95
}
}
Get your API key in 30 seconds

Ready to build? Grab a free API key (200 calls/day, no card) and start pulling live whale, funding and on-chain data.

Get your API key →

Metrics & Monitoring

Key Metrics to Track

Metric Target Alert Threshold
Uptime 99.9% <99.5%
P95 Latency <100ms >500ms
Error Rate <0.1% >1%
Requests/sec Varies Approaching limit
Cache Hit Rate >70% <50%

Metrics API Endpoint

Metrics Query
// Get API metrics for monitoring
GET /v1/metrics?period=1h
-H "Authorization: Bearer token"
// Returns metrics in Prometheus format
# HELP api_requests_total Total API requests
# TYPE api_requests_total counter
api_requests_total{method="GET",status="200"} 4502
api_requests_total{method="GET",status="429"} 12

Alerting Setup

Webhook Alerts

Create Alert
POST /v1/alerts
-H "Authorization: Bearer token"
-d '{
"name": "High Error Rate",
"condition": "error_rate > 0.01",
"webhook_url": "https://hooks.slack.com/...",
"severity": "high"
}'

Alert Types

  • Uptime Alert — API unavailable for 5+ minutes
  • Latency Alert — P95 latency exceeds threshold
  • Error Rate Alert — Error rate above 1%
  • Rate Limit Alert — Approaching rate limit
  • Data Freshness Alert — Data older than threshold

Request Logging

Log Levels

Log Example
// Typical API request log entry
{
"timestamp": "2026-03-21T14:00:00Z",
"request_id": "req_abc123def456",
method: GET,
path: /v1/whales/btc,
status: 200,
duration_ms: 45,
user_id: acct_12345
}

Structured Logging

Ang lahat ng log ay naka-structure na JSON para madaling i-parse at suriin:

  • Timestamp sa ISO 8601 format
  • Request ID para sa pag-trace
  • HTTP method at path
  • Response status at latency
  • User ID at API key fingerprint
  • Error messages kung mayroon

Distributed Tracing

Request ID Tracking

Tracing Headers
// Lahat ng request ay may kasamang tracing headers
curl -H "X-Request-ID: req-abc123" \
https://api.smartmoneyapi.com/v1/whales
// Ang response ay may parehong ID
X-Request-ID: req-abc123
X-Response-Time: 45ms
X-Server: api-prod-01

Trace Context Propagation

Gamitin ang W3C Trace Context standard para sa distributed systems:

W3C Trace Context
// Ang request ay may kasamang trace context
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
tracestate: dd=s:0
// Trace ID: 4bf92f3577b34da6a3ce929d0e0e4736
// Span ID: 00f067aa0ba902b7
// Sampled: true (01)

SLA Monitoring

Service Level Objectives

Plan Uptime SLA Response Time Support
Free 99% Best effort Community
Trader 99.5% <200ms p95 Email
Pro 99.95% <100ms p95 Priority
Enterprise 99.99% <50ms p95 Dedicated

SLA Credits

Kung ang uptime ay bumaba sa SLA, makatatanggap ng service credits:

  • 99.0% - 99.5%: 10% monthly credit
  • 95.0% - 99.0%: 25% monthly credit
  • < 95.0%: 100% monthly credit

Monitoring Dashboards

Built-in Dashboard

I-access ang performance dashboard sa: https://status.smartmoney.io

Custom Dashboard Setup

Prometheus Query
// Query API request rate
rate(api_requests_total[5m])
// Query error rate
rate(api_requests_total{status=~"5.."}[5m])
// Query latency percentile
histogram_quantile(0.95, api_request_duration_ms)

Monitoring Tool Integration

Supported Platforms

Tool Integration Features
Prometheus Native /metrics endpoint Metrics scraping
Grafana Datasource plugin Custom dashboards
Datadog API integration APM tracing
New Relic Agent integration Full observability
PagerDuty Webhook alerts Incident management

Monitoring Best Practices

1. Monitor Key Metrics

Tutukan ang mga metrikang direktang nakakaapekto sa iyong negosyo: uptime, latency, error rate.

2. Set Appropriate Alerts

Mag-alert sa sintomas, hindi lang sa thresholds. I-route ang alerts ayon sa severity.

3. Use Request IDs

Laging i-correlate ang mga request gamit ang unique IDs para sa end-to-end tracing.

4. Implement Distributed Tracing

Gamitin ang W3C Trace Context para sa visibility sa microservices.

5. Regular Alerting Tests

I-test ang alert channels buwan-buwan para masigurong gumagana ang escalation.

6. Document Alert Response

Gumawa ng runbooks para sa common alerts kasama ang resolution steps.

Ensure 99.9% Uptime

I-monitor ang Smart Money API gamit ang komprehensibong health checks, metrics, at alerting. Panatilihin ang SLA compliance gamit ang built-in observability tools.

Get Started
Ang Pro at Enterprise plans ay may kasamang dedicated support at SLA monitoring.

Related Resources

Start free — 200 calls/day, no card

Kumuha ng live whale flow, funding, open interest at on-chain data sa 3 exchanges mula sa iisang API. Free tier, walang credit card, pwedeng mag-upgrade anumang oras.

Start free →
Try the live API console → (no account needed)