-
Notifications
You must be signed in to change notification settings - Fork 555
Add GitHub Copilot repository instructions with development workflow guidance #3118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Create .github/copilot-instructions.md file following GitHub's documentation - Include required clippy, rustfmt, and cargo check instructions - Add comprehensive guidance for OpenTelemetry Rust development including: - Workspace structure and multi-crate considerations - Feature flags and experimental features - Code standards and MSRV requirements - Build requirements including protoc dependency - Testing and validation practices - OpenTelemetry-specific patterns and conventions Co-authored-by: cijothomas <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3118 +/- ##
=======================================
- Coverage 80.5% 80.5% -0.1%
=======================================
Files 126 126
Lines 22218 22218
=======================================
- Hits 17890 17889 -1
- Misses 4328 4329 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.github/copilot-instructions.md
Outdated
- Follow the OpenTelemetry specification | ||
- Prioritize functionality over structural compliance with spec | ||
- Use Rust idioms rather than forcing spec API patterns | ||
- Configuration priority: Environment variables > compile-time config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot code should have higher priority than env variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the configuration priority order to prioritize compile-time config over environment variables. Changes committed in commit 8b5a9e2.
Co-authored-by: cijothomas <[email protected]>
.github/copilot-instructions.md
Outdated
- Run `cargo fmt --all` to format code consistently | ||
- Run `cargo check --workspace` to verify compilation | ||
|
||
2. **Use the provided development scripts:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot perhaps its easier to just do cargo build/test from the individual crate when working on features for that crate alone. and scripts are anyway run in CI checks, but they can used for a final check, not something to do with each change etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the development workflow guidance to emphasize individual crate commands for focused development and position the scripts as final validation tools. Changes committed in dcdeb96.
Co-authored-by: cijothomas <[email protected]>
This PR adds repository-specific instructions for GitHub Copilot to help it provide better assistance when working with the OpenTelemetry Rust codebase.
The new
.github/copilot-instructions.md
file includes:Development Workflow
cargo build
,cargo test
,cargo clippy
commands within specific crates for efficient development./scripts/precommit.sh
,./scripts/lint.sh
,./scripts/test.sh
) as final checks before committing rather than per-change requirementsComprehensive Development Guidance
traces
,metrics
,logs
) and experimental features (otel_unstable
)The instructions follow GitHub's documentation for repository instructions and provide context-specific guidance that will help Copilot understand the unique development practices, tooling, and patterns used in this OpenTelemetry implementation.
Fixes #3117.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.