Skip to content

Commit

Permalink
Merge pull request kuskoman#80 from kuskoman/contributing
Browse files Browse the repository at this point in the history
Improve README and add CONTRIBUTING file
  • Loading branch information
kuskoman authored Apr 13, 2023
2 parents 9415663 + fb03205 commit 1f09e60
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to Logstash-exporter

## Guidelines

1. Create an issue: Before working on any changes, it's a good idea to create an issue to discuss whether the changes are actually needed and would benefit the project. This will help us understand your motivation and guide you in the right direction.

2. Fork the repository: Once the issue has been discussed and it's clear that your proposed changes are needed, fork the repository and make your changes on a separate branch.

3. Write tests: While 100% test coverage is not a strict requirement, I strongly encourage you to write tests for your changes. This will help ensure that your changes do not break existing functionality and will make the codebase more robust.

4. Pass CI: Your pull request must pass the continuous integration (CI) checks. If the CI checks fail, please fix any issues that are flagged and update your pull request.

5. Submit a pull request: Once your changes are complete and your branch is in sync with the main branch, submit a pull request. In the pull request description, please provide a brief summary of your changes, as well as any relevant information that reviewers should be aware of.

## Testing

### Changing application code

After changing application code, you can run the tests with:

make test

It is recommended to track the code coverage of your changes. You can do this by running:

make test-coverage

The aim is to have 100% code coverage. If you are unable to achieve this, please explain why in your pull request.

### Changing Helm chart

Testing the Helm chart is currently handled on CI using [kind](https://kind.sigs.k8s.io/). Chart testing process is described by code in [pipeline definition file](./.github/workflows/go-application.yml).
Currently there is no easy way to test the chart locally, but this is planned to be implemented in the future.

### Other changes

If you are making changes that do not affect the application code or the Helm chart, please explain how you tested your changes in your pull request.

## Code style

Please follow the existing code style in the project. This will make it easier for others to read and understand your changes.

## Commit messages

Write clear and concise commit messages that describe the changes you made and the motivation behind them. This will make it easier for others to review your changes and understand the history of the project. For previous commit messages, please see the commit history, for example on [GitHub repo history](https://github.com/kuskoman/logstash-exporter/commits/master).

## License

By contributing to this project, you agree that your contributions will be licensed under the [MIT License](./LICENSE).

## Special thanks

Thank you once again for considering contributing to Logstash-exporter! Your time and expertise are greatly appreciated.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ Build the Docker image:

make build-docker

Build the multi-arch Docker image:

make build-docker-multi

Delete all binary executables:

make clean
Expand Down Expand Up @@ -197,6 +201,18 @@ Usage:
This [script](./scripts/create_release_notes.sh) is used to create release notes for the GitHub release.
Used primarily by the [CI workflow](./.github/workflows/go-application.yml).

### generate_helm_readme.sh

This [script](./scripts/generate_helm_readme.sh) is used to generate Helm chart [README.md](./chart/README.md) file.
The readme contains all the configuration variables from the [values.yaml](./chart/values.yaml) file.

### install_helm_readme_generator.sh

This [script](./scripts/install_helm_readme_generator.sh) is used to install
[readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) tool.
The tool is used to generate Helm chart [README.md](./chart/README.md) file.
The script installs the tool under [helm-generator](./helm-generator) directory.

### verify_metrics.sh

This [script](./scripts/verify_metrics.sh) is used to verify the metrics from the Go Exporter application.
Expand Down Expand Up @@ -239,11 +255,17 @@ These are the features that are planned to be implemented in the future:
- [x] Parse missing metrics (if you find any useful missing metrics, please create an issue)
- [x] Add description to all metrics
- [x] Improve test coverage
- [ ] Build Helm chart (see #66)
- [ ] Build Helm chart (see [#66](https://github.com/kuskoman/logstash-exporter/pull/66) for progress)
- [x] Automatically add release notes to GitHub release
- [ ] Provide example Grafana dashboard
- [ ] Improve chart value descriptions (current one is generated by GPT-4 and not always accurate)

Feel free to create an issue if you have any suggestions, ideas or questions.

## Contributing

If you want to contribute to this project, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) file.

## Metrics

Table of exported metrics:
Expand Down

0 comments on commit 1f09e60

Please sign in to comment.