JK
JustKalm
Observability

Logging

Access detailed API request logs. Integrate with your existing log management solution for unified observability.

Full request traces
Structured JSON
30-day retention

Log Levels

ERROR

Critical failures requiring attention

Example: Authentication failed, rate limit exceeded

WARN

Potential issues that may need attention

Example: Deprecated endpoint used, retry attempted

INFO

Standard operational events

Example: Request completed, webhook delivered

DEBUG

Detailed diagnostic information

Example: Cache hit, request routing details

Log Format

JSON Log Entry
{
  "timestamp": "2024-12-15T14:32:45.123Z",
  "level": "info",
  "message": "API request completed",
  "request_id": "req_abc123xyz",
  "method": "POST",
  "path": "/v1/valuations",
  "status": 200,
  "duration_ms": 127,
  "org_id": "org_456",
  "api_key_id": "ak_live_xxx",
  "user_agent": "justkalm-python/2.0.0",
  "ip_hash": "sha256:abc123...",
  "response_size": 1847,
  "cache_status": "MISS",
  "region": "us-east-1"
}

Standard Log Fields

FieldTypeDescription
timestampstringISO 8601 timestamp with timezone
levelstringLog level (error, warn, info, debug)
request_idstringUnique request identifier for tracing
methodstringHTTP method (GET, POST, etc.)
pathstringRequest path without query params
statusnumberHTTP response status code
duration_msnumberRequest duration in milliseconds
org_idstringOrganization identifier
user_agentstringClient user agent string
ipstringClient IP (hashed for privacy)

Query Examples

Search and filter logs using structured queries:

Log Queries
# Search by request ID
request_id:req_abc123xyz

# Find errors in last hour
level:error AND timestamp:[now-1h TO now]

# Filter by organization
org_id:org_456 AND status:>=400

# Slow requests
duration_ms:>500 AND path:/v1/valuations*

# Rate limit events
message:"rate limit" AND level:warn

# Aggregation query (Datadog/Splunk)
source:justkalm | stats count by status | sort -count

Correlating Your Logs

Include the X-Request-Id from JustKalm responses in your application logs for end-to-end tracing.

Python Structured Logging
# Python - Structured logging with JustKalm correlation
import logging
import structlog

# Configure structured logging
structlog.configure(
    processors=[
        structlog.stdlib.filter_by_level,
        structlog.stdlib.add_log_level,
        structlog.stdlib.add_logger_name,
        structlog.processors.TimeStamper(fmt="iso"),
        structlog.processors.JSONRenderer()
    ],
)

logger = structlog.get_logger()

# Log with JustKalm request correlation
def call_justkalm_api(product_data):
    try:
        response = client.valuations.create(product_data)
        
        # Log success with request ID
        logger.info(
            "valuation_created",
            request_id=response.headers.get("X-Request-Id"),
            valuation_id=response.id,
            confidence=response.confidence,
            duration_ms=response.headers.get("X-Response-Time")
        )
        return response
        
    except JustKalmError as e:
        # Log error with request ID for support
        logger.error(
            "valuation_failed",
            request_id=e.request_id,
            error_code=e.code,
            error_message=str(e),
            product_id=product_data.get("id")
        )
        raise

Log Retention

PlanRetention PeriodLog AccessExport
Starter7 daysDashboard only
Growth30 daysDashboard + APICSV, JSON
Scale90 daysDashboard + APICSV, JSON, S3 sync
EnterpriseCustom (up to 1 year)Dashboard + API + SIEMAll formats + streaming

Access Your Logs

View logs in the dashboard or integrate with your log management platform.

© 2025 JustKalm. Full observability.