OpenTelemetry Collector components created and maintained by New Relic. This repository is a focused fork of opentelemetry-collector-contrib, containing only the core components and infrastructure needed for New Relic's OpenTelemetry integrations.
This project follows semantic versioning and releases are aligned with upstream OpenTelemetry Collector releases. Components in this repository maintain Beta stability for traces, metrics, and logs unless otherwise noted.
This fork includes:
- Core Components: Essential receivers and exporters (nop receiver, nop exporter)
- Internal Utilities: Common libraries and core internal packages for New Relic functionality
- Testbed Framework: Comprehensive end-to-end testing infrastructure for component validation
- Build Tools: Utilities for code generation and repository maintenance
For the complete list of included components, see versions.yaml.
- Go 1.22 or later
- Make
# Clone the repository
git clone https://github.com/newrelic/nrdot-collector-components.git
cd nrdot-collector-components
# Install build tools
make install-tools
# Build all components
make build
# Run tests
make gotestIf you're looking for pre-built OpenTelemetry Collector distributions that use these components, see the nrdot-collector-releases repository.
Use the OpenTelemetry Collector Builder to create a custom collector with components from this repository:
# Install the builder
go install go.opentelemetry.io/collector/cmd/builder@latest
# Build using the provided configuration
cd cmd/otelcontribcol
builder --config builder-config.yamlThis repository includes a comprehensive testbed for end-to-end component testing:
# Run all testbed tests
make e2e-test
# Run specific test suite
TESTS_DIR=correctnesstests/metrics make e2e-test
# Run testbed tests directly
cd testbed
make run-testsFor guidance on writing testbed tests for new components, see testbed/examples/processor_example_test.go.
Components are tracked in versions.yaml. To add a new component:
- Create your component following the contribution guidelines
- Add the component to
versions.yamlin the appropriate module set - Update
cmd/otelcontribcol/builder-config.yaml - Run
make crosslinkto update intra-repository dependencies - Run
make gotidyto update Go module dependencies - Run
make addlicenseto generate license headers and third-party notices
Each component has stability levels for each signal type (traces, metrics, logs):
- Beta: Ready for production use with backwards compatibility guarantees
- Alpha: Ready for testing, breaking changes may occur
- Development: Experimental, not recommended for production
See component README files for specific stability information.
# Build all components
make build
# Build for specific OS/architecture
make GOOS=linux GOARCH=amd64 build
# Generate code
make generate
# Lint code
make lint
# Run all checks (lint + test)
make checks# Test cross-compilation for all supported platforms
make cross-compile# Run all unit tests
make gotest
# Run tests for specific component
cd exporter/nopexporter
make test
# Run tests with coverage
make gotest-with-cover# Run correctness tests
cd testbed
make run-correctness-tests
# Run stability tests
make run-stability-tests# Run full e2e test suite
make e2e-test
# Run specific test category
TESTS_DIR=correctnesstests/traces make e2e-testNew Relic hosts and moderates an online forum where you can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub.
We encourage your contributions to improve New Relic OpenTelemetry Collector Components! Keep in mind that 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.
If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at opensource@newrelic.com.
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through our bug bounty program.
If you would like to contribute to this project, review these guidelines.
To all contributors, we thank you! Without your contribution, this project would not be what it is today.
New Relic OpenTelemetry Collector Components is licensed under the Apache 2.0 License.
This project uses source code from the OpenTelemetry Collector Contrib project, which is also licensed under Apache 2.0.
