Skip to content
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

Missing autofix for methods related to jQuery.sap.fesr/measure/passport.* (FESR Utils) #561

Open
21 tasks
flovogt opened this issue Feb 20, 2025 · 1 comment
Open
21 tasks
Labels
autofix An issue related to the autofix capabilities enhancement New feature or request

Comments

@flovogt
Copy link
Member

flovogt commented Feb 20, 2025

Missing autofix for methods related to jQuery.sap.fesr/measure/passport.* (FESR Utils)

Methods related to jQuery.sap.fesr/interaction/measure/passport.* (FESR Utils) are deprecated. Therefore an autofix should be offered by UI5 linter.

Deprecated APIs replaced by sap/ui/performance/trace/FESR:

  • jQuery.sap.fesr.getActive
  • jQuery.sap.fesr.setActive

Deprecated Usage

await jQuery.sap.fesr.setActive(true);
var isFESRActive = jQuery.sap.fesr.getActive();

Recommended Usage

sap.ui.define([
   "sap/ui/performance/trace/FESR"
], (FESR) => {
  await FESR.setActive(true);
  var isFESRActive = FESR.getActive();
});

Note: jQuery.sap.fesr.setActive might be used with a then handler, await statement or without any asynchronous syntax. Replace the current usage with the exact same as before.


Deprecated APIs replaced by sap/ui/performance/trace/Interaction:

  • jQuery.sap.fesr.addBusyDuration
  • jQuery.sap.interaction.getActive
  • jQuery.sap.interaction.setActive
  • jQuery.sap.interaction.notifyStepStart
  • jQuery.sap.interaction.notifyStepEnd
  • jQuery.sap.interaction.notifyEventStart
  • jQuery.sap.interaction.notifyScrollEvent
  • jQuery.sap.interaction.notifyEventEnd
  • jQuery.sap.interaction.setStepComponent
  • jQuery.sap.measure.clearInteractionMeasurements
  • jQuery.sap.measure.startInteraction
  • jQuery.sap.measure.endInteraction
  • jQuery.sap.measure.filterInteractionMeasurements
  • jQuery.sap.measure.getAllInteractionMeasurements
  • jQuery.sap.measure.getPendingInteractionMeasurement

Deprecated Usage

jQuery.sap.fesr.addBusyDuration(33);
await jQuery.sap.interaction.setActive(true);
var isInteractionTrackingActive = jQuery.sap.interaction.getActive();
jQuery.sap.interaction.notifyStepStart("startup", "startup", true);
jQuery.sap.interaction.notifyStepEnd(true);
jQuery.sap.interaction.notifyEventStart(myClickEvent);
jQuery.sap.interaction.notifyScrollEvent(myScrollEvent)
jQuery.sap.interaction.notifyEventEnd();
jQuery.sap.interaction.setStepComponent("component-fancy");
jQuery.sap.measure.startInteraction("click", myButton);
jQuery.sap.measure.endInteraction(true);
jQuery.sap.measure.clearInteractionMeasurements();
var filteredMeasurements = jQuery.sap.measure.filterInteractionMeasurements(() => true);
var allMeasurements = jQuery.sap.measure.getAllInteractionMeasurements();
var pendigngMeasurement = jQuery.sap.measure.getPendingInteractionMeasurement();

Recommended Usage

sap.ui.define([
   "sap/ui/performance/trace/Interaction"
], (Interaction) => {
  Interaction.addBusyDuration(33);
  await Interaction.setActive(true);
  var isInteractionTrackingActive = Interaction.getActive();
  Interaction.notifyStepStart("startup", "startup", true);
  Interaction.notifyStepEnd(true);
  Interaction.notifyEventStart(myClickEvent);
  Interaction.notifyScrollEvent(myScrollEvent)
  Interaction.notifyEventEnd();
  Interaction.setStepComponent("component-fancy");
  Interaction.start("click", myButton);
  Interaction.end(true);
  Interaction.clear();
  var filteredMeasurements = Interaction.filter(() => true);
  var allMeasurements = Interaction.getAll();
  var pendigngMeasurement = Interaction.getPending();
});

Note: jQuery.sap.interaction.setActive might be used with a then handler, await statement or without any asynchronous syntax. Replace the current usage with the exact same as before.


Deprecated APIs replaced by sap/ui/performance/trace/Passport:

  • jQuery.sap.fesr.getCurrentTransactionId
  • jQuery.sap.fesr.getRootId
  • jQuery.sap.passport.setActive
  • jQuery.sap.passport.traceFlags

Deprecated Usage

var transactionId = jQuery.sap.fesr.getCurrentTransactionId();
var rootId = jQuery.sap.fesr.getRootId()
jQuery.sap.passport.setActive(true);
var traceLevel = jQuery.sap.passport.traceFlags("medium");

Recommended Usage

sap.ui.define([
   "sap/ui/performance/trace/Passport"
], (Passport) => {
  var transactionId = Passport.getCurrentTransactionId();
  var rootId = Passport.getRootId()
  Passport.setActive(true);
  var traceLevel = Passport.traceFlags("medium");
});
@flovogt flovogt added autofix An issue related to the autofix capabilities enhancement New feature or request labels Feb 20, 2025
@flovogt
Copy link
Member Author

flovogt commented Feb 20, 2025

Will be implemented in CPOUI5FOUNDATION-990.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix An issue related to the autofix capabilities enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant