autotel-testing

Test autotel tracing spans, attributes, and errors in Node.js tests.

7|3|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/jagreehal/autotel --skill autotel-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autotel-testing
Source: https://github.com/jagreehal/autotel/tree/main/autotel-observability/skills/autotel-testing
Command: npx skills add https://github.com/jagreehal/autotel --skill autotel-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires autotel/testing, autotel/exporters, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides tools to test and verify autotel's tracing and instrumentation, ensuring spans, attributes, and errors are correctly emitted during code execution.

Core Features & Use Cases

  • Test Utilities: Offers createTraceCollector() for collecting and asserting spans, and InMemorySpanExporter for custom span collection.
  • Assertions & Patterns: Guides on verifying span creation, attributes, errors, request logs, and parent-child relationships in unit and integration tests.
  • Use Case: Developers writing tests for autotel-instrumented functions can use this Skill to streamline assertions on tracing behavior and ensure instrumentation correctness.

Quick Start

Use createTraceCollector() in your tests to gather spans and confirm that your instrumented functions produce the expected tracing output.

Frequently Asked Questions about autotel-testing

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

FAQPage Schema
How do I test Node.js tracing instrumentation to verify spans and attributes are emitted correctly?

To test Node.js tracing instrumentation, use createTraceCollector() to gather spans and assert that your instrumented functions produce the expected tracing output, including span creation, attributes, and error handling.

How do I assert parent-child span relationships in Node.js tracing unit tests?

Assert parent-child span relationships in Node.js tracing unit tests by using createTraceCollector() to collect spans and verify the hierarchical tracing behavior and event emission during code execution.

Does the autotel testing utility work with vitest for validating instrumentation?

Yes, the autotel testing utility supports integration with test frameworks like vitest, providing utilities for asserting correct tracing behavior and instrumentation correctness in various testing scenarios.

What is the best way to collect spans in memory during tracing instrumentation tests?

The best way to collect spans in memory during tracing instrumentation tests is using the InMemorySpanExporter, which enables custom span collection and validation for your instrumented Node.js functions.

Can I verify error handling and event emission in autotel instrumented code?

Yes, you can verify error handling and event emission in autotel instrumented code by using the provided test utilities to assert correct tracing behavior and validate spans during code execution.