Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 9, 2025

This PR adds detailed GitHub Copilot instructions to help developers work effectively with the OpenTelemetry Rust codebase. The instructions are based on comprehensive testing and validation of all build, test, and development workflows.

What's included

The .github/copilot-instructions.md file provides:

Setup and Dependencies

  • Exact commands for installing required dependencies (protoc, Rust tools, cargo utilities)
  • Validated installation procedures for cargo-hack and cargo-msrv

Build and Test Commands with Measured Timings

  • Core commands with realistic timeouts: All timing data gathered from actual runs
  • "NEVER CANCEL" warnings: Explicit guidance to prevent premature build cancellation
  • Timeout recommendations: Based on measured performance plus safety margins

Example timing data:

  • cargo check --workspace: ~1m 15s (recommend 90s+ timeout)
  • ./scripts/test.sh: ~4 minutes (recommend 480s+ timeout)
  • ./scripts/lint.sh: ~6 minutes (recommend 480s+ timeout)

Validation Scenarios

  • Step-by-step workflows for different development tasks
  • Pre-commit validation procedures
  • Feature-specific testing guidance

Project Structure

  • Comprehensive overview of all 13+ workspace crates
  • Key directories and their purposes
  • Examples directory with working sample applications

Working Examples

All examples tested and validated:

cd examples/metrics-basic && cargo run     # 6 seconds
cd examples/logs-basic && cargo run        # 4 seconds  
cd examples/metrics-advanced && cargo run  # 1 second

Validation

Every command mentioned in the instructions has been tested and validated:

  • ✅ All build commands work with recommended timeouts
  • ✅ All examples run successfully and produce expected output
  • ✅ Integration tests run (noted existing intermittent failure)
  • ✅ Documentation generation works
  • ✅ MSRV verification passes

The instructions follow the requirement to "always follow the instructions and only fallback to additional search and context gathering if the information is incomplete or found to be in error."

Fixes #3159.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.6%. Comparing base (b70771a) to head (8ff3efd).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3160     +/-   ##
=======================================
- Coverage   80.6%   80.6%   -0.1%     
=======================================
  Files        126     126             
  Lines      22195   22195             
=======================================
- Hits       17898   17894      -4     
- Misses      4297    4301      +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lalitb lalitb changed the title [WIP] ✨ Set up Copilot instructions chore: [WIP] ✨ Set up Copilot instructions Sep 9, 2025
@Copilot Copilot AI changed the title chore: [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for OpenTelemetry Rust development Sep 9, 2025
@Copilot Copilot AI requested a review from lalitb September 9, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions
2 participants