Skip to content
Merged
89 changes: 79 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
## Contributing
# Contributing

Pull requests for bug fixes are always welcome!
🎉 Welcome to the OpenTelemetry Java Contrib Repository! 🎉

## Introduction

This repository focuses on providing tools and utilities for Java-based observability, such as remote JMX metric gathering and reporting. We’re excited to have you here! Whether you’re fixing a bug, adding a feature, or suggesting an idea, your contributions are invaluable.

Before submitting new features or changes to current functionality, it is recommended to first
-Before submitting new features or changes to current functionality, it is recommended to first
[open an issue](https://github.com/open-telemetry/opentelemetry-java-contrib/issues/new)
and discuss your ideas or propose the changes you wish to make.

### Building
-Questions? Ask in the OpenTelemetry [java channel](https://cloud-native.slack.com/archives/C014L2KCTE3)

Pull requests for bug fixes are always welcome!

## Pre-requisites

To work with this repository, ensure you have:

Tools:

-JDK 11+

-Java 17 or higher

-Gradle 7+

-Git

### Platform Notes:

macOS/Linux: Ensure JAVA_HOME is set correctly.

Windows: Use WSL2 or ensure Gradle is installed and accessible.

## Workflow

1. Fork the repository
2. Clone locally
3. Create a branch before working on an issue


## Local Run/Build

In order to build and test this whole repository you need JDK 11+.

Expand All @@ -22,21 +57,55 @@ the Sonatype OSS snapshots repository at `https://oss.sonatype.org/content/repos
Building using Java 11+:

```bash
java -version
$ java -version
```

```bash
./gradlew assemble
$ ./gradlew assemble

# Build the complete project
$ ./gradlew build
```

### Style guide
## Testing

```bash
# Run integration tests
$ ./gradlew integrationTest
```

### Test Types:

- Unit Tests: Isolated component tests.

- Integration Tests: Validate interactions between modules.

- CI Checks: PRs must pass all tests and linting.

See
the [Style guide](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/style-guideline.md)
from the opentelemetry-java-instrumentation repository.
Failure? Check logs for errors or mismatched dependencies.


## Contributing Rules

Style Guide: Follow the Java Instrumentation Style Guide.

### Gradle conventions

- Use kotlin instead of groovy
- Plugin versions should be specified in `settings.gradle.kts`, not in individual modules
- All modules use `plugins { id("otel.java-conventions") }`

## Further Help
Join [#otel-java](https://cloud-native.slack.com/archives/C014L2KCTE3) on OpenTelemetry Slack


## Troubleshooting Guide

# Troubleshooting Guide

| Error | Solution |
|-----------------------|----------|
| `JAVA_HOME` not set | Set `JAVA_HOME` to your JDK 11+ installation path. |
| `Gradle build fails` | Ensure plugin versions are specified in `settings.gradle.kts`. |
| `Test failures` | Check for missing dependencies or version conflicts. |

Loading