You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class MiniProfilerOptions
{
public bool IsEnabled { get; set; }
public PostgreSqlStorageOptions PostgreSqlStorage { get; set; }
}
public class PostgreSqlStorageOptions
{
public string ConectionString { get; set; }
public string ProfilersTable { get; set; }
public string TimingsTable { get; set; }
public string ClientTimingsTable { get; set; }
}
SQL query used to create table -
CREATE TABLE "MiniProfilersTable"
(
RowId serial primary key,
Id uuid not null, -- don't cluster on a guid
RootTimingId uuid null,
Name varchar(200) null,
Started timestamp(3) not null,
DurationMilliseconds decimal(15,1) not null,
"User" varchar(100) null,
HasUserViewed boolean not null,
MachineName varchar(100) null,
CustomLinksJson varchar,
ClientTimingsRedirectCount integer null
);
CREATE UNIQUE INDEX IX_MiniProfilersTable_Id ON "MiniProfilersTable" (Id);
CREATE INDEX IX_MiniProfilersTable_User_HasUserViewed_Includes ON "MiniProfilersTable" ("User", HasUserViewed);
CREATE TABLE "MiniProfilerTimingsTable"
(
RowId serial primary key,
Id uuid not null,
MiniProfilerId uuid not null,
ParentTimingId uuid null,
Name varchar(200) not null,
DurationMilliseconds decimal(15,3) not null,
StartMilliseconds decimal(15,3) not null,
IsRoot boolean not null,
Depth smallint not null,
CustomTimingsJson varchar null
);
CREATE UNIQUE INDEX IX_MiniProfilerTimingsTable_Id ON "MiniProfilerTimingsTable" (Id);
CREATE INDEX IX_MiniProfilerTimingsTable_MiniProfilerId ON "MiniProfilerTimingsTable" (MiniProfilerId);
CREATE TABLE "MiniProfilerClientTimingsTable"
(
RowId serial primary key,
Id uuid not null,
MiniProfilerId uuid not null,
Name varchar(200) not null,
Start decimal(9, 3) not null,
Duration decimal(9, 3) not null
);
CREATE UNIQUE INDEX IX_MiniProfilerClientTimingsTable_Id on "MiniProfilerClientTimingsTable" (Id);
CREATE INDEX IX_MiniProfilerClientTimingsTable_MiniProfilerId on "MiniProfilerClientTimingsTable" (MiniProfilerId);
Am i doing something wrong ? or am i missing anything ?
What error are you getting? We don't guard here, so any error should surface. If that's not happening, my best guess is your options aren't actually wiring it up to save (e.g. something is null for a subtle reason).
I have integrated MiniProfiler v4.2.22 in my Asp.Net Core application.
Its is working as expected when using In-Memory database, but when i change the storage option to PostgreSQL no data is coming in the results.
Code Used -
appsettings.json -
Model -
SQL query used to create table -
Am i doing something wrong ? or am i missing anything ?
StackOverflow Link - https://stackoverflow.com/questions/73440691/store-miniprofiler-results-in-postgresql
The text was updated successfully, but these errors were encountered: