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 nrotelhybrid module provides a real OpenTelemetry sdk/trace.SpanProcessor that 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

CapabilityHow It WorksBenefit

Unified Distributed Tracing

Adopts upstream trace IDs with aligned Context
and W3C propagation.

OTel spans and New Relic transactions join the same end-to-end trace graph across services.

Span Events & Links

Records batching, messaging links,
and span events into New Relic span metadata.

Asynchronous workflows and batch processing maintain causal context across services.

OTel Environment Configuration

Maps core OTel environment variables (OTEL_SERVICE_NAME, OTEL_
LOG_LEVEL, OTEL_SDK_DISABLED).

Honors standard 12-factor application configurations without custom code modifications.

Rich Segment Conversion

Translates OTel HTTP, gRPC,
and database semconv conventions
into native APM segments.

APM dashboards, throughput charts, and error rate alerting function automatically.

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:

  1. Phase 1 (Tracing & Segments): Tagged experimental nrotelhybrid module supporting server/consumer transactions, database and external segment mapping, and trace context propagation.
  2. Phase 2 (Trace ID Alignment & Semantics): Zero-orphan tracing guarantees, span link preservation, and GA-level compatibility testing across popular otelcontrib libraries.
  3. Phase 3 (Logging Bridge): Direct routing from OpenTelemetry Log SDK into New Relic log records with automatic trace context correlation.
  4. 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.

현재 이 페이지는 영어로만 제공됩니다.