Repository navigation
Conditional azure monitor and readme updates - #33
Merged
Hector Hernandez (hectorhdzg) merged 6 commits intoApr 22, 2026
Conversation
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 16:38
Member
Author
|
Copilot resolve the merge conflicts in this pull request |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes Azure Monitor initialization conditional (so the distro can run as “OTLP-only”), refactors instrumentation/sampler/view construction into standalone helpers, and updates the README/options docs to reflect the intended usage patterns.
Changes:
- Add
src/distro/instrumentations.tsto create instrumentations, sampler, and metric views independently of Azure Monitor handlers. - Update
useMicrosoftOpenTelemetry()to only initialize Azure Monitor components/handlers/readers whenoptions.azureMonitoris provided. - Refresh README and option default documentation (badges, usage examples, and option tables).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/types.ts | Updates option docstrings to match current defaults. |
| src/distro/instrumentations.ts | New helper module to build instrumentations, sampler, and views. |
| src/distro/distro.ts | Conditional Azure Monitor initialization + wiring to new helpers. |
| README.md | Adds badges and expands usage/config documentation (A365, Azure Monitor, OTLP-only). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Distro changes: - Azure Monitor handlers (MetricHandler, TraceHandler, LogHandler) are now only created when options.azureMonitor is provided, avoiding unnecessary exporters and processors in the pipeline for OTLP-only or A365-only users. - Extracted instrumentation, sampler, and metric view creation into src/distro/instrumentations.ts so they are always available regardless of which backends are enabled. - Global OTel providers (TracerProvider, MeterProvider, LoggerProvider) are always registered via NodeSDK.start(), ensuring all distro users get proper provider initialization. README changes: - Added Getting Started examples for OTLP-only, A365-only, and multi-backend usage. - Added early-init guidance for proper instrumentation patching. - Added full InstrumentationOptions table with all 12 instrumentations and actual defaults. - Added missing a365.baggage and a365.hosting options tables. - Added config precedence note (defaults > options > JSON > env vars). Type fixes: - Fixed enableLiveMetrics JSDoc default from false to true. - Fixed enableTraceBasedSamplingForLogs JSDoc default from true to false.
Co-authored-by: Copilot <copilot@github.com>
Hector Hernandez (hectorhdzg)
force-pushed
the
hectorhdzg/conditional-azure-monitor-and-readme
branch
from
April 22, 2026 18:23
e0b4d0a to
3a52232
Compare
…nt sampler, improve Azure Monitor detection, add OTLP-only test
Hector Hernandez (hectorhdzg)
force-pushed
the
hectorhdzg/conditional-azure-monitor-and-readme
branch
from
April 22, 2026 18:35
3a52232 to
0eafa11
Compare
Radhika Gupta (rads-1996)
approved these changes
Apr 22, 2026
Radhika Gupta (rads-1996)
approved these changes
Apr 22, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 22, 2026
9415fb5
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.
No description provided.