Skip to content

feat(otel): add universally-applicable OpenTelemetry standards and infrastructure playbooks - #25

Merged
ldastey-dev merged 1 commit into
mainfrom
refactor/otel-contributions
Aug 2, 2026
Merged

feat(otel): add universally-applicable OpenTelemetry standards and infrastructure playbooks#25
ldastey-dev merged 1 commit into
mainfrom
refactor/otel-contributions

Conversation

@ldastey-dev

Copy link
Copy Markdown
Owner

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 standards
  • playbooks/setup/discover-local-otel-stack.md — updated cross-references
  • playbooks/setup/use-local-otel-stack.md — updated cross-references
  • Supporting scripts, Docker Compose, Podman configs, and versions.env carry forward unchanged

2. .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 of standards/dotnet.md:

  • NuGet packages, Startup.cs canonical pattern, environment variable configuration
  • Testing patterns (InMemory exporter over ActivityListener)
  • 3 documented pitfalls with root cause and fix:
    1. Explicit options.Endpoint breaks HTTP/protobuf signal path appending
    2. gRPC (port 4317) unreachable via host.containers.internal
    3. ActivityListener flaky in integration test suites
  • Non-Negotiables + Decision Checklist

3. 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:

  • OTel SDK principles, Resource configuration, Traces/Metrics/Logs patterns
  • OTLP protocol (gRPC port 4317 vs HTTP/protobuf port 4318, signal paths)
  • Backend comparison (Jaeger, Tempo, VictoriaMetrics, Honeycomb, Datadog, AWS X-Ray) — no vendor lock-in
  • Integration patterns (direct, sidecar, gateway)
  • Cross-language pitfalls (cardinality, context propagation, sampling)
  • Non-Negotiables + Decision Checklist
  • Designed as the canonical parent; language-specific standards (opentelemetry-dotnet.md, future opentelemetry-go.md, etc.) extend it

Framework Integration

  • core/.context/index.md: keyword routes for both new standards added; stale instrument-dotnet-otel entry removed
  • core/AGENTS.md: Technology Standards table updated with both new standards
  • tests/test-deploy.sh + tests/test-deploy.ps1: updated to assert new standards deployed, assert deleted playbook and skill wrappers are absent

Review

Full 7-speciality review completed on this refactoring:

Speciality Result
SRE (Infrastructure & Ops) ✅ Clear
Principal Engineer (Architecture) ✅ Clear
Architect (System Design) ✅ Clear
QA (Link Integrity & Deployment) ✅ Clear
Security Engineer (Secrets & Provenance) ✅ Clear
Observability Specialist (SDK Practices) ✅ Clear
Senior Technical Writer (Documentation) ✅ Clear

All review feedback addressed (code block language tags added to 71 blocks, orphaned file deleted, index/file consistency restored).

Framework Principles

  • Single-source-of-truth: No content duplicated across files
  • Separation of concerns: Playbooks hold operational procedures; standards hold prescriptive rules
  • Universally applicable: Nothing project-specific
  • Language-specific supported: Follows the dotnet.md / react.md precedent
  • Extensible: opentelemetry.md is the canonical parent for future language standards

Closes #23

…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>
Copilot AI review requested due to automatic review settings August 2, 2026 23:20
@ldastey-dev
ldastey-dev merged commit c1a7fde into main Aug 2, 2026
1 check passed
@ldastey-dev
ldastey-dev deleted the refactor/otel-contributions branch August 2, 2026 23:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 instrumentation playbook (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.environment in standards/observability.md and standards/opentelemetry.md). Using environment in 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.

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.

2 participants