mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Provide LaunchDarkly application info (#3435)
* Upgrade to SDK v8 * Provide application properties * Test adjustments * Clean up tests * Ensure project name is set * Add a 'v' for Git tagging support
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
using LaunchDarkly.Logging;
|
||||
using LaunchDarkly.Sdk.Server;
|
||||
using LaunchDarkly.Sdk.Server.Integrations;
|
||||
@ -17,6 +18,16 @@ public class LaunchDarklyFeatureService : IFeatureService, IDisposable
|
||||
var ldConfig = Configuration.Builder(globalSettings.LaunchDarkly?.SdkKey);
|
||||
ldConfig.Logging(Components.Logging().Level(LogLevel.Error));
|
||||
|
||||
if (!string.IsNullOrEmpty(globalSettings.ProjectName))
|
||||
{
|
||||
ldConfig.ApplicationInfo(Components.ApplicationInfo()
|
||||
.ApplicationId(globalSettings.ProjectName)
|
||||
.ApplicationName(globalSettings.ProjectName)
|
||||
.ApplicationVersion(AssemblyHelpers.GetGitHash() ?? $"v{AssemblyHelpers.GetVersion()}")
|
||||
.ApplicationVersionName(AssemblyHelpers.GetVersion())
|
||||
);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(globalSettings.LaunchDarkly?.SdkKey))
|
||||
{
|
||||
// support a file to load flag values
|
||||
|
Reference in New Issue
Block a user