Migrate newrelic-telemetry-sdk-go to the OpenTelemetry Go SDK
Recipe ID
org.openrewrite.golang.migration.MigrateNewRelicTelemetryToOpenTelemetryArtifactgithub.com/moderneinc/recipes-goMove the mechanical part of a github.com/newrelic/newrelic-telemetry-sdk-go migration: metric recordings become OpenTelemetry instrument recordings, and go.mod gains the OpenTelemetry requires. This is a partial migration by design — the harvester wiring, spans, events and logs have no faithful one-to-one rewrite, so run FindNewRelicTelemetrySdkUsage to enumerate what is left and replace the harvester with an sdkmetric.MeterProvider behind an OTLP exporter by hand. Run go mod tidy afterwards.
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.MigrateNewRelicTelemetryToOpenTelemetryIf the recipe isn’t available locally, install it with:
mod config recipes go install github.com/moderneinc/recipes-go