Migrate from Elastic APM to TraceKit
Replace your Elastic APM Server and Elasticsearch cluster with TraceKit's managed tracing. No cluster sizing, no index management, no shard tuning -- just traces.
Start FreeReplace Elastic APM Agent with TraceKit SDK
Remove the Elastic APM language agent and install the TraceKit SDK. Elastic APM agents auto-instrument frameworks; TraceKit SDKs provide similar auto-instrumentation hooks.
| Category | Elastic APM | TraceKit | Notes |
|---|---|---|---|
| Package | go.elastic.co/apm (Go agent) | github.com/tracekit/go-sdk | Go agent replacement |
| Package | elastic-apm-node (npm) | @tracekit/node-apm (npm) | Node.js agent replacement |
| Package | elastic-apm (pip) | tracekit-apm (pip) | Python agent replacement |
Map APM Server Configuration
Replace Elastic APM Server connection settings with TraceKit endpoint configuration. The APM Server URL and secret token map to TraceKit's endpoint and API key.
| Category | Elastic APM | TraceKit | Notes |
|---|---|---|---|
| Connection | ELASTIC_APM_SERVER_URL (http://apm-server:8200) | TRACEKIT_ENDPOINT | Managed endpoint replaces self-hosted APM Server |
| Authentication | ELASTIC_APM_SECRET_TOKEN | TRACEKIT_API_KEY | API key for authentication |
| Authentication | ELASTIC_APM_API_KEY | TRACEKIT_API_KEY | Alternative auth method also maps to API key |
| Service Identity | ELASTIC_APM_SERVICE_NAME | TRACEKIT_SERVICE_NAME | Service name for trace grouping |
| Service Identity | ELASTIC_APM_ENVIRONMENT | TRACEKIT_ENVIRONMENT | Environment tagging (production, staging) |
Migrate Custom Instrumentation
Replace Elastic APM's transaction and span API with TraceKit equivalents. Elastic APM distinguishes between transactions (entry points) and spans (operations within a transaction); TraceKit uses spans throughout with parent-child linking.
| Category | Elastic APM | TraceKit | Notes |
|---|---|---|---|
| Initialization | elasticapm.DefaultTracer (Go) | tracekit.Init(apiKey) | SDK initialization |
| Transactions | apm.StartTransaction(name, type) | tracekit.StartSpan(ctx, name) | Transactions become root spans |
| Spans | tx.StartSpan(name, spanType, parent) | tracekit.StartSpan(ctx, name) | Context carries parent reference |
| Labels | tx.Context.SetLabel(key, value) | span.SetAttribute(key, value) | Labels become span attributes |
| Errors | apm.CaptureError(err) | span.RecordError(err) | Errors attached to current span |
Update Sampling and Filter Configuration
Map Elastic APM's sampling and filtering settings to TraceKit. Elastic APM uses transaction sample rate and central configuration; TraceKit uses SDK-level configuration.
| Category | Elastic APM | TraceKit | Notes |
|---|---|---|---|
| Sampling | ELASTIC_APM_TRANSACTION_SAMPLE_RATE (0-1.0) | TRACEKIT_SAMPLE_RATE (0.0-1.0) | Same range, direct mapping |
| Filtering | ELASTIC_APM_TRANSACTION_IGNORE_URLS | tracekit.WithIgnoreEndpoints(patterns) | SDK init option for URL filtering |
| Stack Traces | ELASTIC_APM_STACK_TRACE_LIMIT | tracekit.WithStackTraceDepth(n) | Control stack trace capture depth |
Verify Traces and Decommission APM Server
Confirm traces appear in TraceKit, then decommission the Elastic APM Server and (if used solely for APM) the associated Elasticsearch indices. Kibana APM views are replaced by TraceKit's built-in dashboard.
| Category | Elastic APM | TraceKit | Notes |
|---|---|---|---|
| Verification | Kibana > APM > Services | TraceKit Dashboard > Services | Verify service list and health |
| Verification | Kibana > APM > Traces | TraceKit Dashboard > Traces | Verify trace waterfall and span detail |
| Decommission | APM Server process (port 8200) | (not needed) | Remove APM Server from infrastructure |
Code Examples
Before (Elastic APM)
import (
"go.elastic.co/apm"
)
func main() {
// Configure via ELASTIC_APM_* environment variables
tracer := apm.DefaultTracer
tx := tracer.StartTransaction("process-order", "request")
defer tx.End()
span, _ := apm.StartSpan(tx.TraceContext(), "fetch-inventory")
span.Context.SetLabel("order.id", "12345")
// ... business logic
span.End()
}After (TraceKit)
import "github.com/tracekit/go-sdk/tracekit"
func main() {
tracekit.Init("tk_your_api_key",
tracekit.WithService("order-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")
child.SetAttribute("order.id", "12345")
// ... business logic
child.End()
}Before (Elastic APM)
const apm = require('elastic-apm-node').start({
serviceName: 'order-service',
serverUrl: 'http://apm-server:8200',
secretToken: 'your-secret-token',
environment: 'production',
});
const trans = apm.startTransaction('process-order', 'request');
const span = trans.startSpan('fetch-inventory');
span.setLabel('order.id', '12345');
// ... business logic
span.end();
trans.end();After (TraceKit)
const tracekit = require('@tracekit/node-apm');
tracekit.init({
apiKey: 'tk_your_api_key',
service: 'order-service',
environment: 'production',
});
const span = tracekit.startSpan('process-order');
const child = tracekit.startSpan('fetch-inventory', { parent: span });
child.setAttribute('order.id', '12345');
// ... business logic
child.end();
span.end();Before (Elastic APM)
import elasticapm
client = elasticapm.Client(
service_name='order-service',
server_url='http://apm-server:8200',
secret_token='your-secret-token',
environment='production',
)
client.begin_transaction('request')
with elasticapm.capture_span('fetch-inventory'):
elasticapm.label(order_id='12345')
# ... business logic
client.end_transaction('process-order', 'success')After (TraceKit)
import tracekit
tracekit.init(
api_key='tk_your_api_key',
service='order-service',
environment='production',
)
with tracekit.start_span('process-order') as span:
with tracekit.start_span('fetch-inventory') as child:
child.set_attribute('order.id', '12345')
# ... business logicRelated Resources
TraceKit vs Elastic APM
APM built on the Elastic Stack. See how TraceKit delivers observability without the cluster overhead.
Express Observability
Express middleware is simple until you have 15 layers and a request takes 3 seconds. TraceKit traces every middleware hop, maintains context across async/await boundaries, and helps you find memory leaks before your users do.
Go Distributed Tracing Guide
Learn distributed tracing patterns and best practices for Go
APM Implementation Checklist
Step-by-step APM implementation checklist covering SDK installation, instrumentation, alerting, and production rollout with OpenTelemetry best practices.
OTel Config Generator
Generate OpenTelemetry Collector configurations for your stack
Ready to migrate?
Start your free TraceKit account and follow this guide to migrate from Elastic APM in 1-2 hours.
Start Free Migration