Skip to content

feat!: Add method for pre-configured Tracing instance #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 8, 2025

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Apr 4, 2025

This PR adds a new Tracing::pre_configured method which provides a "one-liner" to construct a Tracing instance in operators. See the following example:

use stackable_telemetry::tracing::{Tracing, TelemetryOptions, Error};

#[tokio::main]
async fn main() -> Result<(), Error> {
    let options = TelemetryOptions { .. }

    let _tracing_guard = Tracing::pre_configured("my-operator", options).init()?;
    tracing::info!("log a message");
    Ok(())
}

The TelemetryOptions will come directly from the operator CLI arguments. Support for usage via clap is provided behind the identically named feature flag in stackable-telemetry.

@Techassi Techassi self-assigned this Apr 4, 2025
@Techassi Techassi force-pushed the feat/stackable-telemetry-tracing-default branch from adc7f5d to 3d44b9e Compare April 7, 2025 09:17
@Techassi Techassi changed the title feat(stackable-telemetry): Add method for pre-configured Tracing instance feat(stackable-telemetry)!: Add method for pre-configured Tracing instance Apr 7, 2025
@Techassi Techassi changed the title feat(stackable-telemetry)!: Add method for pre-configured Tracing instance feat!: Add method for pre-configured Tracing instance Apr 7, 2025
@Techassi Techassi marked this pull request as ready for review April 7, 2025 12:22
@Techassi Techassi moved this to Development: Waiting for Review in Stackable Engineering Apr 7, 2025
@Techassi Techassi force-pushed the feat/stackable-telemetry-tracing-default branch from 8eee302 to 1e95f7e Compare April 7, 2025 13:20
@Techassi Techassi force-pushed the feat/stackable-telemetry-tracing-default branch from 24f7201 to 861ded9 Compare April 7, 2025 14:31
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

Just a couple of comments

NickLarsenNZ
NickLarsenNZ previously approved these changes Apr 8, 2025
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@Techassi Techassi added this pull request to the merge queue Apr 8, 2025
@Techassi Techassi removed this pull request from the merge queue due to a manual request Apr 8, 2025
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@Techassi Techassi enabled auto-merge April 8, 2025 11:55
@Techassi Techassi added this pull request to the merge queue Apr 8, 2025
Merged via the queue into main with commit 07d78c1 Apr 8, 2025
8 checks passed
@Techassi Techassi deleted the feat/stackable-telemetry-tracing-default branch April 8, 2025 12:02
@NickLarsenNZ NickLarsenNZ moved this from Development: In Review to Development: Done in Stackable Engineering Apr 8, 2025
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants