Skip to content

Commit

Permalink
remove postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasisnes committed Sep 29, 2024
1 parent 9049492 commit 0857ee6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static WebApplication Create(string[] args, string service)
builder.Services.AddSwaggerGen();
builder.Services.AddLogging();

builder.AddAltinnAppConfiguration();
builder.AddAltinnAppConfiguration(opts => opts.AddDefaults());
builder.AddAltinnDefaultOpenTelemetry(otel => otel.ServiceName = service);

return builder.Build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Extensions.Options;
using Npgsql;

var app = IndexHost.Create(args, "Garfield");
var app = IndexHost.Create(args, "Index");

if (app.Environment.IsDevelopment())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public static IHostApplicationBuilder AddAltinnDefaultOpenTelemetry(this IHostAp
public static IHostApplicationBuilder AddAltinnOpenTelemetry(this IHostApplicationBuilder builder, Action<AltinnOpenTelemetryOptions> configureOptions = null)
{
var config = new AltinnOpenTelemetryOptions(configureOptions);

var otel = builder.Services.AddOpenTelemetry()
.ConfigureResource(resource => resource.AddService(config.ServiceName))
.WithLogging()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ public AltinnOpenTelemetryOptions AddTraceHeader(params string[] traceHeaders)
/// </summary>
public string ApplicationInsightsConnectionString { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static IHostApplicationBuilder AddAltinnAppConfiguration(this IHostApplic
opts.ConfigureRefresh(refresh =>
{
refresh.SetRefreshInterval(TimeSpan.FromMinutes(1));
refresh.Register(nameof(AltinnAppSettings.Sentinel), AltinnAppConfigurationOptions.DefaultLabel, true);
refresh.Register("Sentinel", true);
});

foreach (var label in options.FeatureLabels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ public AltinnAppConfigurationOptions AddFeatureLabels(params string[] labels)
/// This method allows for easy addition of the "default" label.
/// </summary>
/// <returns>The current instance of <see cref="AltinnAppConfigurationOptions"/> for method chaining.</returns>
public AltinnAppConfigurationOptions AddDefaultAppLabel()
public AltinnAppConfigurationOptions AddDefaults()
{
AddLabels(KeyLabels, [DefaultLabel]);
AddKeyLabels(DefaultLabel);
AddFeatureLabels(DefaultLabel);
return this;
}

Expand Down

0 comments on commit 0857ee6

Please sign in to comment.