Skip to content

Latest commit

 

History

History
124 lines (100 loc) · 4.29 KB

CONTRIBUTING.md

File metadata and controls

124 lines (100 loc) · 4.29 KB

Contributing to Jaeger

We'd love your help! If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request into the master branch.

Getting Started

This library uses glide to manage dependencies.

To get started:

git submodule update --init --recursive
glide install
make test

Project Structure

These are general guidelines on how to organize source code in this repository.

github.com/uber/jaeger
  cmd/                      - All binaries go here
    agent/
      app/                  - The actual code for the binary
      main.go
    collector/
      app/                  - The actual code for the binary
      main.go
  pkg/                      - See Note 1
  plugin/                   - Swappable implementations of various components
    storage/
      cassandra/            - Cassandra implementations of storage APIs
        .                   - Shared Cassandra stuff
        spanstore/          - SpanReader / SpanWriter implementations
        dependencystore/
      elasticsearch/        - ES implementations of storage APIs
  storage/
    spanstore/              - SpanReader / SpanWriter interfaces
    dependencystore/
  idl/                      - (submodule)
  jaeger-ui/                - (submodule)
  thrift-gen/               - Generated Thrift types
    agent/
    jaeger/
    sampling/
    zipkincore/
  • Note 1: pkg is a collection of utility packages used by the Jaeger components without being specific to its internals. Utility packages are kept separate from the Jaeger core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository, to facilitate re-use by other projects.

Imports grouping

This projects follows the following pattern for grouping imports in Go files:

  • imports from standard library
  • imports from other projects
  • imports from jaeger project

For example:

import (
	"fmt"
 
	"github.com/uber/jaeger-lib/metrics"
	"go.uber.org/zap"

	"github.com/uber/jaeger/cmd/agent/app"
	"github.com/uber/jaeger/cmd/collector/app/builder"
)

Making A Change

Before making any significant changes, please open an issue. Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.

Once we've discussed your changes and you've got your code ready, make sure that tests are passing (make test or make cover) and open your PR! Your pull request is most likely to be accepted if it:

License

By contributing your code, you agree to license your contribution under the terms of the MIT License.

If you are adding a new file it should have a header like below. The easiest way to add such header is to run make fmt.

// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.