Skip to content

newrelic/newrelic-opencensus-exporter-go

New Relic Go OpenCensus exporter GoDoc

The nrcensus package provides an exporter for sending OpenCensus stats and traces to New Relic.

Requirements

Install

To install, just go get this package with

$ go get -u github.com/newrelic/newrelic-opencensus-exporter-go

Using the exporter

To use the exporter, create a new Exporter and register it with OpenCensus.

package main

import (
    "github.com/newrelic/newrelic-opencensus-exporter-go/nrcensus"
    "go.opencensus.io/stats/view"
    "go.opencensus.io/trace"
)

func main() {
    exporter, err := nrcensus.NewExporter("My-OpenCensus-App", "__YOUR_NEW_RELIC_INSIGHTS_API_KEY__")
    if err != nil {
        panic(err)
    }
    view.RegisterExporter(exporter)
    trace.RegisterExporter(exporter)

    // create stats, traces, etc
}

Find and use your data

Tips on how to find and query your data:

For general querying information, see:

Find and use your data

Tips on how to find and query your data:

For general querying information, see:

Licensing

The New Relic Go OpenCensus exporter is licensed under the Apache 2.0 License. The New Relic Go OpenCensus exporter also uses source code from third party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the third party notices document.

Contributing

Full details are available in our CONTRIBUTING.md file. We'd love to get your contributions to improve the Go OpenCensus exporter! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. To execute our corporate CLA, which is required if your contribution is on behalf of a company, or if you have any questions, please drop us an email at [email protected].

Limitations

The New Relic Telemetry APIs are rate limited. Please reference the documentation for New Relic Metrics API and New Relic Trace API Requirements and Limits on the specifics of the rate limits.