github.com/influxdata/telegraf@v1.30.3/CONTRIBUTING.md (about) 1 # Contributing to Telegraf 2 3 There are many ways to get involved in the Telegraf project! From opening issues, creating pull requests, to joining the conversation in Slack. We would love to see you contribute your expertise and join our community. To get started review this document to learn best practices. 4 5 ![tiger](assets/GopherAndTiger.png "tiger") 6 7 ## Opening Issues 8 9 ### Bug reports 10 11 Before you file an issue, please search existing issues in case it has already been filed, or perhaps even fixed. If you file an issue, please ensure you include all the requested details (e.g. Telegraf config and logs, platform, etc.) 12 13 Please note that issues are not the place to file general support requests such as "How do I use the mongoDB plugin?" Questions of this nature should be sent to the [Community Slack](https://influxdata.com/slack) or [Community Page](https://community.influxdata.com/), not filed as issues. 14 15 ### Feature requests 16 17 We really like to receive feature requests as it helps us prioritize our work. Before you file a feature request, please search existing issues, you can filter issues that have the label `feature request`. Please be clear about your requirements and goals, help us to understand what you would like to see added to Telegraf with examples and the reasons why it is important to you. If you find your feature request already exists as a Github issue please indicate your support for that feature by using the "thumbs up" reaction. 18 19 ### Support questions 20 21 We recommend posting support questions in our [Community Slack](https://influxdata.com/slack) or [Community Page](https://community.influxdata.com/), we have a lot of talented community members there who could help answer your question more quickly. 22 23 ## Contributing code 24 25 ### AI Generated Code 26 27 We currently cannot accept AI generated code contributions. Code contributed 28 should be your own per the CLA. 29 30 ### Creating a pull request 31 32 1. [Sign the CLA][cla]. 33 2. Open a [new issue][] to discuss the changes you would like to make. This is 34 not strictly required but it may help reduce the amount of rework you need 35 to do later. 36 3. Make changes or write plugin using the guidelines in the following 37 documents: 38 - [Input Plugins][inputs] 39 - [Processor Plugins][processors] 40 - [Aggregator Plugins][aggregators] 41 - [Output Plugins][outputs] 42 4. Ensure you have added proper unit tests and documentation. 43 5. Open a new [pull request][]. 44 6. The pull request title needs to follow [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/#summary) 45 46 **Note:** If you have a pull request with only one commit, then that commit needs to follow the conventional commit format or the `Semantic Pull Request` check will fail. This is because github will use the pull request title if there are multiple commits, but if there is only one commit it will use it instead. 47 48 ### When will your contribution get released? 49 50 We have two kinds of releases: patch releases, which happen every few weeks, and feature releases, which happen once a quarter. If your fix is a bug fix, it will be released in the next patch release after it is merged to master. If your release is a new plugin or other feature, it will be released in the next quarterly release after it is merged to master. Quarterly releases are on the third Wednesday of March, June, September, and December. 51 52 ### Contributing an External Plugin 53 54 Input, output, and processor plugins written for internal Telegraf can be run as externally-compiled plugins through the [Execd Input](/plugins/inputs/execd), [Execd Output](/plugins/outputs/execd), and [Execd Processor](/plugins/processors/execd) Plugins without having to change the plugin code. 55 56 Follow the guidelines of how to integrate your plugin with the [Execd Go Shim](/plugins/common/shim) to easily compile it as a separate app and run it with the respective `execd` plugin. 57 Check out our [guidelines](/docs/EXTERNAL_PLUGINS.md#external-plugin-guidelines) on how to build and set up your external plugins to run with `execd`. 58 59 ## Security Vulnerability Reporting 60 61 InfluxData takes security and our users' trust very seriously. If you believe you have found a security issue in any of our 62 open source projects, please responsibly disclose it by contacting `security@influxdata.com`. More details about 63 security vulnerability reporting, 64 including our GPG key, [can be found here](https://www.influxdata.com/how-to-report-security-vulnerabilities/). 65 66 ## Common development tasks 67 68 **Adding a dependency:** 69 70 Telegraf uses Go modules. Assuming you can already build the project, run this in the telegraf directory: 71 72 1. `go get github.com/[dependency]/[new-package]` 73 74 **Before opening a PR:** 75 76 Before opening a pull request you should run the following checks locally to make sure the CI will pass. 77 78 ```shell 79 make lint 80 make check 81 make check-deps 82 make test 83 make docs 84 ``` 85 86 **Execute integration tests:** 87 88 (Optional) 89 90 To run only the integration tests use: 91 92 ```shell 93 make test-integration 94 ``` 95 96 To run the full test suite use: 97 98 ```shell 99 make test-all 100 ``` 101 102 ### For more developer resources 103 104 - [Code Style][codestyle] 105 - [Deprecation][deprecation] 106 - [Logging][logging] 107 - [Metric Format Changes][metricformat] 108 - [Packaging][packaging] 109 - [Profiling][profiling] 110 - [Reviews][reviews] 111 - [Sample Config][sample config] 112 - [Code of Conduct][code of conduct] 113 114 [cla]: https://www.influxdata.com/legal/cla/ 115 [new issue]: https://github.com/influxdata/telegraf/issues/new/choose 116 [pull request]: https://github.com/influxdata/telegraf/compare 117 [inputs]: /docs/INPUTS.md 118 [processors]: /docs/PROCESSORS.md 119 [aggregators]: /docs/AGGREGATORS.md 120 [outputs]: /docs/OUTPUTS.md 121 [codestyle]: /docs/developers/CODE_STYLE.md 122 [deprecation]: /docs/developers/DEPRECATION.md 123 [logging]: /docs/developers/LOGGING.md 124 [metricformat]: /docs/developers/METRIC_FORMAT_CHANGES.md 125 [packaging]: /docs/developers/PACKAGING.md 126 [profiling]: /docs/developers/PROFILING.md 127 [reviews]: /docs/developers/REVIEWS.md 128 [sample config]: /docs/developers/SAMPLE_CONFIG.md 129 [code of conduct]: /CODE_OF_CONDUCT.md