Repository navigation
feat: add console exporter - #35
Merged
Hector Hernandez (hectorhdzg) merged 5 commits intoApr 22, 2026
Merged
Hector Hernandez (hectorhdzg) merged 5 commits into
Hector Hernandez (hectorhdzg) merged 5 commits into
Conversation
Add ExportTarget enum (None, AzureMonitor, Agent365, Otlp, Console) with the same values as the .NET distro for cross-platform consistency. - Add 'exporters' option to MicrosoftOpenTelemetryOptions for explicit exporter selection via bitwise OR (e.g. ExportTarget.Console | ExportTarget.AzureMonitor) - When 'exporters' is not set, auto-detection preserves existing behavior - Console exporter is never auto-detected (must be explicitly enabled) - Wire ConsoleSpanExporter, ConsoleMetricExporter, ConsoleLogRecordExporter using SimpleSpanProcessor/SimpleLogRecordProcessor for immediate output - Gate all exporter sections (AzureMonitor, OTLP, Agent365) through ExportTarget flags - Fix ./loader subpath export paths in package.json (dist/*/loader.js -> dist/*/azureMonitor/loader.js) - Export ExportTarget and ExportTargetFlags from public API
Hector Hernandez (hectorhdzg)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
April 22, 2026 20:18
Copilot started reviewing on behalf of
Hector Hernandez (hectorhdzg)
April 22, 2026 20:19
View session
Radhika Gupta (rads-1996)
approved these changes
Apr 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in/auto-enabled console export path to the distro so traces/metrics/logs can be emitted to stdout (useful for local dev), and fixes the ./loader subpath export mapping to point at the built Azure Monitor loader artifact.
Changes:
- Adds
enableConsoleExporters?: booleantoMicrosoftOpenTelemetryOptions. - Wires up
ConsoleSpanExporter,ConsoleMetricExporter, andConsoleLogRecordExporterinuseMicrosoftOpenTelemetry()with auto-enable logic. - Fixes
package.jsonexports["./loader"]paths to match the actual build output layout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/types.ts | Adds the new enableConsoleExporters option to the public options interface. |
| src/distro/distro.ts | Registers console exporters and determines when they are enabled. |
| package.json | Updates ./loader subpath exports to dist/*/azureMonitor/loader.*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Radhika Gupta (rads-1996)
approved these changes
Apr 22, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 22, 2026
35d121c
into
microsoft:main
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds enableConsoleExporters option to MicrosoftOpenTelemetryOptions that registers ConsoleSpanExporter, ConsoleMetricExporter, and ConsoleLogRecordExporter.
Behavior:
Fix ./loader subpath exports