← All recipes
Moderne licensed

Require the OpenTelemetry Go SDK instead of newrelic-telemetry-sdk-go

Recipe IDorg.openrewrite.golang.migration.UpdateNewRelicTelemetryDependencyArtifactgithub.com/moderneinc/recipes-go

Require go.opentelemetry.io/otel v1.46.0 and go.opentelemetry.io/otel/metric once the source records through them, and drop github.com/newrelic/newrelic-telemetry-sdk-go once nothing imports it. Exporting to New Relic also needs an OTLP exporter and go.opentelemetry.io/otel/sdk, which the hand-written provider wiring pulls in. Does not sync go.sum, so a go mod tidy is still needed.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.golang.migration.UpdateNewRelicTelemetryDependency

If the recipe isn’t available locally, install it with:

mod config recipes go install github.com/moderneinc/recipes-go