Skip to content

Initialize OneSettings for Microsoft distro - #243

Closed
Leighton Chen (lzchen) wants to merge 7 commits into
mainfrom
feature/onesettings-profile
Closed

Initialize OneSettings for Microsoft distro#243
Leighton Chen (lzchen) wants to merge 7 commits into
mainfrom
feature/onesettings-profile

Conversation

@lzchen

Copy link
Copy Markdown
Contributor

Summary

  • initialize the shared OneSettings configuration manager from use_microsoft_opentelemetry() with the Microsoft distro profile
  • initialize the profile before Azure Monitor exporters so component="mot" and the distro version win first-write profile matching
  • update the Azure Monitor exporter requirement to 1.0.0b56
  • add orchestration coverage and an unreleased changelog entry
  • ignore VS Code workspace files

Testing

  • python -m pytest tests\test_distro.py tests\azure_monitor\test_configure.py --quiet (104 passed in the OTM virtual environment)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Performance comparison

Threshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.

Scenario Gating Baseline (ops/s) Candidate (ops/s) Δ % Status
azure_monitor_log yes 18,747.7 18,726.6 +0.11%
azure_monitor_span yes 154,750.9 156,445.6 -1.08%
otel_log no 22,254.9 22,220.2 +0.16%
otel_span no 38,242.4 38,704.2 -1.19%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR initializes the shared OneSettings configuration manager from use_microsoft_opentelemetry() so the Microsoft distro identity (component="mot" and distro VERSION) is registered early (before Azure Monitor exporter setup), and updates the Azure Monitor exporter dependency accordingly.

Changes:

  • Initialize OneSettings configuration manager at the start of use_microsoft_opentelemetry().
  • Update azure-monitor-opentelemetry-exporter dependency to ~=1.0.0b56 (and lockfile).
  • Add orchestration tests and an unreleased changelog entry; ignore .vscode/ workspace files.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/microsoft/opentelemetry/_distro.py Adds config manager initialization ahead of exporter setup.
tests/test_distro.py Adds tests verifying initialization ordering and disable behavior.
pyproject.toml Bumps Azure Monitor exporter requirement to ~=1.0.0b56.
uv.lock Updates locked Azure Monitor exporter version and metadata.
CHANGELOG.md Adds unreleased entry for the OneSettings initialization behavior.
.gitignore Ignores .vscode/ directory.
Suppressed comments (1)

src/microsoft/opentelemetry/_distro.py:106

  • _initialize_configuration_manager() currently assumes get_configuration_manager() is always available and that initialize() cannot fail. Since this is a best-effort control-plane contribution, it’s safer to (1) no-op when get_configuration_manager is unavailable (e.g., import guarded) and (2) catch unexpected exceptions so a OneSettings failure doesn’t prevent the distro from configuring OpenTelemetry.
    """Contribute the Microsoft distro identity to the shared OneSettings profile."""
    config_manager = get_configuration_manager()
    if config_manager:
        # Profile fields are first-wins, so initialize before exporters add their fields.
        config_manager.initialize(component="mot", version=VERSION)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/microsoft/opentelemetry/_distro.py Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 07de762e-7d54-46cb-9d78-ab8ea1c82cbe
@lzchen

Copy link
Copy Markdown
Contributor Author

Closing in favor of #244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants