Skip to content

feat(flutter): Add structured logs opt-in - #1050

Merged
denrase merged 9 commits into
getsentry:masterfrom
denrase:flutter/add-structured-logs
Aug 11, 2025
Merged

denrase merged 9 commits into
getsentry:masterfrom
denrase:flutter/add-structured-logs

Conversation

@denrase

@denrase denrase commented Aug 5, 2025 •

Copy link
Copy Markdown
Collaborator

Closes #1038

@denrase
denrase requested a review from buenaflor August 5, 2025 07:53
@codecov

codecov Bot commented Aug 5, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.76%. Comparing base (8e579f0) to head (c7cddd7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/flutter/code-tools.ts 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1050      +/-   ##
==========================================
- Coverage   28.76%   28.76%   -0.01%     
==========================================
  Files         128      128              
  Lines       14581    14592      +11     
  Branches      945      946       +1     
==========================================
+ Hits         4194     4197       +3     
- Misses      10370    10378       +8     
  Partials       17       17              
Flag Coverage Δ
unit-tests 28.76% <27.27%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@denrase denrase changed the title flutter: Add Structured Logs flutter: Enable structured logs per default Aug 5, 2025
@denrase denrase changed the title flutter: Enable structured logs per default feat(flutter): Enable structured logs per default Aug 5, 2025
@denrase
denrase marked this pull request as ready for review August 5, 2025 08:40
@buenaflor

Copy link
Copy Markdown
Contributor

Should it enabled by default or opt-in?

@denrase

denrase commented Aug 6, 2025 •

Copy link
Copy Markdown
Collaborator Author

@buenaflor It's not specified. Since logs are important, i assumed we'd want to add them by default. But then again, we could have just made the flag in the SDK true by default. Maybe @kahest can clarify?

@buenaflor

Copy link
Copy Markdown
Contributor

cc @AbhiPrasad should logs config in the wizard be auto-enabled?

@kahest

kahest commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

@denrase @buenaflor I added clarification around that to the issue

@denrase denrase changed the title feat(flutter): Enable structured logs per default feat(flutter): Add structured logs opt-in Aug 6, 2025
@AbhiPrasad

Copy link
Copy Markdown
Contributor

Generally all wizard options should be opt-in, this is also what we do with the onboarding snippets

Comment thread src/flutter/code-tools.ts
@denrase
denrase requested a review from buenaflor August 7, 2025 11:42
Comment thread src/flutter/code-tools.ts
Comment on lines +209 to +215
features.push({
id: 'logs',
prompt: `Do you want to enable ${chalk.bold(
'Logs',
)} to send your application logs to Sentry?`,
enabledHint: 'optional',
});

@buenaflor buenaflor Aug 7, 2025 •

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.

okay we are aligned but actually I don't know if this is accurate since we don't ootb instrument user logs with sentry logs (dont even know if that is possible)

maybe I'm overthinking, to me it could sound confusing as if we automatically will send logs when this is enabled

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.

Yeah I get how this feels confusing, but I think for now it's fine, especially since we don't mention that we are adding any instrumentation, just enabling application logs to be sent.

@denrase
denrase requested a review from buenaflor August 11, 2025 11:38
@denrase
denrase requested a review from AbhiPrasad August 11, 2025 11:40
@denrase
denrase merged commit ea586d0 into getsentry:master Aug 11, 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.

Add logs to the flutter wizard

4 participants