-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[No QA][Sentry] activeSpans logs are displayed locally only #85351
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
Closed
sosek108
wants to merge
9
commits into
Expensify:main
from
callstack-internal:sentry/active-spans-local
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cd11afa
add eslint rule enforcing getReportName being read-only
sosek108 86d90b7
add eslint rule enforcing getReportName being read-only
sosek108 ecbed28
remove part from lint-changed
sosek108 56840bf
The repetition pattern for ReportNameUtils
sosek108 8d6ff82
Merge branch 'main' into reports/getReportName-eslint
sosek108 cb6813b
eslint custom rule
sosek108 4dea6ed
Merge branch 'main' into reports/getReportName-eslint
sosek108 68b2717
sentry debug spans to be displayed only locally
sosek108 c85634f
remove tryEndSpan as it's purpose is no more needed. No `/api/Log` fo…
sosek108 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /** | ||
| * ESLint plugin that enforces architectural constraints on ReportNameUtils.ts. | ||
| * | ||
| * `getReportName` must remain a pure read-only function — it reads from | ||
| * pre-computed `reportAttributesDerivedValue` and must never call other | ||
| * functions. All computation belongs in `computeReportName`. | ||
| */ | ||
|
|
||
| const noFunctionCallInGetReportName = { | ||
| meta: { | ||
| type: 'problem', | ||
| docs: {description: 'getReportName must be a pure read-only function. Move any computation to computeReportName instead.'}, | ||
| messages: {noFunctionCall: 'getReportName must be a pure read-only function. Move any computation to computeReportName instead.'}, | ||
| schema: [], | ||
| }, | ||
| create(context) { | ||
| return { | ||
| 'FunctionDeclaration[id.name="getReportName"] CallExpression'(node) { | ||
|
Check failure on line 18 in eslint-plugin-report-name-utils/index.mjs
|
||
| context.report({node, messageId: 'noFunctionCall'}); | ||
| }, | ||
| }; | ||
| }, | ||
| }; | ||
|
|
||
| export default { | ||
| meta: {name: 'eslint-plugin-report-name-utils'}, | ||
| rules: { | ||
| 'no-function-call-in-get-report-name': noFunctionCallInGetReportName, | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ CONSISTENCY-3 (docs)
The
eslint.changed.config.mjsfile already imports and spreads the entiremainConfigfromeslint.config.mjsvia...mainConfigat line 39. Since thereport-name-utilsplugin rule block was added toeslint.config.mjs, it is automatically inherited here. Adding the same block again ineslint.changed.config.mjsis redundant duplication — the import ofreportNameUtilsPluginon line 2 and the rule block (lines 111–115) should be removed from this file.Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.