Skip to content

Commit 8c896b0

Browse files
Disable otel (#3043)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Disables OTEL integration for the legacy logging format and marks session/machine IDs unused. > > - **Logger (`apps/framework-cli/src/cli/logger.rs`)**: > - **Legacy format**: > - Remove OTEL layer wiring even when `settings.export_to` is set (no `otel_layer` used). > - Mark `session_id` and `machine_id` parameters as unused (`_session_id`, `_machine_id`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c39bd4d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: George Anderson <george.anderson@fiveonefour.com>
1 parent e2fc2b4 commit 8c896b0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

apps/framework-cli/src/cli/logger.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,17 +594,15 @@ fn setup_modern_format(
594594

595595
fn setup_legacy_format(
596596
settings: &LoggerSettings,
597-
session_id: &str,
598-
machine_id: &str,
597+
_session_id: &str,
598+
_machine_id: &str,
599599
custom_fields: CustomFields,
600600
) -> Result<(), LoggerError> {
601601
let env_filter = EnvFilter::try_from_default_env()
602602
.unwrap_or_else(|_| EnvFilter::new(settings.level.to_tracing_level().to_string()));
603603

604604
// Setup with or without OTEL based on configuration
605-
if let Some(endpoint) = &settings.export_to {
606-
let otel_layer = create_otel_layer(endpoint, session_id, machine_id)?;
607-
605+
if let Some(_endpoint) = &settings.export_to {
608606
if settings.stdout {
609607
let legacy_layer = LegacyFormatLayer::new(
610608
std::io::stdout,
@@ -614,7 +612,6 @@ fn setup_legacy_format(
614612
);
615613

616614
tracing_subscriber::registry()
617-
.with(otel_layer)
618615
.with(env_filter)
619616
.with(legacy_layer)
620617
.init();
@@ -628,7 +625,6 @@ fn setup_legacy_format(
628625
);
629626

630627
tracing_subscriber::registry()
631-
.with(otel_layer)
632628
.with(env_filter)
633629
.with(legacy_layer)
634630
.init();

0 commit comments

Comments
 (0)