Modern Go applications increasingly rely on OpenTelemetry (OTel) instrumentation for broad ecosystem compatibility and standard community tooling. At the same time, engineering teams rely on New Relic’s deep runtime transaction context, curated distributed tracing, and out-of-the-box APM curation.
Until now, teams had to choose between native OpenTelemetry exporters and New Relic instrumentation. With the upcoming release of nrotelhybrid, our dedicated hybrid instrumentation package for Go, you can combine standard OpenTelemetry spans with New Relic APM without changing your existing transport pipelines or throwing away your investment in either tool.
What is the Go Agent Hybrid Model?
Because Go compiles to static binaries without dynamic runtime loaders, bringing OpenTelemetry and New Relic together requires compile-time coordination. The hybrid approach addresses this directly through an additive bridge module:
- Native OTel Span Processing: The
nrotelhybridmodule provides a real OpenTelemetrysdk/trace.SpanProcessorthat maps standard OTel spans directly into New Relic transactions and external, datastore, or messaging segments. - Minimal Integration Overhead: You connect your existing OpenTelemetry tracer provider to New Relic in just three lines of Go code.
- Preserved Network & Security Controls: Spans are transmitted through New Relic’s established agent transport, preserving existing enterprise proxy configurations, connection retry handling, and audit logging out of the box.
- No Double Counting: The hybrid processor safely coexists with your existing tracer provider, deduplicating spans so telemetry is neither duplicated nor dropped.
Key Capabilities and Features
| Capability | How It Works | Benefit |
How It Works in Practice
Integrating the hybrid bridge into an application that already initializes OpenTelemetry requires registering New Relic's span processor:
package main
import (
"context"
"log"
"github.com/newrelic/go-agent/v3/newrelic"
"github.com/newrelic/go-agent/v3/integrations/nrotelhybrid"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
func main() {
// 1. Initialize New Relic Application
app, err := newrelic.NewApplication(
newrelic.ConfigFromEnvironment(),
)
if err != nil {
log.Fatal(err)
}
// 2. Attach the Hybrid SpanProcessor to your OpenTelemetry TracerProvider
tp := sdktrace.NewTracerProvider(
sdktrace.WithSpanProcessor(nrotelhybrid.NewSpanProcessor(app)),
)
defer tp.Shutdown(context.Background())
// 3. Spans created via standard otel.Tracer now appear in New Relic APM!
}
Phased Roadmap: What’s Coming Next
The Go Hybrid release is delivering value incrementally across key telemetry pillars:
- Phase 1 (Tracing & Segments): Tagged experimental
nrotelhybridmodule supporting server/consumer transactions, database and external segment mapping, and trace context propagation. - Phase 2 (Trace ID Alignment & Semantics): Zero-orphan tracing guarantees, span link preservation, and GA-level compatibility testing across popular
otelcontriblibraries. - Phase 3 (Logging Bridge): Direct routing from OpenTelemetry Log SDK into New Relic log records with automatic trace context correlation.
- Phase 4 & Beyond (Dimensional Metrics & Tooling): Metric bridging for dimensional runtime metrics, plus automated diff generation via Go Easy tooling.
Check out the docs to get started instrumenting your apps today.
本ブログに掲載されている見解は著者に所属するものであり、必ずしも New Relic 株式会社の公式見解であるわけではありません。また、本ブログには、外部サイトにアクセスするリンクが含まれる場合があります。それらリンク先の内容について、New Relic がいかなる保証も提供することはありません。