Thank you for your interest in contributing to the OpenTelemetry Plugin for Genkit Go! We welcome contributions from the community.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing
- Documentation
This project and everyone participating in it is governed by our commitment to creating a welcoming and inclusive environment. By participating, you are expected to uphold this standard.
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bug fix
- Make your changes
- Test your changes
- Submit a pull request
- Go 1.24.1 or later
- Git
-
Clone the repository:
git clone https://github.com/genkit-ai/opentelemetry-go-plugin.git cd genkit-opentelemetry-go -
Install dependencies:
go mod download
-
Run tests:
go test ./... -
Run examples to verify setup:
cd examples/basic go run main.go
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Go version and OS
Enhancement suggestions are welcome! Please:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- Include code examples if applicable
- Choose an Issue: Look for issues labeled
good first issueorhelp wanted - Create a Branch: Create a feature branch from
main - Make Changes: Implement your changes following our coding standards
- Add Tests: Include tests for new functionality
- Update Documentation: Update README.md and code comments as needed
- Test: Ensure all tests pass and new functionality works correctly
This project uses Conventional Commits for automatic semantic versioning and changelog generation. All commit messages must follow this format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature (triggers minor version bump)
- fix: A bug fix (triggers patch version bump)
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- chore: Other changes that don't modify src or test files
Breaking changes trigger a major version bump and should be indicated with ! after the type/scope:
feat(api)!: change model configuration interface
BREAKING CHANGE: Model configuration now requires explicit region specification.
feat(models): add support for Claude 3.5 Sonnet
fix(streaming): resolve timeout issue with long responses
docs(readme): update installation instructions
test(examples): add integration tests for tool callingWhen commits are pushed to the main branch:
- Semantic Release analyzes commit messages
- Version is automatically bumped based on commit types
- Changelog is generated and updated
- GitHub Release is created with release notes
- GoReleaser builds and publishes artifacts
- Update Documentation: Ensure the README.md and other documentation are updated
- Add Tests: Include tests that cover your changes
- Follow Commit Standards: Use conventional commit format for all commits
- Create Pull Request: Submit a pull request with a clear title and description
- Address Feedback: Respond to review comments promptly
When creating a pull request, please include:
- Description: What changes does this PR introduce?
- Type of Change: Bug fix, new feature, breaking change, documentation update
- Testing: How has this been tested?
- Checklist: Confirm you've followed the contribution guidelines
- Follow standard Go formatting (
go fmt) - Use meaningful variable and function names
- Include comments for exported functions and types
- Follow Go naming conventions
- Keep functions focused and reasonably sized
- Group related functionality together
- Use clear package structure
- Separate concerns appropriately
- Follow existing patterns in the codebase
- Use Go's standard error handling patterns
- Provide meaningful error messages
- Handle errors at appropriate levels
- Don't ignore errors unless explicitly justified
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...- All new code should include appropriate tests
- Tests should cover both success and error cases
- Use table-driven tests where appropriate
- Unit tests: Test individual functions and methods
- Example tests: Ensure examples continue to work
- All exported functions and types must have comments
- Comments should explain what the code does, not how
- Include examples in comments where helpful
- Use standard Go documentation conventions
- Keep the README.md up to date with new features
- Include examples for new functionality
- Update supported models list when adding new models
- Maintain accurate installation and usage instructions
Releases are handled by maintainers. The process includes:
- Version bumping following semantic versioning
- Updating CHANGELOG.md
- Creating GitHub releases with release notes
- Ensuring all tests pass before release
If you have questions about contributing, please:
- Check existing issues and discussions
- Create a new issue with the
questionlabel - Reach out to maintainers
Thank you for contributing to OpenTelemetry Plugin for Genkit Go!