Setting up your development environment for contributing to the open-telemetry.io project can be done in various ways. This guide will cover the possible options and provide examples for each option, using the provided documentation and code snippets.
Big Picture and Design Philosophy
The OpenTelemetry project aims to standardize the collection and export of telemetry data (traces, metrics, and logs) from cloud-native software. The design philosophy emphasizes flexibility, ease of use, and compatibility with various programming languages, frameworks, and backends.
Programming Languages
OpenTelemetry supports multiple programming languages, including but not limited to:
- Go
- Java
- JavaScript
- .NET
- Python
Hugo
The open-telemetry.io website is built using Hugo, a popular static site generator. To set up your environment for contributing to the website, follow these steps:
- Install Hugo: https://gohugo.io/getting-started/installing/
- Clone the open-telemetry.io repository:
git clone https://github.com/open-telemetry/opentelemetry.io.git
- Change to the project directory:
cd opentelemetry.io
- Run the local development server:
hugo server
Netlify CLI
Alternatively, you can use the Netlify CLI to develop and deploy the website locally:
- Install Netlify CLI: https://docs.netlify.com/cli/getstarted/
- Clone the open-telemetry.io repository:
git clone https://github.com/open-telemetry/opentelemetry.io.git
- Change to the project directory:
cd opentelemetry.io
- Run the local development server:
netlify dev
Prettier, Textlint, and Markdown-link-check
The open-telemetry.io repository uses Prettier, Textlint, and Markdown-link-check for code formatting and linting. To set up your environment for these tools, follow these steps:
- Install Prettier: https://prettier.io/docs/en/install.html
- Install Textlint: https://textlint.org/docs/install/
- Install Markdown-link-check: https://www.npmjs.com/package/markdown-link-check
- Configure your code editor to use Prettier and Textlint for formatting and linting.
Gulp, PostCSS-CLI, Autoprefixer, Markdownlint, and Cspell
The open-telemetry.io repository also uses Gulp, PostCSS-CLI, Autoprefixer, Markdownlint, and Cspell for various tasks. To set up your environment for these tools, follow these steps:
- Install Node.js: https://nodejs.org/en/download/
- Install Gulp:
npm install -g gulp-cli
- Install PostCSS-CLI:
npm install -g postcss-cli
- Install Autoprefixer:
npm install -g autoprefixer
- Install Markdownlint:
npm install -g markdownlint-cli
- Install Cspell:
npm install -g cspell
- Change to the project directory:
cd opentelemetry.io
- Install the required dependencies:
npm install
- Run the tasks using Gulp:
gulp <task-name>
OpenTelemetry Collector
The OpenTelemetry Collector is a separate component for collecting and exporting telemetry data. To set up your environment for contributing to the Collector, follow these steps:
- Install Go: https://golang.org/doc/install
- Clone the OpenTelemetry Collector repository:
git clone https://github.com/open-telemetry/opentelemetry-collector.git
- Change to the project directory:
cd opentelemetry-collector
- Run the local development server:
go run main.go
For more information on configuring and scaling the OpenTelemetry Collector, refer to the following resources:
- Configuration: https://opentelemetry.io/docs/collector/configuration/
- How to Scale: https://grafana.com/docs/opentelemetry/collector/how-to-scale
Instrumentation
OpenTelemetry provides automatic and manual instrumentation for various programming languages and frameworks. To set up your environment for contributing to instrumentation, follow these steps:
- Choose your programming language from the list of supported languages: https://opentelemetry.io/ecosystem/integrations/
- Follow the specific instructions for your chosen language.
For example, for Node.js applications, follow the instructions in the following resource:
- Node.js Instrumentation: https://developers.redhat.com/articles/2022/08/23/how-use-opentelemetry-trace-nodejs-applications
For PHP applications, follow the instructions in the following resource:
- PHP Auto-Instrumentation: https://opentelemetry.io/blog/2023/php-auto-instrumentation
Community
The OpenTelemetry project welcomes contributions from the community. To get involved, follow these steps:
- Join the mailing lists: https://opentelemetry.io/community/#mailing-lists
- Follow the project on Twitter: https://opentelemetry.io/community/#twitter
- Chat with other project developers on Slack: https://opentelemetry.io/community/#slack
- Find the project on GitHub: https://opentelemetry.io/community/#github
For more information on the OpenTelemetry project, visit the official website: https://opentelemetry.io/