Skip to content

Commit

Permalink
chore: set redis connect client name
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Oct 9, 2024
1 parent 05adb16 commit 28eb74d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Services/Masa.Dcc.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{
ServiceNameSpace = builder.Environment.EnvironmentName,
ServiceVersion = masaStackConfig.Version,
ServiceName = masaStackConfig.GetServiceId(MasaStackProject.DCC)
ServiceName = masaStackConfig.GetServiceId(MasaStackProject.DCC),
ServiceInstanceId = builder.Configuration.GetValue<string>("HOSTNAME")!
}, () => masaStackConfig.OtlpUrl, true);
}

Expand Down Expand Up @@ -77,7 +78,8 @@
}
},
DefaultDatabase = masaStackConfig.RedisModel.RedisDb,
Password = masaStackConfig.RedisModel.RedisPassword
Password = masaStackConfig.RedisModel.RedisPassword,
ClientName = builder.Configuration.GetValue<string>("HOSTNAME") ?? masaStackConfig.GetServiceId(MasaStackProject.DCC)
};

builder.Services.AddMultilevelCache(distributedCacheAction: distributedCacheOptions =>
Expand Down

0 comments on commit 28eb74d

Please sign in to comment.