Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 4.54 KB

File metadata and controls

70 lines (51 loc) · 4.54 KB

GitHub Copilot SDK — Tutorial Subcommands (Go)

Go subcommands that demonstrate the GitHub Copilot SDK for Go.

Each subcommand corresponds 1:1 to a Python tutorial script under src/python/scripts/tutorials/, so you can compare the same recipe across both languages.

Documentation

Setup instructions, the subcommand reference, and step-by-step tutorials are published on the documentation site. The Markdown sources live under docs/copilot_sdk_tutorial/go/:

Quick start

cd src/go

# Build the CLI
make build

# Show the available tutorial subcommands
./dist/template-github-copilot-go tutorial --help

# Run the chat-bot subcommand
./dist/template-github-copilot-go tutorial chat-bot --prompt "What is GitHub Copilot?"

Subcommands

Subcommand Python script Status Docs
tutorial chat-bot 01_chat_bot.py Available Tutorial 1: CLI Chatbot
tutorial issue-triage 02_issue_triage.py Available Tutorial 2: Issue Triage Bot
tutorial streaming-review 03_streaming_review.py Available Tutorial 3: Streaming Review
tutorial skills-docgen 04_skills_docgen.py Available Tutorial 4: Skills Doc Generation
tutorial audit-hooks 05_audit_hooks.py Available Tutorial 5: Audit Log
tutorial byok-azure-openai 06_byok_azure_openai.py Available Tutorial 6: BYOK Azure OpenAI

Observability (OpenTelemetry)

Every subcommand can export OpenTelemetry traces. Telemetry is off by default; enable it with the tutorial persistent flags or the equivalent environment variables wired through newClientOptions() in telemetry.go:

# Start the collector + Grafana LGTM stack (from the repository root)
docker compose -f docker/compose.yaml up -d

./dist/template-github-copilot-go tutorial chat-bot \
  --otel-endpoint http://localhost:4318 \
  --otel-bsp-schedule-delay 500 \
  --prompt "Hello!"

# View traces in Grafana → Explore → Tempo
open http://localhost:3000   # admin / admin

Equivalent environment variables: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT, and OTEL_BSP_SCHEDULE_DELAY.

See Observability with OpenTelemetry and docker/README.md for details.