feat(otel): add universally-applicable OpenTelemetry standards and infrastructure playbooks - #25
Merged
Merged
Conversation
…frastructure playbooks Refactored from PR #23 (djpnicholls/feature/otel-skills) into three universally-applicable contributions per open-source framework principles. ## Contribution 1: OTel Infrastructure Playbooks (refined) - playbooks/setup/create-local-otel-stack.md — backend-agnostic note added - playbooks/setup/discover-local-otel-stack.md — cross-refs updated - playbooks/setup/use-local-otel-stack.md — cross-refs updated - Supporting scripts carry forward unchanged ## Contribution 2: .NET OpenTelemetry Standard (new) - standards/opentelemetry-dotnet.md (409 lines) - Migrated from instrument-dotnet-otel.md playbook (deleted) - 5 sections + Non-Negotiables + Decision Checklist - 3 known pitfalls: Endpoint breaking, gRPC unreachability, ActivityListener ## Contribution 3: Language-Agnostic OTel Standard (new) - standards/opentelemetry.md (565 lines) - Covers Go, Python, Java, Rust, Node.js, .NET, PHP, Ruby - OTLP protocol, backends, integration patterns, cross-language pitfalls - Canonical parent; language-specific standards extend it ## Framework Integration - core/.context/index.md: keyword routes for both new standards; old instrument-dotnet-otel entry removed - core/AGENTS.md: Technology Standards table updated - tests: updated to assert new standards deployed; assert deleted playbook and its skill wrappers are absent ## Review Full 7-speciality review passed: SRE, Principal Engineer, Architect, QA, Security, Observability Specialist, Senior Technical Writer. Co-authored-by: djpnicholls <109083091+djpnicholls@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the prior .NET-centric OpenTelemetry contribution into universally applicable, single-source-of-truth documentation: a cross-language OpenTelemetry standard plus a .NET-specific extension, while keeping the local OTel stack playbooks and updating deployment tests/index routing accordingly.
Changes:
- Added a new cross-language OpenTelemetry standard (
standards/opentelemetry.md) and a .NET-specific OpenTelemetry standard (standards/opentelemetry-dotnet.md). - Updated local OTel stack playbooks to reference the new standards and removed the old
.NET instrumentationplaybook (instrument-dotnet-otel.md). - Updated framework integration (AGENTS + context routing) and deploy tests to assert the new standards are shipped and the removed playbook/skill wrappers are absent.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test-deploy.sh | Updates deploy assertions to include new OTel standards and exclude the removed playbook/wrappers. |
| tests/test-deploy.ps1 | PowerShell equivalent deploy assertions for new standards and removed playbook/wrappers. |
| standards/opentelemetry.md | New cross-language OpenTelemetry standard (SDK patterns, OTLP, backends, pitfalls). |
| standards/opentelemetry-dotnet.md | New .NET-specific OpenTelemetry standard (packages, startup pattern, pitfalls, testing patterns). |
| playbooks/setup/create-local-otel-stack.md | Refines local stack playbook with backend-agnostic note and updated cross-references. |
| playbooks/setup/discover-local-otel-stack.md | Updates “Related” section to reference new standards instead of the removed playbook. |
| playbooks/setup/use-local-otel-stack.md | Updates references from removed playbook to the new .NET standard and adds standards links. |
| playbooks/setup/instrument-dotnet-otel.md | Removed (content migrated into standards/opentelemetry-dotnet.md). |
| core/AGENTS.md | Adds both new OTel standards to the Technology Standards table. |
| core/.context/index.md | Adds keyword routes for new standards and removes the stale route to the deleted playbook. |
Suppressed comments (1)
standards/opentelemetry-dotnet.md:84
- The resource attribute key here should match the conventions used elsewhere in the repo (
deployment.environmentin standards/observability.md and standards/opentelemetry.md). Usingenvironmentin the sample code would produce different telemetry metadata keys than other runtimes and documents.
{
["environment"] = env.EnvironmentName,
}))
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| OpenTelemetry (OTEL) is the vendor-neutral standard for observability instrumentation. | ||
| Every service must emit traces, metrics, and logs via OTEL SDKs to enable zero-cost | ||
| migration between backends (Jaeger, Grafana Tempo, Honeycomb, Datadog, AWS X-Ray, | ||
| CloudWatch) and deployment models (local, on-premise, cloud). |
| }) | ||
| provider = createTelemetryProvider(resource=resource) | ||
|
|
||
| ```text |
| dotnet add package OpenTelemetry.Instrumentation.Http | ||
| dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol | ||
|
|
||
| ```text |
| └────────────────────────────────────────────────────────────────────┘ | ||
| ``` | ||
|
|
||
| ```text |
Comment on lines
+57
to
+60
| - `service.name` — the canonical service identifier. | ||
| - `service.version` — the deployed build or release version. | ||
| - `environment` — the runtime environment such as development, staging, or production. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors the OpenTelemetry contribution from PR #23 into three universally-applicable contributions aligned with the repository's open-source framework principles.
Background
PR #23 added four playbooks tightly coupled to .NET and a specific observability stack. This PR restructures that contribution so it is useful to any project, any language, any runtime.
What's Changed
1. OTel Infrastructure Playbooks (refined)
playbooks/setup/create-local-otel-stack.md— added backend-agnostic note; updated cross-references to standardsplaybooks/setup/discover-local-otel-stack.md— updated cross-referencesplaybooks/setup/use-local-otel-stack.md— updated cross-referencesversions.envcarry forward unchanged2. .NET OpenTelemetry Standard (new)
standards/opentelemetry-dotnet.md(409 lines)Migrated from
playbooks/setup/instrument-dotnet-otel.md(deleted) into a canonical standard, following the structure ofstandards/dotnet.md:options.Endpointbreaks HTTP/protobuf signal path appendinghost.containers.internalActivityListenerflaky in integration test suites3. Language-Agnostic OpenTelemetry Standard (new)
standards/opentelemetry.md(565 lines)A cross-language canonical standard applicable to Go, Python, Java, Rust, Node.js, .NET, PHP, and Ruby:
opentelemetry-dotnet.md, futureopentelemetry-go.md, etc.) extend itFramework Integration
core/.context/index.md: keyword routes for both new standards added; staleinstrument-dotnet-otelentry removedcore/AGENTS.md: Technology Standards table updated with both new standardstests/test-deploy.sh+tests/test-deploy.ps1: updated to assert new standards deployed, assert deleted playbook and skill wrappers are absentReview
Full 7-speciality review completed on this refactoring:
All review feedback addressed (code block language tags added to 71 blocks, orphaned file deleted, index/file consistency restored).
Framework Principles
dotnet.md/react.mdprecedentopentelemetry.mdis the canonical parent for future language standardsCloses #23