$npx -y skills add DNYoussef/context-cascade --skill opentelemetry-observability/*============================================================================*/ /* OPENTELEMETRY-OBSERVABILITY SKILL :: VERILINGUA x VERIX EDITION */ /*============================================================================*/
| 1 | /*============================================================================*/ |
| 2 | /* OPENTELEMETRY-OBSERVABILITY SKILL :: VERILINGUA x VERIX EDITION */ |
| 3 | /*============================================================================*/ |
| 4 | |
| 5 | --- |
| 6 | name: opentelemetry-observability |
| 7 | version: 1.0.0 |
| 8 | description: | |
| 9 | [assert|neutral] OpenTelemetry specialist for distributed tracing, metrics collection, log correlation, auto-instrumentation, custom spans, trace context propagation, and sampling strategies. Use when implementing obs [ground:given] [conf:0.95] [state:confirmed] |
| 10 | category: Observability |
| 11 | tags: |
| 12 | - general |
| 13 | author: system |
| 14 | cognitive_frame: |
| 15 | primary: aspectual |
| 16 | goal_analysis: |
| 17 | first_order: "Execute opentelemetry-observability workflow" |
| 18 | second_order: "Ensure quality and consistency" |
| 19 | third_order: "Enable systematic Observability processes" |
| 20 | --- |
| 21 | |
| 22 | /*----------------------------------------------------------------------------*/ |
| 23 | /* S0 META-IDENTITY */ |
| 24 | /*----------------------------------------------------------------------------*/ |
| 25 | |
| 26 | [define|neutral] SKILL := { |
| 27 | name: "opentelemetry-observability", |
| 28 | category: "Observability", |
| 29 | version: "1.0.0", |
| 30 | layer: L1 |
| 31 | } [ground:given] [conf:1.0] [state:confirmed] |
| 32 | |
| 33 | /*----------------------------------------------------------------------------*/ |
| 34 | /* S1 COGNITIVE FRAME */ |
| 35 | /*----------------------------------------------------------------------------*/ |
| 36 | |
| 37 | [define|neutral] COGNITIVE_FRAME := { |
| 38 | frame: "Aspectual", |
| 39 | source: "Russian", |
| 40 | force: "Complete or ongoing?" |
| 41 | } [ground:cognitive-science] [conf:0.92] [state:confirmed] |
| 42 | |
| 43 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 44 | Kaynak dogrulama modu etkin. |
| 45 | |
| 46 | /*----------------------------------------------------------------------------*/ |
| 47 | /* S2 TRIGGER CONDITIONS */ |
| 48 | /*----------------------------------------------------------------------------*/ |
| 49 | |
| 50 | [define|neutral] TRIGGER_POSITIVE := { |
| 51 | keywords: ["opentelemetry-observability", "Observability", "workflow"], |
| 52 | context: "user needs opentelemetry-observability capability" |
| 53 | } [ground:given] [conf:1.0] [state:confirmed] |
| 54 | |
| 55 | /*----------------------------------------------------------------------------*/ |
| 56 | /* S3 CORE CONTENT */ |
| 57 | /*----------------------------------------------------------------------------*/ |
| 58 | |
| 59 | # OpenTelemetry Observability Specialist |
| 60 | |
| 61 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 62 | Kaynak dogrulama modu etkin. |
| 63 | |
| 64 | |
| 65 | |
| 66 | Expert distributed tracing, metrics, and logging with OpenTelemetry for production observability. |
| 67 | |
| 68 | ## Purpose |
| 69 | |
| 70 | Comprehensive OpenTelemetry expertise including auto-instrumentation, custom spans, metrics collection, log correlation, trace context propagation, and sampling. Ensures applications are fully observable with actionable telemetry data. |
| 71 | |
| 72 | ## When to Use |
| 73 | |
| 74 | - Implementing distributed tracing in microservices |
| 75 | - Monitoring application performance (APM) |
| 76 | - Debugging production issues across services |
| 77 | - Setting up metrics collection and dashboards |
| 78 | - Correlating logs with traces |
| 79 | - Optimizing sampling strategies for cost/performance |
| 80 | - Migrating from proprietary APM to OpenTelemetry |
| 81 | |
| 82 | ## Prerequisites |
| 83 | |
| 84 | **Required**: Understanding of distributed systems, HTTP, basic observability concepts |
| 85 | |
| 86 | **Agents**: `cicd-engineer`, `perf-analyzer`, `backend-dev`, `system-architect` |
| 87 | |
| 88 | ## Core Workflows |
| 89 | |
| 90 | ### Workflow 1: Node.js Auto-Instrumentation |
| 91 | |
| 92 | **Step 1: Install OpenTelemetry Packages** |
| 93 | |
| 94 | ```bash |
| 95 | npm install @opentelemetry/sdk-node \ |
| 96 | @opentelemetry/auto-instrumentations-node \ |
| 97 | @opentelemetry/exporter-trace-otlp-http \ |
| 98 | @opentelemetry/exporter-metrics-otlp-http |
| 99 | ``` |
| 100 | |
| 101 | **Step 2: Initialize OpenTelemetry** |
| 102 | |
| 103 | ```javascript |
| 104 | // instrumentation.js |
| 105 | const { NodeSDK } = require('@opentelemetry/sdk-node'); |
| 106 | const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); |
| 107 | const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); |
| 108 | const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-http'); |
| 109 | const { Resource } = require('@opentelemetry/resources'); |
| 110 | const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); |
| 111 | |
| 112 | const sdk = new NodeSDK({ |
| 113 | resource: new Resource({ |
| 114 | [SemanticResourceAttributes.SERVICE_NAME]: 'my-service', |
| 115 | [SemanticResourceAttributes.SERVICE_VERSION]: '1.0.0', |
| 116 | [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: 'production', |
| 117 | }), |
| 118 | traceExporter: new OTLPTraceExporter({ |
| 119 | url: 'http://localhost:4318/v1/traces', |
| 120 | }), |
| 121 | metricReader: new PeriodicExportingMetricReader({ |
| 122 | exporter: new OTLPMetricExporter({ |
| 123 | url: 'http://localhost:4318/v1/metrics', |
| 124 | }), |
| 125 | exportIntervalMillis: 60000, |
| 126 | }), |
| 127 | instrumentations: [ |
| 128 | getNodeAutoInstrumentations({ |
| 129 | '@opentelemetry/instrumentation-http': { enabled: true }, |
| 130 | '@opentel |