Intermediate 1-2 hours

Migrate from New Relic to TraceKit

Replace the New Relic agent with TraceKit's SDK-based instrumentation. No per-user pricing, no data ingest caps -- flat-rate APM with the same trace visibility.

Start Free
1

Replace New Relic Agent with TraceKit SDK

Remove the New Relic language agent (newrelic Go module, newrelic npm package, or newrelic Python package) and install the TraceKit SDK equivalent.

CategoryNew RelicTraceKitNotes
Packagegithub.com/newrelic/go-agent/v3/newrelicgithub.com/tracekit/go-sdkGo agent replacement
Packagenewrelic (npm)@tracekit/node-apm (npm)Node.js agent replacement
Packagenewrelic (pip)tracekit-apm (pip)Python agent replacement
2

Update License Key and Configuration

Replace New Relic license key and app name configuration with TraceKit API key and service name. Remove the newrelic.ini or newrelic.yml config file.

CategoryNew RelicTraceKitNotes
AuthenticationNEW_RELIC_LICENSE_KEYTRACEKIT_API_KEYAPI key for trace ingestion
Service IdentityNEW_RELIC_APP_NAMETRACEKIT_SERVICE_NAMEApplication name for grouping
Config Filenewrelic.yml / newrelic.iniEnvironment variables or SDK init optionsTraceKit prefers env vars over config files
Distributed TracingNEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true(enabled by default)Distributed tracing is always on in TraceKit
3

Migrate Custom Transactions and Segments

Replace New Relic's transaction and segment API with TraceKit spans. New Relic's concept of transactions maps to root spans, and segments map to child spans.

CategoryNew RelicTraceKitNotes
Initializationnewrelic.NewApplication(newrelic.ConfigAppName(...))tracekit.Init(apiKey, tracekit.WithService(...))Application creation maps to SDK init
Transactionsapp.StartTransaction(name)tracekit.StartSpan(ctx, name)Transactions become root spans
Segmentstxn.StartSegment(name)tracekit.StartSpan(ctx, name)Segments become child spans (context carries parent)
Attributestxn.AddAttribute(key, value)span.SetAttribute(key, value)Direct mapping for custom attributes
4

Update Error Tracking

Replace New Relic's error recording with TraceKit's span-level error recording. New Relic tracks errors at the transaction level; TraceKit attaches errors to the relevant span.

CategoryNew RelicTraceKitNotes
Error Recordingtxn.NoticeError(err)span.RecordError(err)Error attached to current span, not transaction
Error Attributestxn.NoticeError(newrelic.Error{Message: ..., Class: ...})span.RecordError(err); span.SetAttribute("error.type", class)Use attributes for error classification
Expected Errorstxn.NoticeExpectedError(err)span.SetAttribute("error.expected", true)Mark errors as expected via attribute
5

Verify Traces and Recreate Alerts

Start your instrumented application, generate traffic, and verify traces appear in TraceKit. Then recreate your critical New Relic alert conditions as TraceKit alerts.

CategoryNew RelicTraceKitNotes
VerificationNew Relic One > APM > TransactionsTraceKit Dashboard > TracesVerify trace data appears
VerificationNew Relic One > Distributed TracingTraceKit Service MapCheck cross-service trace linking
AlertingNew Relic Alerts & AI > PoliciesTraceKit AlertsRecreate critical alert conditions

Code Examples

Before (New Relic)

import "github.com/newrelic/go-agent/v3/newrelic"

func main() {
    app, _ := newrelic.NewApplication(
        newrelic.ConfigAppName("my-service"),
        newrelic.ConfigLicense("YOUR_NEW_RELIC_LICENSE_KEY"),
        newrelic.ConfigDistributedTracerEnabled(true),
    )

    txn := app.StartTransaction("process-order")
    defer txn.End()
    segment := txn.StartSegment("fetch-inventory")
    // ... business logic
    segment.End()
}

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(), "process-order")
    defer span.End()
    _, child := tracekit.StartSpan(ctx, "fetch-inventory")
    // ... business logic
    child.End()
}

Before (New Relic)

const newrelic = require('newrelic');

// newrelic.js config file required:
// exports.config = {
//   app_name: ['my-service'],
//   license_key: 'YOUR_NEW_RELIC_LICENSE_KEY',
//   distributed_tracing: { enabled: true },
// };

const handle = newrelic.startWebTransaction('/api/orders', () => {
  newrelic.startSegment('fetch-inventory', true, () => {
    // ... business logic
  });
});

After (TraceKit)

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

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

const span = tracekit.startSpan('/api/orders');
const child = tracekit.startSpan('fetch-inventory', { parent: span });
// ... business logic
child.end();
span.end();

Before (New Relic)

import newrelic.agent

newrelic.agent.initialize('newrelic.ini')
application = newrelic.agent.register_application()

@newrelic.agent.background_task()
def process_order(order_id):
    with newrelic.agent.FunctionTrace(name='fetch-inventory'):
        # ... business logic
        pass

After (TraceKit)

import tracekit

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

def process_order(order_id):
    with tracekit.start_span('process-order') as span:
        with tracekit.start_span('fetch-inventory') as child:
            # ... business logic
            pass

Ready to migrate?

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

Start Free Migration