Coder Social home page Coder Social logo

dengliming / opentelemetry-collector-contrib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-telemetry/opentelemetry-collector-contrib

0.0 2.0 0.0 4.65 MB

Contrib repository for the OpenTelemetry Collector

License: Apache License 2.0

Go 98.87% Makefile 0.42% Dockerfile 0.05% Shell 0.52% PowerShell 0.14%

opentelemetry-collector-contrib's Introduction


Getting Started   •   Getting Involved   •   Getting In Touch

Go Report Card Build Status Codecov Status GitHub release (latest by date including pre-releases) Beta

Contributing   •   Vision   •   Design   •   Monitoring   •   Performance   •   Roadmap


OpenTelemetry Collector Contrib

This is a repository for OpenTelemetry Collector contributions that are not part of the core repository and core distribution of the Collector. Typically, these contributions are vendor specific receivers/exporters and/or components that are only useful to a relatively small number of users.

Adding New Components

Before you start please read the contributing guidelines.

Any component (receiver, processor, exporter, or extension) needs to implement the interfaces defined on the core repository. Familiarize yourself with the interface of the component that you want to write, and use existing implementations as reference.

NOTICE: The Collector is in Beta stage and as such the interfaces may undergo breaking changes. Component creators must be available to update or review their components when such changes happen, otherwise the component will be excluded from the default builds.

Generally, maintenance of components is the responsibility of contributors who authored them. If the original author or some other contributor does not maintain the component it may be excluded from the default build. The component will be excluded if it causes build problems, has failing tests or otherwise causes problems to the rest of the repository and the rest of contributors.

  • Create your component under the proper folder and use Go standard package naming recommendations.
  • Use a boiler-plate Makefile that just references the one at top level, ie.: include ../../Makefile.Common - this allows you to build your component with required build configurations for the contrib repo while avoiding building the full repo during development.
  • Each component has its own go.mod file. This allows custom builds of the collector to take a limited sets of dependencies - so run go mod commands as appropriate for your component.
  • Implement the needed interface on your component by importing the appropriate component from the core repo.
 Follow the pattern of existing components regarding config and factory source files and tests.

  • Implement your component as appropriate. Provide end-to-end tests (or mock backend/client as appropriate). Target is to get 80% or more of code coverage.
  • Add a README.md on the root of your component describing its configuration and usage, likely referencing some of the yaml files used in the component tests. We also suggest that the yaml files used in tests have comments for all available configuration settings so users can copy and modify them as needed.
  • Add a replace directive at the root go.mod file so your component is included in the build of the contrib executable.

General Recommendations

Below are some recommendations that apply to typical components. These are not rigid rules and there are exceptions but in general try to follow them.

  • Avoid introducing batching, retries or worker pools directly on receivers and exporters. Typically, these are general cases that can be better handled via processors (that also can be reused by other receivers and exporters).
  • When implementing exporters try to leverage the exporter helpers from the core repo, see exporterhelper package. This will ensure that the exporter provides zPages and a standard set of metrics.

Questions

Reach the Collector community on gitter if you have further questions.

opentelemetry-collector-contrib's People

Contributors

asuresh4 avatar atoulme avatar austinlparker avatar axw avatar bogdandrutu avatar ccaraman avatar dinooliva avatar dmitryax avatar ferhatelmas avatar flands avatar frigus02 avatar hencrice avatar james-bebbington avatar jchengsfx avatar jingbowanggoogle avatar jrcamp avatar kbrockhoff avatar lizthegrey avatar nilebox avatar objectiser avatar owais avatar pcwiese avatar pjanotti avatar pmcollins avatar rghetia avatar rmfitzpatrick avatar shabicheng avatar songy23 avatar subnova-etsy avatar tigrannajaryan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.