Skip to content

(GH-1061) Add dsc-lib-telemetry crate - #1663

Open
Mikey Lombardi (He/Him) (michaeltlombardi) wants to merge 4 commits into
PowerShell:mainfrom
michaeltlombardi:gh-1061/main/otel-init
Open

(GH-1061) Add dsc-lib-telemetry crate#1663
Mikey Lombardi (He/Him) (michaeltlombardi) wants to merge 4 commits into
PowerShell:mainfrom
michaeltlombardi:gh-1061/main/otel-init

Conversation

@michaeltlombardi

Copy link
Copy Markdown
Collaborator

PR Summary

This change:

  • Adds the dsc-lib-telemetry crate to manage tracing and open telemetry concerns for dsc and the builtin resources.
  • Encapsulates the tracing setup logic used in dsc in the new crate.
  • Re-exports the tracing crates from dsc_lib_telemetry::basic.

PR Context

This change begins the work for moving the DSC ecosystem towards using Open Telemetry for tracing, logging, and metrics.

This change adds the `dsc-lib-telemetry` crate to the project to provide
OpenTelemetry support for DSC.

This change also makes a minor update to the `Cargo.toml` file to
standardize the order of the crates for each member group. This should
ensure that the file doesn't change during a build unless required,
minimizing the re-analysis that the IDE needs to do when you build
the project.
…rate

Prior to this change, `dsc` initialized tracing directly. Other crates,
like `registry`, follow similar steps to initialize tracing.

This change extracts the tracing initialization logic into the telemetry
crate in the `basic` module. This module defines a `BasicTracingOptions`
struct that can create a default guard and initialize a subscriber.

This change also re-exports the tracing crates from within the
`basic` module to enable taking a single dependency.
Copilot AI lite review requested due to automatic review settings August 10, 2026 18:25

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

Adds a new dsc-lib-telemetry library crate intended to centralize tracing/telemetry setup for the DSC ecosystem, and updates the dsc CLI to use the new crate’s “basic” tracing subscriber initialization.

Changes:

  • Introduces lib/dsc-lib-telemetry with StderrFormat and a basic module that builds tracing_subscriber + tracing_indicatif subscribers/guards.
  • Refactors dsc/src/util.rs::enable_tracing to use dsc_lib_telemetry::basic::BasicTracingOptions instead of inlining subscriber setup.
  • Updates workspace/build metadata (workspace members, lockfile, and data.build.json).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/dsc-lib-telemetry/src/lib.rs New crate root defining StderrFormat and exporting the basic module.
lib/dsc-lib-telemetry/src/basic.rs Implements basic tracing guard/subscriber setup and re-exports tracing-related crates.
lib/dsc-lib-telemetry/Cargo.toml New crate manifest using workspace tracing dependencies.
lib/dsc-lib-telemetry/.project.data.json Registers the new crate as a Rust library project.
dsc/src/util.rs Switches enable_tracing to initialize tracing via dsc-lib-telemetry.
dsc/Cargo.toml Adds a dependency on dsc-lib-telemetry.
data.build.json Modifies build/project metadata (currently includes issues: duplicate root entry and a non-existent library path).
Cargo.toml Adds lib/dsc-lib-telemetry to workspace members/default-members/groups.
Cargo.lock Adds the new crate to the lockfile dependency graph.
Suppressed comments (2)

data.build.json:137

  • data.build.json contains two identical root project entries. This will cause the build metadata to include the same Root project twice, which can lead to duplicated copy operations or ambiguous project lookups.

This issue also appears on line 296 of the same file.

    {
      "Name": "root",
      "Kind": "Root",
      "RelativePath": ".",
      "CopyFiles": {

data.build.json:300

  • This project entry points at lib/dsc-lib-otel, but that path does not exist in the repo (and this PR is adding lib/dsc-lib-telemetry). This will break tooling that relies on data.build.json to enumerate Rust projects.
      "Name": "dsc-lib-otel",
      "Kind": "Library",
      "RelativePath": "lib/dsc-lib-otel",
      "IsRust": true
    },

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

Comment thread lib/dsc-lib-telemetry/src/basic.rs
Comment thread dsc/src/util.rs Outdated
Comment thread data.build.json Outdated
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