Skip to content

Conversation

@hubertdeng123
Copy link
Member


let parsed: Value = serde_json::from_reader(fs::File::open(&values_file)?)?;

// Extract generated_at if present
Copy link
Member

Choose a reason for hiding this comment

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

and because the json should always generated by the sentry options write, this property should also always be present right

Copy link
Member Author

Choose a reason for hiding this comment

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

yea it should be

}
}

transaction.finish();
Copy link
Member

Choose a reason for hiding this comment

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

do we know how long this could take? does it block the main thread?

Copy link
Member Author

Choose a reason for hiding this comment

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

i do not know, but don't think this overhead would be too important i'd assume its < 1 sec and won't impact option reads at all which is the important part

/// Uses a custom Client that is completely isolated from the host application's Sentry setup.
static SENTRY_HUB: OnceLock<Arc<sentry::Hub>> = OnceLock::new();

fn get_sentry_hub() -> &'static Arc<sentry::Hub> {
Copy link
Member Author

Choose a reason for hiding this comment

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

You may ask why this is necessary? It's because I don't want to conflict with a user's sentry instance where they use init(). Creating an entirely different hub here ensures we only send to our DSN

Copy link
Member

Choose a reason for hiding this comment

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

makes sense to me

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.

3 participants