Migrate from Datadog

Step-by-step guide to migrate from Datadog APM (dd-trace) to JustAnalytics for distributed tracing, metrics, and log aggregation.

Overview#

JustAnalytics provides a complete replacement for Datadog's APM, distributed tracing, log aggregation, and infrastructure metrics. Unlike Datadog, JustAnalytics requires no local agent installation — all data is sent directly to the JustAnalytics API over HTTPS.

Use the JustAnalytics CLI to automate the migration:

npx @justanalyticsapp/cli migrate from-datadog

This will scan your codebase for dd-trace usage, show proposed changes, and apply them with your confirmation.

For a preview without changes:

npx @justanalyticsapp/cli migrate from-datadog --dry-run

Manual Migration#

Step 1: Replace Dependencies#

JavaScript / TypeScript:

# Remove Datadog packages
npm uninstall dd-trace datadog-metrics datadog-lambda-js

# Install JustAnalytics
npm install @justanalyticsapp/node

Python:

pip uninstall ddtrace
pip install justanalytics

Step 2: Replace Initialization#

Before (Datadog):

const tracer = require('dd-trace');

tracer.init({
  service: 'my-api',
  env: 'production',
  version: 'v1.2.3',
  logInjection: true,
  runtimeMetrics: true,
  sampleRate: 1.0,
});

After (JustAnalytics):

import * as JustAnalytics from '@justanalyticsapp/node';

JustAnalytics.init({
  apiKey: process.env.JUSTANALYTICS_API_KEY,
  serviceName: 'my-api',
  environment: 'production',
  release: 'v1.2.3',
  logCorrelation: true,
  captureInfraMetrics: true,
  traceSampleRate: 1.0,
});

If you use the dd-trace/init auto-start pattern:

Before:

require('dd-trace/init');

After:

require('@justanalyticsapp/node/init');

Step 3: Replace API Calls#

| Datadog API | JustAnalytics Equivalent | |---|---| | tracer.trace(name, fn) | JustAnalytics.startSpan(name, fn) | | tracer.wrap(name, fn) | JustAnalytics.wrapFunction(name, fn) | | tracer.scope() | JustAnalytics.currentSpan() | | tracer.use(plugin, opts) | JustAnalytics.addIntegration(plugin, opts) | | tracer.setUrl(url) | Set JUSTANALYTICS_API_URL env var |

Step 4: Configuration Mapping#

| Datadog Option | JustAnalytics Option | Notes | |---|---|---| | service | serviceName | Direct mapping | | env | environment | Renamed | | version | release | Renamed | | hostname | hostname | Direct mapping | | port | removed | JA uses HTTPS API — no local agent | | logInjection | logCorrelation | Auto-injects trace IDs into logs | | sampleRate | traceSampleRate | Same range (0.0-1.0) | | runtimeMetrics | captureInfraMetrics | Captures CPU/memory/event loop | | profiling | not yet supported | Planned for future release | | tags | defaultAttributes | Renamed | | plugins | integrations | Replaced by JA auto-instrumentation |

Step 5: Remove the Datadog Agent#

Datadog requires a local agent running on your server (datadog-agent). JustAnalytics does not need any agent — data is sent directly to the API.

Remove from Docker Compose:

# BEFORE - remove this service
services:
  datadog-agent:
    image: gcr.io/datadoghq/agent:latest
    environment:
      - DD_API_KEY=...
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Remove from Kubernetes:

# Remove the Datadog DaemonSet
kubectl delete daemonset datadog-agent -n monitoring

Remove environment variables:

# Remove these from your .env or deployment config
# DD_AGENT_HOST=...
# DD_TRACE_AGENT_PORT=...
# DD_API_KEY=...
# DD_ENV=...
# DD_SERVICE=...
# DD_VERSION=...

Replace with:

JUSTANALYTICS_API_KEY=ja_sk_your_key_here
JUSTANALYTICS_API_URL=https://justanalytics.tech

Step 6: Custom Metrics#

Before (Datadog):

const StatsD = require('hot-shots');
const dogstatsd = new StatsD();

dogstatsd.increment('page.views');
dogstatsd.gauge('queue.size', 100);
dogstatsd.histogram('response.time', 250);

After (JustAnalytics):

import * as JustAnalytics from '@justanalyticsapp/node';

JustAnalytics.recordMetric('page.views', 1, 'counter');
JustAnalytics.recordMetric('queue.size', 100, 'gauge');
JustAnalytics.recordMetric('response.time', 250, 'histogram');

Verify Migration#

npx @justanalyticsapp/cli doctor

Feature Comparison#

| Feature | Datadog | JustAnalytics | |---|---|---| | Distributed tracing | Yes | Yes | | APM dashboards | Yes | Yes | | Service map | Yes | Yes | | Log aggregation | Yes | Yes | | Infrastructure metrics | Yes | Yes | | Error tracking | Yes | Yes | | Alerting | Yes | Yes | | Web analytics | No | Yes | | Session replay | No | Yes | | Local agent required | Yes | No | | Pricing | Per host + per GB | Flat rate ($49/mo) | | Self-hosted option | No | Yes |

Key Differences#

  1. No agent required — JustAnalytics sends data directly via HTTPS. No DaemonSet, no sidecar, no agent process.
  2. Unified platform — Datadog charges separately for APM, Logs, Metrics, and RUM. JustAnalytics includes everything in one plan.
  3. Simpler configuration — Auto-instrumentation is built into the SDK. No need for DD_TRACE_* environment variables.
  4. W3C Trace Context — JustAnalytics uses the W3C traceparent standard for distributed tracing propagation, not Datadog-proprietary headers.