Skip to content

Conversation

@spaduret
Copy link
Contributor

fix trace records ordering

fix trace records ordering
@spaduret spaduret changed the title Update MiniProfilerMiddleware.cs Fix trace sorting on the list view Mar 26, 2021
@NickCraver
Copy link
Member

Can you please explain what this is fixing? The most recent being at the top (regardless of any other settings) is the intended behavior, perhaps we could add docs if that part is confusing or unexpected?

@spaduret
Copy link
Contributor Author

Can you please explain what this is fixing? The most recent being at the top (regardless of any other settings) is the intended behavior, perhaps we could add docs if that part is confusing or unexpected?

Hi, we have a .net core app and use this configuration for MiniProfiler:

services
      .AddMiniProfiler(options =>
      {
          options.RouteBasePath = "/profiler";
          options.ColorScheme = ColorScheme.Dark;
          options.OnInternalError = ex => Log.Debug(ex, "");
          var sqlStorage = new SqlServerStorage(cpConnection);
          options.Storage = sqlStorage;
          options.UserIdProvider = request => request.Headers[Headers.XUserId];
          options.SqlFormatter = new InlineFormatter();
          options.EnableMvcViewProfiling = false;
          options.ShowControls = true;
          options.PopupShowTrivial = true;
          options.PopupMaxTracesToShow = 200;
          options.MaxUnviewedProfiles = 10;
          options.EnableServerTimingHeader = false;
          options.ExcludeStackTraceSnippetFromCustomTimings = false;
          options.ProfilerProvider = new DefaultProfilerProvider();
      })
      .AddEntityFramework();

But trace order is not right:
image

Copy link
Member

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

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

👍 Apologies this took so long to get back, did not have eyes on this repo. Change is good!

@NickCraver NickCraver merged commit 65441d9 into MiniProfiler:main Oct 24, 2021
NickCraver added a commit that referenced this pull request Oct 24, 2021
NickCraver pushed a commit that referenced this pull request Nov 30, 2024
Fixes both #653 and #659 by updating the UI to work with the recent-trace-first sorting introduced in #550
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