autotel-mongoose

Integrate OpenTelemetry with Mongoose 8+ to automate span creation for queries and schema hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of OpenTelemetry tracing into Mongoose applications, enabling automatic capture of query details, metadata, and schema hooks for observability.

Core Features & Use Cases

  • Automatic Mongoose Instrumentation: Adds tracing capabilities to queries, model methods, and schema hooks with minimal configuration.
  • PII Redaction & Query Text Capture: Supports secure serialization of query payloads with options for redacting sensitive information.
  • Use Case: A developer wants to monitor database queries in a Node.js app using Mongoose, capturing detailed trace data for performance tuning and debugging.

Quick Start

Use the autotel-mongoose skill to instrument your Mongoose setup by importing and calling instrumentMongoose before defining schemas or models to enable comprehensive tracing.

Frequently Asked Questions about autotel-mongoose

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

FAQPage Schema
How do I add OpenTelemetry tracing to Mongoose queries in Node.js?

To add OpenTelemetry tracing to Mongoose, you can use an instrumentation tool that automatically captures query details and metadata by calling the setup function before defining your schemas or models.

When do I need to instrument Mongoose for database observability?

You need to instrument Mongoose for database observability when you want to monitor query performance, debug latency issues, or capture detailed trace data for Node.js application database operations.

Can I redact sensitive data when capturing Mongoose query payloads for tracing?

Yes, you can redact sensitive data during OpenTelemetry tracing by using secure serialization options that filter out personally identifiable information from Mongoose query payloads.

Does OpenTelemetry tracing work with Mongoose 8 schema hooks?

Yes, OpenTelemetry tracing works with Mongoose 8 schema hooks by automatically creating spans for model methods and schema hooks, providing comprehensive observability with minimal configuration.

What is the best way to capture detailed metadata for Mongoose database operations?

The best way to capture detailed metadata for Mongoose operations is using automated OpenTelemetry instrumentation that generates spans for queries and schema hooks, supporting redaction for secure observability.

Why is my Mongoose instrumentation not generating OpenTelemetry spans correctly?

Mongoose instrumentation fails to generate OpenTelemetry spans correctly if the setup function is called after defining schemas or models, because it must be initialized beforehand to intercept query execution properly.