[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AW65NZ8DYKFEY035ACX95":3,"skill-same:01M69AW65NZ8DYKFEY035ACX95":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M69AW65NZ8DYKFEY035ACX95","azure-monitor-opentelemetry-ts",null,"Instrument applications with Azure Monitor and OpenTelemetry for JavaScript (@azure\u002Fmonitor-opentelemetry). Use when adding distributed tracing, metrics, and logs to Node.js applications with Application Insights.","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3204,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-monitor-opentelemetry-ts\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,9],"azure","azure monitor opentelemetry ts","monitor","azure monitor","OpenTelemetry","when","javascript","for","insights","with","instrument","use","node","applications","logs","tracing","metrics","distributed tracing","distributed","2026-11-10 10:12:30",false,"---\nname: azure-monitor-opentelemetry-ts\ndescription: Instrument applications with Azure Monitor and OpenTelemetry for JavaScript (@azure\u002Fmonitor-opentelemetry). Use when adding distributed tracing, metrics, and logs to Node.js applications with Application Insights.\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: '@azure\u002Fmonitor-opentelemetry'\n---\n\n# Azure Monitor OpenTelemetry SDK for TypeScript\n\nAuto-instrument Node.js applications with distributed tracing, metrics, and logs.\n\n## Installation\n\n```bash\n# Distro (recommended - auto-instrumentation)\nnpm install @azure\u002Fmonitor-opentelemetry\n\n# Low-level exporters (custom OpenTelemetry setup)\nnpm install @azure\u002Fmonitor-opentelemetry-exporter\n\n# Custom logs ingestion\nnpm install @azure\u002Fmonitor-ingestion\n```\n\n## Environment Variables\n\n```bash\nAPPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=...;IngestionEndpoint=...\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Quick Start (Auto-Instrumentation)\n\n**IMPORTANT:** Call `useAzureMonitor()` BEFORE importing other modules.\n\n```typescript\nimport { useAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nuseAzureMonitor({\n  azureMonitorExporterOptions: {\n    connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n  }\n});\n\n\u002F\u002F Now import your application\nimport express from \"express\";\nconst app = express();\n```\n\n## ESM Support (Node.js 18.19+)\n\n```bash\nnode --import @azure\u002Fmonitor-opentelemetry\u002Floader .\u002Fdist\u002Findex.js\n```\n\n**package.json:**\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --import @azure\u002Fmonitor-opentelemetry\u002Floader .\u002Fdist\u002Findex.js\"\n  }\n}\n```\n\n## Full Configuration\n\n```typescript\nimport { useAzureMonitor, AzureMonitorOpenTelemetryOptions } from \"@azure\u002Fmonitor-opentelemetry\";\nimport { resourceFromAttributes } from \"@opentelemetry\u002Fresources\";\n\nconst options: AzureMonitorOpenTelemetryOptions = {\n  azureMonitorExporterOptions: {\n    connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,\n    storageDirectory: \"\u002Fpath\u002Fto\u002Foffline\u002Fstorage\",\n    disableOfflineStorage: false\n  },\n  \n  \u002F\u002F Sampling\n  samplingRatio: 1.0,  \u002F\u002F 0-1, percentage of traces\n  \n  \u002F\u002F Features\n  enableLiveMetrics: true,\n  enableStandardMetrics: true,\n  enablePerformanceCounters: true,\n  \n  \u002F\u002F Instrumentation libraries\n  instrumentationOptions: {\n    azureSdk: { enabled: true },\n    http: { enabled: true },\n    mongoDb: { enabled: true },\n    mySql: { enabled: true },\n    postgreSql: { enabled: true },\n    redis: { enabled: true },\n    bunyan: { enabled: false },\n    winston: { enabled: false }\n  },\n  \n  \u002F\u002F Custom resource\n  resource: resourceFromAttributes({ \"service.name\": \"my-service\" })\n};\n\nuseAzureMonitor(options);\n```\n\n## Custom Traces\n\n```typescript\nimport { trace } from \"@opentelemetry\u002Fapi\";\n\nconst tracer = trace.getTracer(\"my-tracer\");\n\nconst span = tracer.startSpan(\"doWork\");\ntry {\n  span.setAttribute(\"component\", \"worker\");\n  span.setAttribute(\"operation.id\", \"42\");\n  span.addEvent(\"processing started\");\n  \n  \u002F\u002F Your work here\n  \n} catch (error) {\n  span.recordException(error as Error);\n  span.setStatus({ code: 2, message: (error as Error).message });\n} finally {\n  span.end();\n}\n```\n\n## Custom Metrics\n\n```typescript\nimport { metrics } from \"@opentelemetry\u002Fapi\";\n\nconst meter = metrics.getMeter(\"my-meter\");\n\n\u002F\u002F Counter\nconst counter = meter.createCounter(\"requests_total\");\ncounter.add(1, { route: \"\u002Fapi\u002Fusers\", method: \"GET\" });\n\n\u002F\u002F Histogram\nconst histogram = meter.createHistogram(\"request_duration_ms\");\nhistogram.record(150, { route: \"\u002Fapi\u002Fusers\" });\n\n\u002F\u002F Observable Gauge\nconst gauge = meter.createObservableGauge(\"active_connections\");\ngauge.addCallback((result) => {\n  result.observe(getActiveConnections(), { pool: \"main\" });\n});\n```\n\n## Manual Exporter Setup\n\n### Trace Exporter\n\n```typescript\nimport { AzureMonitorTraceExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { NodeTracerProvider, BatchSpanProcessor } from \"@opentelemetry\u002Fsdk-trace-node\";\n\nconst exporter = new AzureMonitorTraceExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst provider = new NodeTracerProvider({\n  spanProcessors: [new BatchSpanProcessor(exporter)]\n});\n\nprovider.register();\n```\n\n### Metric Exporter\n\n```typescript\nimport { AzureMonitorMetricExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { PeriodicExportingMetricReader, MeterProvider } from \"@opentelemetry\u002Fsdk-metrics\";\nimport { metrics } from \"@opentelemetry\u002Fapi\";\n\nconst exporter = new AzureMonitorMetricExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst meterProvider = new MeterProvider({\n  readers: [new PeriodicExportingMetricReader({ exporter })]\n});\n\nmetrics.setGlobalMeterProvider(meterProvider);\n```\n\n### Log Exporter\n\n```typescript\nimport { AzureMonitorLogExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { BatchLogRecordProcessor, LoggerProvider } from \"@opentelemetry\u002Fsdk-logs\";\nimport { logs } from \"@opentelemetry\u002Fapi-logs\";\n\nconst exporter = new AzureMonitorLogExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst loggerProvider = new LoggerProvider();\nloggerProvider.addLogRecordProcessor(new BatchLogRecordProcessor(exporter));\n\nlogs.setGlobalLoggerProvider(loggerProvider);\n```\n\n## Custom Logs Ingestion\n\n```typescript\nimport { DefaultAzureCredential, ManagedIdentityCredential } from \"@azure\u002Fidentity\";\nimport { LogsIngestionClient, isAggregateLogsUploadError } from \"@azure\u002Fmonitor-ingestion\";\n\nconst endpoint = \"https:\u002F\u002F\u003Cdce>.ingest.monitor.azure.com\";\nconst ruleId = \"\u003Cdata-collection-rule-id>\";\nconst streamName = \"Custom-MyTable_CL\";\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nconst credential = new DefaultAzureCredential({requiredEnvVars: [\"AZURE_TOKEN_CREDENTIALS\"]});\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjavascript\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-node-latest#credential-classes\n\u002F\u002F const credential = new ManagedIdentityCredential();\n\nconst client = new LogsIngestionClient(endpoint, credential);\n\nconst logs = [\n  {\n    Time: new Date().toISOString(),\n    Computer: \"Server1\",\n    Message: \"Application started\",\n    Level: \"Information\"\n  }\n];\n\ntry {\n  await client.upload(ruleId, streamName, logs);\n} catch (error) {\n  if (isAggregateLogsUploadError(error)) {\n    for (const uploadError of error.errors) {\n      console.error(\"Failed logs:\", uploadError.failedLogs);\n    }\n  }\n}\n```\n\n## Custom Span Processor\n\n```typescript\nimport { SpanProcessor, ReadableSpan } from \"@opentelemetry\u002Fsdk-trace-base\";\nimport { Span, Context, SpanKind, TraceFlags } from \"@opentelemetry\u002Fapi\";\nimport { useAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nclass FilteringSpanProcessor implements SpanProcessor {\n  forceFlush(): Promise\u003Cvoid> { return Promise.resolve(); }\n  shutdown(): Promise\u003Cvoid> { return Promise.resolve(); }\n  onStart(span: Span, context: Context): void {}\n  \n  onEnd(span: ReadableSpan): void {\n    \u002F\u002F Add custom attributes\n    span.attributes[\"CustomDimension\"] = \"value\";\n    \n    \u002F\u002F Filter out internal spans\n    if (span.kind === SpanKind.INTERNAL) {\n      span.spanContext().traceFlags = TraceFlags.NONE;\n    }\n  }\n}\n\nuseAzureMonitor({\n  spanProcessors: [new FilteringSpanProcessor()]\n});\n```\n\n## Sampling\n\n```typescript\nimport { ApplicationInsightsSampler } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { NodeTracerProvider } from \"@opentelemetry\u002Fsdk-trace-node\";\n\n\u002F\u002F Sample 75% of traces\nconst sampler = new ApplicationInsightsSampler(0.75);\n\nconst provider = new NodeTracerProvider({ sampler });\n```\n\n## Shutdown\n\n```typescript\nimport { useAzureMonitor, shutdownAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nuseAzureMonitor();\n\n\u002F\u002F On application shutdown\nprocess.on(\"SIGTERM\", async () => {\n  await shutdownAzureMonitor();\n  process.exit(0);\n});\n```\n\n## Key Types\n\n```typescript\nimport {\n  useAzureMonitor,\n  shutdownAzureMonitor,\n  AzureMonitorOpenTelemetryOptions,\n  InstrumentationOptions\n} from \"@azure\u002Fmonitor-opentelemetry\";\n\nimport {\n  AzureMonitorTraceExporter,\n  AzureMonitorMetricExporter,\n  AzureMonitorLogExporter,\n  ApplicationInsightsSampler,\n  AzureMonitorExporterOptions\n} from \"@azure\u002Fmonitor-opentelemetry-exporter\";\n\nimport {\n  LogsIngestionClient,\n  isAggregateLogsUploadError\n} from \"@azure\u002Fmonitor-ingestion\";\n```\n\n## Best Practices\n\n1. **Call useAzureMonitor() first** - Before importing other modules\n2. **Use ESM loader for ESM projects** - `--import @azure\u002Fmonitor-opentelemetry\u002Floader`\n3. **Enable offline storage** - For reliable telemetry in disconnected scenarios\n4. **Set sampling ratio** - For high-traffic applications\n5. **Add custom dimensions** - Use span processors for enrichment\n6. **Graceful shutdown** - Call `shutdownAzureMonitor()` to flush telemetry\n","# Azure Monitor OpenTelemetry SDK for TypeScript\n\nAuto-instrument Node.js applications with distributed tracing, metrics, and logs.\n\n## Installation\n\n```bash\n# Distro (recommended - auto-instrumentation)\nnpm install @azure\u002Fmonitor-opentelemetry\n\n# Low-level exporters (custom OpenTelemetry setup)\nnpm install @azure\u002Fmonitor-opentelemetry-exporter\n\n# Custom logs ingestion\nnpm install @azure\u002Fmonitor-ingestion\n```\n\n## Environment Variables\n\n```bash\nAPPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=...;IngestionEndpoint=...\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Quick Start (Auto-Instrumentation)\n\n**IMPORTANT:** Call `useAzureMonitor()` BEFORE importing other modules.\n\n```typescript\nimport { useAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nuseAzureMonitor({\n  azureMonitorExporterOptions: {\n    connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n  }\n});\n\n\u002F\u002F Now import your application\nimport express from \"express\";\nconst app = express();\n```\n\n## ESM Support (Node.js 18.19+)\n\n```bash\nnode --import @azure\u002Fmonitor-opentelemetry\u002Floader .\u002Fdist\u002Findex.js\n```\n\n**package.json:**\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --import @azure\u002Fmonitor-opentelemetry\u002Floader .\u002Fdist\u002Findex.js\"\n  }\n}\n```\n\n## Full Configuration\n\n```typescript\nimport { useAzureMonitor, AzureMonitorOpenTelemetryOptions } from \"@azure\u002Fmonitor-opentelemetry\";\nimport { resourceFromAttributes } from \"@opentelemetry\u002Fresources\";\n\nconst options: AzureMonitorOpenTelemetryOptions = {\n  azureMonitorExporterOptions: {\n    connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,\n    storageDirectory: \"\u002Fpath\u002Fto\u002Foffline\u002Fstorage\",\n    disableOfflineStorage: false\n  },\n  \n  \u002F\u002F Sampling\n  samplingRatio: 1.0,  \u002F\u002F 0-1, percentage of traces\n  \n  \u002F\u002F Features\n  enableLiveMetrics: true,\n  enableStandardMetrics: true,\n  enablePerformanceCounters: true,\n  \n  \u002F\u002F Instrumentation libraries\n  instrumentationOptions: {\n    azureSdk: { enabled: true },\n    http: { enabled: true },\n    mongoDb: { enabled: true },\n    mySql: { enabled: true },\n    postgreSql: { enabled: true },\n    redis: { enabled: true },\n    bunyan: { enabled: false },\n    winston: { enabled: false }\n  },\n  \n  \u002F\u002F Custom resource\n  resource: resourceFromAttributes({ \"service.name\": \"my-service\" })\n};\n\nuseAzureMonitor(options);\n```\n\n## Custom Traces\n\n```typescript\nimport { trace } from \"@opentelemetry\u002Fapi\";\n\nconst tracer = trace.getTracer(\"my-tracer\");\n\nconst span = tracer.startSpan(\"doWork\");\ntry {\n  span.setAttribute(\"component\", \"worker\");\n  span.setAttribute(\"operation.id\", \"42\");\n  span.addEvent(\"processing started\");\n  \n  \u002F\u002F Your work here\n  \n} catch (error) {\n  span.recordException(error as Error);\n  span.setStatus({ code: 2, message: (error as Error).message });\n} finally {\n  span.end();\n}\n```\n\n## Custom Metrics\n\n```typescript\nimport { metrics } from \"@opentelemetry\u002Fapi\";\n\nconst meter = metrics.getMeter(\"my-meter\");\n\n\u002F\u002F Counter\nconst counter = meter.createCounter(\"requests_total\");\ncounter.add(1, { route: \"\u002Fapi\u002Fusers\", method: \"GET\" });\n\n\u002F\u002F Histogram\nconst histogram = meter.createHistogram(\"request_duration_ms\");\nhistogram.record(150, { route: \"\u002Fapi\u002Fusers\" });\n\n\u002F\u002F Observable Gauge\nconst gauge = meter.createObservableGauge(\"active_connections\");\ngauge.addCallback((result) => {\n  result.observe(getActiveConnections(), { pool: \"main\" });\n});\n```\n\n## Manual Exporter Setup\n\n### Trace Exporter\n\n```typescript\nimport { AzureMonitorTraceExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { NodeTracerProvider, BatchSpanProcessor } from \"@opentelemetry\u002Fsdk-trace-node\";\n\nconst exporter = new AzureMonitorTraceExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst provider = new NodeTracerProvider({\n  spanProcessors: [new BatchSpanProcessor(exporter)]\n});\n\nprovider.register();\n```\n\n### Metric Exporter\n\n```typescript\nimport { AzureMonitorMetricExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { PeriodicExportingMetricReader, MeterProvider } from \"@opentelemetry\u002Fsdk-metrics\";\nimport { metrics } from \"@opentelemetry\u002Fapi\";\n\nconst exporter = new AzureMonitorMetricExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst meterProvider = new MeterProvider({\n  readers: [new PeriodicExportingMetricReader({ exporter })]\n});\n\nmetrics.setGlobalMeterProvider(meterProvider);\n```\n\n### Log Exporter\n\n```typescript\nimport { AzureMonitorLogExporter } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { BatchLogRecordProcessor, LoggerProvider } from \"@opentelemetry\u002Fsdk-logs\";\nimport { logs } from \"@opentelemetry\u002Fapi-logs\";\n\nconst exporter = new AzureMonitorLogExporter({\n  connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING\n});\n\nconst loggerProvider = new LoggerProvider();\nloggerProvider.addLogRecordProcessor(new BatchLogRecordProcessor(exporter));\n\nlogs.setGlobalLoggerProvider(loggerProvider);\n```\n\n## Custom Logs Ingestion\n\n```typescript\nimport { DefaultAzureCredential, ManagedIdentityCredential } from \"@azure\u002Fidentity\";\nimport { LogsIngestionClient, isAggregateLogsUploadError } from \"@azure\u002Fmonitor-ingestion\";\n\nconst endpoint = \"https:\u002F\u002F\u003Cdce>.ingest.monitor.azure.com\";\nconst ruleId = \"\u003Cdata-collection-rule-id>\";\nconst streamName = \"Custom-MyTable_CL\";\n\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nconst credential = new DefaultAzureCredential({requiredEnvVars: [\"AZURE_TOKEN_CREDENTIALS\"]});\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjavascript\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-node-latest#credential-classes\n\u002F\u002F const credential = new ManagedIdentityCredential();\n\nconst client = new LogsIngestionClient(endpoint, credential);\n\nconst logs = [\n  {\n    Time: new Date().toISOString(),\n    Computer: \"Server1\",\n    Message: \"Application started\",\n    Level: \"Information\"\n  }\n];\n\ntry {\n  await client.upload(ruleId, streamName, logs);\n} catch (error) {\n  if (isAggregateLogsUploadError(error)) {\n    for (const uploadError of error.errors) {\n      console.error(\"Failed logs:\", uploadError.failedLogs);\n    }\n  }\n}\n```\n\n## Custom Span Processor\n\n```typescript\nimport { SpanProcessor, ReadableSpan } from \"@opentelemetry\u002Fsdk-trace-base\";\nimport { Span, Context, SpanKind, TraceFlags } from \"@opentelemetry\u002Fapi\";\nimport { useAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nclass FilteringSpanProcessor implements SpanProcessor {\n  forceFlush(): Promise\u003Cvoid> { return Promise.resolve(); }\n  shutdown(): Promise\u003Cvoid> { return Promise.resolve(); }\n  onStart(span: Span, context: Context): void {}\n  \n  onEnd(span: ReadableSpan): void {\n    \u002F\u002F Add custom attributes\n    span.attributes[\"CustomDimension\"] = \"value\";\n    \n    \u002F\u002F Filter out internal spans\n    if (span.kind === SpanKind.INTERNAL) {\n      span.spanContext().traceFlags = TraceFlags.NONE;\n    }\n  }\n}\n\nuseAzureMonitor({\n  spanProcessors: [new FilteringSpanProcessor()]\n});\n```\n\n## Sampling\n\n```typescript\nimport { ApplicationInsightsSampler } from \"@azure\u002Fmonitor-opentelemetry-exporter\";\nimport { NodeTracerProvider } from \"@opentelemetry\u002Fsdk-trace-node\";\n\n\u002F\u002F Sample 75% of traces\nconst sampler = new ApplicationInsightsSampler(0.75);\n\nconst provider = new NodeTracerProvider({ sampler });\n```\n\n## Shutdown\n\n```typescript\nimport { useAzureMonitor, shutdownAzureMonitor } from \"@azure\u002Fmonitor-opentelemetry\";\n\nuseAzureMonitor();\n\n\u002F\u002F On application shutdown\nprocess.on(\"SIGTERM\", async () => {\n  await shutdownAzureMonitor();\n  process.exit(0);\n});\n```\n\n## Key Types\n\n```typescript\nimport {\n  useAzureMonitor,\n  shutdownAzureMonitor,\n  AzureMonitorOpenTelemetryOptions,\n  InstrumentationOptions\n} from \"@azure\u002Fmonitor-opentelemetry\";\n\nimport {\n  AzureMonitorTraceExporter,\n  AzureMonitorMetricExporter,\n  AzureMonitorLogExporter,\n  ApplicationInsightsSampler,\n  AzureMonitorExporterOptions\n} from \"@azure\u002Fmonitor-opentelemetry-exporter\";\n\nimport {\n  LogsIngestionClient,\n  isAggregateLogsUploadError\n} from \"@azure\u002Fmonitor-ingestion\";\n```\n\n## Best Practices\n\n1. **Call useAzureMonitor() first** - Before importing other modules\n2. **Use ESM loader for ESM projects** - `--import @azure\u002Fmonitor-opentelemetry\u002Floader`\n3. **Enable offline storage** - For reliable telemetry in disconnected scenarios\n4. **Set sampling ratio** - For high-traffic applications\n5. **Add custom dimensions** - Use span processors for enrichment\n6. **Graceful shutdown** - Call `shutdownAzureMonitor()` to flush telemetry\n",{"name":5,"license":15,"metadata":43,"description":7},{"author":12,"package":44,"version":45},"@azure\u002Fmonitor-opentelemetry","1.0.0","main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-monitor-opentelemetry-ts",368,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 06:48:25",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add microsoft\u002Fskills --skill azure-monitor-opentelemetry-ts",{"tool":62,"command":63},"bunx","bunx skills add microsoft\u002Fskills --skill azure-monitor-opentelemetry-ts",{"tool":65,"command":66},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill azure-monitor-opentelemetry-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-typescript\u002Fskills\u002Fazure-monitor-opentelemetry-ts\u002FSKILL.md",true,[],[71,96,134,161,181,219],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":82,"publishedAt":38},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[77],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[83,84,85,9,86,87,88,19,89,90,91,30,92,28,93,26,94,24,95],"skill creator","creator","coding agents","foundry","microsoft foundry","ai coding agents","services","coding","guide","ai coding","sdks","Existing","new",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":112,"publishedAt":38},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[102,105,108,111],{"categoryNo":103,"categoryName":104,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":106,"categoryName":107,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":109,"categoryName":110,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},[113,114,115,116,117,118,119,19,120,121,122,123,124,125,126,127,128,129,130,131,132,24,133],"podcast generation","podcast","generation","frontend","python","react","realtime","azure openai","generate","streaming","api","Audio","stack","text","model","fastapi","creation","python fastapi","narrative","features","fastapi backend",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":141,"publishedAt":38},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[140],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},[142,9,143,144,145,146,147,148,149,150,151,19,152,153,154,30,155,59,156,157,158,159,160,26],"docs","microsoft docs","MCP","writing","cli","mcp server","windows","power platform","official","documentation","learn","best practices","question","power","back","technology","platform","learn mcp","concept",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":168,"publishedAt":38},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[167],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},[144,169,170,171,117,172,173,174,9,175,176,127,31,177,91,30,178,179,180,28,26,24],"mcp builder","builder","typescript","llms","sdk","model context protocol","fastmcp","Tools","context","integrate","mcp sdk","building mcp servers",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":199,"publishedAt":38},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql","KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[187,190,191,196],{"categoryNo":188,"categoryName":189,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},{"categoryNo":192,"categoryName":193,"taxonomyType":194,"taxonomyTypeDesc":195},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":197,"categoryName":198,"taxonomyType":194,"taxonomyTypeDesc":195},"01JBSEEDCAT000000000000036","内容创作者",[183,145,200,201,202,19,203,204,205,206,207,208,209,210,211,212,213,214,215,26,216,217,218],"summarize","memory","analytics","vector","time series","tool","discipline","log","geo","exploration","pipe","time","project","regex","join","datetime","section","anomaly","parse",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":225,"publishedAt":38},"01M69B44HJQ7897EZ7NE7DWQX3","github-issue-creator","Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images\u002FGIFs for visual evidence.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgithub-issue-creator\u002FSKILL.md",[],[226,227,228,229,84,230,231,232,33,233,234,235,30,236,237,238,239,240,241,26,24],"github","github issue creator","github issue","issue","issue creator","screenshots","notes","error messages","messages","convert","evidence","reports","images","info","visual","error"]