Skip to content

fix: prevent panic on duplicate tracing initialization#718

Merged
smrz2001 merged 3 commits into
mainfrom
fix/panic-duplicate-tracing-init
May 24, 2025
Merged

fix: prevent panic on duplicate tracing initialization#718
smrz2001 merged 3 commits into
mainfrom
fix/panic-duplicate-tracing-init

Conversation

@smrz2001

Copy link
Copy Markdown
Contributor

No description provided.

@smrz2001 smrz2001 self-assigned this May 14, 2025
@smrz2001 smrz2001 requested a review from a team as a code owner May 14, 2025 18:35
@smrz2001 smrz2001 requested review from stbrody and removed request for a team May 14, 2025 18:35
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 14, 2025 18:56 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 14, 2025 18:56 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 14, 2025 18:56 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 15, 2025 22:34 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 15, 2025 22:34 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 15, 2025 22:34 — with GitHub Actions Inactive
tracing::subscriber::set_global_default(subscriber).expect("Failed to set tracing subscriber");
.try_init()
{
warn!("Tracing already initialized: {}", result);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we know that the only possible error is already initialized? Is there a specific error code we can check to confirm and only swallow already initialized but Panic if there's a different type of failure?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. Updated. Though there are other ways, a string match appears to be the simplest way to check.

Comment thread sdk/packages/flight-sql-client/src/lib.rs
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 16, 2025 18:23 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 16, 2025 18:23 — with GitHub Actions Inactive
@smrz2001 smrz2001 temporarily deployed to tnet-prod-2024 May 16, 2025 20:00 — with GitHub Actions Inactive
@smrz2001 smrz2001 requested a review from stbrody May 21, 2025 19:03

@stbrody stbrody left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@smrz2001 smrz2001 added this pull request to the merge queue May 23, 2025
Merged via the queue into main with commit 7ed45d5 May 24, 2025
40 of 44 checks passed
@smrz2001 smrz2001 deleted the fix/panic-duplicate-tracing-init branch May 24, 2025 00:41
This was referenced May 26, 2025
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