Skip to content

Commit

Permalink
chore(docs): adding documentation on how to contribute with Tracetest…
Browse files Browse the repository at this point in the history
… (related to #1761) (#1820)

* chore(docs): adding documentation on how to contribute with Tracetest (related to #1761)

* Apply suggestions from code review

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>

* Update CONTRIBUTING.md

Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>
Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
  • Loading branch information
3 people authored Jan 12, 2023
1 parent 4567982 commit c209562
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# How to Contribute

Thank you for looking at this. We, at Tracetest, are really excited to have you contribute on the project with us.

The main lines of communication with our team are through [Github issues](https://github.com/kubeshop/tracetest/issues/new/choose) or [Discord](https://discord.gg/eBvEQRVyKX). Feel free to ask any questions!

## Developing

Development can be conducted using any GoLang and Typescript compatible IDE/editor (e.g., Jetbrains GoLand, VSCode).

There are four places where you develop new things on Tracetest: on the CLI, on the API Server, on the Web UI and on the Documentation website.

### CLI

Written in Golang, the CLI code is stored in the folder `./cli`. You can see what options you have to test and build the application by typing `make help` inside the folder.

To test its integration with our API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance:
```sh
cd ./examples/tracetest-jaeger
docker compose up -d
```

Remember that you need a file pointing to that server by configuring the CLI using the `tracetest configure` command or using the flag `-c` with a valid config file location, like `config.yaml` with the following content:
```yaml
scheme: http
endpoint: localhost:11633
analyticsEnabled: false
```
### API Server
Written in Golang, the API Server code is stored in `./server`. You can see what options you have to test and build the application by typing `make help` inside the folder.

To run the server along the database and the Open Telemetry collector, you can run `docker compose` at the root folder of Tracetest, by executing:
```sh
docker compose up postgres otel-collector
```

### Web UI

Written in Typescript and using Node.js tools, the Web UI code is stored in the folder `./web`. You can see what options you have to test and build the application by seeing the `package.json` scripts [here](./web/package.json).

Like the CLI, to connect to the API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance:
```sh
cd ./examples/tracetest-jaeger
docker compose up -d
```

### Documentation Website

Our docs are written in Markdown and the website is generated by `docusaurus`, the documentation is stored in the folder `./docs`. You can see what options you have to test and build the application by seeing the `package.json` scripts [here](./docs/package.json).

## Testing

We strive to have tests verify every important corner of our code-base. It will be greatly appreciated if your PR's include tests for the changes you propose.

## Submitting Changes

Please create a Github Pull-Request with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we would appreciate included use-case examples. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).

Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:

$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."

## Coding Conventions

Start reading our code and you'll get the hang of it. We use code formatting tools like [eslint](https://eslint.org/) and [go vet](https://pkg.go.dev/cmd/vet) to help maintain peace in the galaxy.

If you have any doubts about coding standards you can follow [Effective Go](https://go.dev/doc/effective_go) or [Go styleguide](https://google.github.io/styleguide/go/) for Golang and [Typescript styleguide](https://google.github.io/styleguide/tsguide.html) for Typescript.

Many thanks,
Kubeshop
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Is available at [https://docs.tracetest.io/](https://docs.tracetest.io/)
We strive to produce quality code and improve Tracetest rapidly and safely. Therefore, we have a full suite of both frontend and backend tests. We are using Cypress to test our frontend code and (surprise, surprise) Tracetest for our backend code. You can see the [test runs here](https://github.com/kubeshop/tracetest/actions/workflows/pull-request.yaml), and a blog post describing our [testing pipelines here](https://tracetest.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline).
# Contributing
Want to contribute with Tracetest? See our contributing guidelines [here](./CONTRIBUTING.md).
# License
[MIT License](/LICENSE)

0 comments on commit c209562

Please sign in to comment.