observability-test-patterns

Verify OpenTelemetry tenant_id propagation in Go microservice tests.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill observability-test-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-test-patterns
Source: https://github.com/PremModhaOfficial/motadata-ai-pipeline/tree/main/.claude/skills/observability-test-patterns
Command: npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill observability-test-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Observability patterns help teams verify OpenTelemetry instrumentation across services, ensuring traces, metrics, and logs carry correct context like tenant_id for SOC2 compliance.

Core Features & Use Cases

  • In-memory trace exporter setups, span matching, and NATS header propagation for end-to-end observability validation.
  • Use cases include unit tests, integration tests, and cross-service observability validation in multi-service Go microservices.

Quick Start

Run the observability test patterns to validate trace propagation and tenant_id context across a sample microservice setup.

Frequently Asked Questions about observability-test-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify tenant_id propagation in OpenTelemetry traces for SOC2 compliance?

Validate OpenTelemetry instrumentation correctness by setting up Go tests with in-memory trace exporters and span matchers to verify tenant_id presence, trace_id integrity, and context propagation across unit, integration, and end-to-end workflows.

How do I test NATS header propagation for OpenTelemetry traces in Go microservices?

Test NATS header propagation by applying observability test patterns that validate OpenTelemetry context propagation across Go microservices. This uses NATS header propagation utilities to ensure trace_id integrity and tenant_id context are maintained across multi-service workflows.

What is the best way to validate OpenTelemetry logs and metrics correlation in multi-service workflows?

The best way to validate OpenTelemetry log correlation is by running end-to-end observability validation across in-memory exporters and NATS header propagation. This ensures traces, metrics, and logs carry correct tenant_id context for SOC2 compliance across multi-service Go workflows.

Do I need in-memory exporters to test OpenTelemetry instrumentation in Go?

Yes, you need a Go testing setup with in-memory exporters and span matchers to validate OpenTelemetry instrumentation correctness. This setup verifies tenant_id presence, trace_id integrity, and context propagation across unit tests and integration tests.

Can I use observability test patterns for both unit tests and integration tests in Go microservices?

Yes, observability test patterns apply to unit tests, integration tests, and end-to-end observability validation across Go microservices. They verify OpenTelemetry instrumentation correctness, ensuring tenant_id propagation in traces, metrics, and logs for multi-service workflows.