Intermediate 1-2 hours

Migrate from Datadog to TraceKit

Replace the Datadog agent and dd-trace libraries with TraceKit's lightweight SDK. No per-host billing, no agent infrastructure, same distributed tracing visibility.

Start Free
1

Install TraceKit SDK and Remove dd-trace

Replace the Datadog tracing library with the TraceKit SDK in your application. Remove dd-trace-go, dd-trace-js, or ddtrace depending on your language, then add the corresponding TraceKit SDK package.

CategoryDatadogTraceKitNotes
Packagedd-trace-go (gopkg.in/DataDog/dd-trace-go.v1)github.com/tracekit/go-sdkGo SDK replacement
Packagedd-trace (npm)@tracekit/node-apm (npm)Node.js SDK replacement
Packageddtrace (pip)tracekit-apm (pip)Python SDK replacement
2

Replace Datadog Agent Configuration

TraceKit does not require a separate agent process. Remove the Datadog Agent container or host package and point your SDK directly at the TraceKit ingestion endpoint.

CategoryDatadogTraceKitNotes
AgentDD_AGENT_HOSTTRACEKIT_ENDPOINTTraceKit uses direct HTTPS ingestion -- no local agent needed
AgentDD_TRACE_AGENT_PORT (default 8126)(not needed)No agent port; SDK sends directly to cloud endpoint
AgentDD_API_KEYTRACEKIT_API_KEYAPI key for authentication
AgentDD_SITE (e.g., datadoghq.com)TRACEKIT_ENDPOINTSingle endpoint replaces site selection
3

Map Environment Variables

Translate Datadog unified service tagging environment variables to TraceKit equivalents. TraceKit uses a similar concept but with different variable names.

CategoryDatadogTraceKitNotes
Service IdentityDD_SERVICETRACEKIT_SERVICE_NAMEService name for trace grouping
Service IdentityDD_ENVTRACEKIT_ENVIRONMENTEnvironment tag (production, staging)
Service IdentityDD_VERSIONTRACEKIT_VERSIONApplication version for deployment tracking
SamplingDD_TRACE_SAMPLE_RATE (0.0-1.0)TRACEKIT_SAMPLE_RATE (0.0-1.0)Same numeric range, direct mapping
TagsDD_TAGS (key:value,key:value)TRACEKIT_TAGS (key=value,key=value)Note the separator change from colon to equals
4

Migrate Custom Instrumentation

Replace Datadog's tracer API calls with TraceKit SDK equivalents. The core concepts (spans, tags, error recording) map directly, though method names differ.

CategoryDatadogTraceKitNotes
Initializationtracer.Start(tracer.WithServiceName(...))tracekit.Init(apiKey, tracekit.WithService(...))Init accepts API key as first argument
Spanstracer.StartSpan(operationName)tracekit.StartSpan(ctx, operationName)TraceKit spans require context for parent linking
Attributesspan.SetTag(key, value)span.SetAttribute(key, value)Follows OpenTelemetry attribute naming
Errorsspan.SetTag(ext.Error, err)span.RecordError(err)Dedicated error recording method
Shutdowntracer.Stop()tracekit.Shutdown(ctx)Shutdown takes context for graceful flush
5

Verify Traces in Dashboard

Start your application, generate some traffic, and confirm that traces appear in the TraceKit dashboard. Check service map, trace waterfall, and span attributes to verify data fidelity.

CategoryDatadogTraceKitNotes
VerificationDatadog APM > TracesTraceKit Dashboard > TracesCheck trace waterfall view
VerificationDatadog Service MapTraceKit Service MapVerify service dependencies appear
VerificationDatadog MonitorsTraceKit AlertsRecreate key alerts in TraceKit

Code Examples

Before (Datadog)

import (
    "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
    "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
)

func main() {
    tracer.Start(
        tracer.WithServiceName("my-service"),
        tracer.WithEnv("production"),
    )
    defer tracer.Stop()

    span := tracer.StartSpan("web.request")
    span.SetTag(ext.HTTPMethod, "GET")
    span.SetTag(ext.HTTPStatusCode, 200)
    span.Finish()
}

After (TraceKit)

import "github.com/tracekit/go-sdk/tracekit"

func main() {
    tracekit.Init("tk_your_api_key",
        tracekit.WithService("my-service"),
        tracekit.WithEnvironment("production"),
    )
    defer tracekit.Shutdown(context.Background())

    ctx, span := tracekit.StartSpan(context.Background(), "web.request")
    span.SetAttribute("http.method", "GET")
    span.SetAttribute("http.status_code", 200)
    span.End()
}

Before (Datadog)

const tracer = require('dd-trace').init({
  service: 'my-service',
  env: 'production',
});

const span = tracer.startSpan('web.request');
span.setTag('http.method', 'GET');
span.setTag('http.status_code', 200);
span.finish();

After (TraceKit)

const tracekit = require('@tracekit/node-apm');

tracekit.init({
  apiKey: 'tk_your_api_key',
  service: 'my-service',
  environment: 'production',
});

const span = tracekit.startSpan('web.request');
span.setAttribute('http.method', 'GET');
span.setAttribute('http.status_code', 200);
span.end();

Before (Datadog)

from ddtrace import tracer

tracer.configure(
    hostname='localhost',
    port=8126,
)

with tracer.trace('web.request', service='my-service') as span:
    span.set_tag('http.method', 'GET')
    span.set_tag('http.status_code', 200)

After (TraceKit)

import tracekit

tracekit.init(
    api_key='tk_your_api_key',
    service='my-service',
    environment='production',
)

with tracekit.start_span('web.request') as span:
    span.set_attribute('http.method', 'GET')
    span.set_attribute('http.status_code', 200)

Ready to migrate?

Start your free TraceKit account and follow this guide to migrate from Datadog in 1-2 hours.

Start Free Migration