10BC0 [Copilot] Add instructions for OpenTelemetry C++ by Copilot · Pull Request #3614 · open-telemetry/opentelemetry-cpp · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Copilot
Copy link
Contributor
@Copilot Copilot AI commented Aug 28, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides GitHub Copilot coding agents with detailed instructions for working effectively in the OpenTelemetry C++ codebase, with special emphasis on maintainer mode validation to ensure warning-free code.

Key Features

Exhaustive Build Validation: All commands have been tested and validated with accurate timing measurements:

  • CMake build process (3 minutes) with proper timeout warnings
  • Test execution (24 seconds, 521 tests passing)
  • CI integration (./ci/do_ci.sh cmake.test - 5.2 minutes)
  • Code formatting (./tools/format.sh - 17 seconds)

Critical Maintainer Mode Validation: Emphasizes the importance of running maintainer builds to catch all warnings:

  • Added ./ci/do_ci.sh cmake.maintainer.sync.test as a critical validation step
  • Explains that maintainer mode enables -Wall -Werror -Wextra compiler flags
  • Treats all warnings as compilation errors for strict code quality
  • Includes timing expectations (4-6 minutes) and multiple maintainer test variants

Critical Timeout Guidance: Includes explicit "NEVER CANCEL" warnings for long-running operations with specific timeout recommendations to prevent premature build cancellation.

Complete Development Workflow: Documents both CMake and Bazel build systems, example execution, validation scenarios, and troubleshooting guidance with maintainer mode validation integrated throughout.

Repository Navigation: Provides a comprehensive guide to key directories (api/, sdk/, exporters/, examples/, ci/, tools/) and important files.

Enhanced Validation Scenarios: Includes specific steps for validating changes with maintainer mode:

# Core validation after making changes
cd build && make -j$(nproc) && ctest --output-on-failure
./examples/simple/example_simple  # Should output telemetry spans
./tools/format.sh                 # Must complete without errors
./ci/do_ci.sh cmake.maintainer.sync.test  # CRITICAL for warnings

Real-World Testing: Every command and workflow has been validated in a fresh environment to ensure the instructions work reliably for any developer acquiring a fresh clone.

The instructions follow an imperative tone ("Run this command", "Do not do this") and prioritize actionable guidance over verbose explanations, making them ideal for AI coding assistants. The maintainer mode validation ensures all contributions meet the project's strict warning standards.

Fixes #3613.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.03%. Comparing base (f813f86) to head (2b5eb31).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3614   +/-   ##
=======================================
  Coverage   90.03%   90.03%           
=======================================
  Files         220      220           
  Lines        7069     7069           
=======================================
  Hits         6364     6364           
  Misses        705      705           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: lalitb <1196320+lalitb@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for OpenTelemetry C++ Aug 28, 2025
@Copilot Copilot AI requested a review from lalitb August 28, 2025 05:39
Copilot finished work on behalf of lalitb August 28, 2025 05:39
@lalitb
Copy link
Member
lalitb commented Aug 28, 2025

@copilot - Running maintainer's build is an important step, to ensure all warnings are resolved. Pleas add that as the validation step.

Co-authored-by: lalitb <1196320+lalitb@users.noreply.github.com>
Copy link
Contributor Author
Copilot AI commented Aug 28, 2025

@copilot - Running maintainer's build is an important step, to ensure all warnings are resolved. Pleas add that as the validation step.

Added maintainer mode validation as a critical step throughout the instructions. The updates emphasize that ./ci/do_ci.sh cmake.maintainer.sync.test should be run to ensure all warnings are resolved (enables -Wall -Werror -Wextra). Added dedicated section explaining maintainer mode importance and included it in core validation workflow, CI integration, and development workflow. Commit: d9c49a6

@Copilot Copilot AI changed the title Add comprehensive GitHub Copilot instructions for OpenTelemetry C++ Add comprehensive GitHub Copilot instructions with maintainer mode validation for OpenTelemetry C++ Aug 28, 2025
Copilot finished work on behalf of lalitb August 28, 2025 18:04
@lalitb lalitb marked this pull request as ready for review August 29, 2025 04:29
@lalitb lalitb requested a review from a team as a code owner August 29, 2025 04:29
Copy link
Member
@lalitb lalitb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as first version, something we can iterate/improve in future based on the copilot behavior.

@marcalff marcalff added the pr:copilot PR generated with AI assistance (Copilot) label Aug 29, 2025
@marcalff marcalff changed the title Add comprehensive GitHub Copilot instructions with maintainer mode validation for OpenTelemetry C++ [Copilot] Add instructions for OpenTelemetry C++ Aug 29, 2025
@marcalff
Copy link
Member
marcalff commented Aug 29, 2025

Ok to merge for me, but waiting on others for comment, as this is the very first copilot pr.

@lalitb
Copy link
Member
lalitb commented Sep 2, 2025

Merging for now, comments if any to be added in subsequent PRs

@lalitb lalitb merged commit e8e19b6 into main Sep 2, 2025
66 checks passed
@lalitb lalitb deleted the copilot/fix-3613 branch September 2, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:copilot PR generated with AI assistance (Copilot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

3 participants

0