Dibk.Ftpb.Common.AltinnApps
0.7.1-preview-2
dotnet add package Dibk.Ftpb.Common.AltinnApps --version 0.7.1-preview-2
NuGet\Install-Package Dibk.Ftpb.Common.AltinnApps -Version 0.7.1-preview-2
<PackageReference Include="Dibk.Ftpb.Common.AltinnApps" Version="0.7.1-preview-2" />
paket add Dibk.Ftpb.Common.AltinnApps --version 0.7.1-preview-2
#r "nuget: Dibk.Ftpb.Common.AltinnApps, 0.7.1-preview-2"
// Install Dibk.Ftpb.Common.AltinnApps as a Cake Addin #addin nuget:?package=Dibk.Ftpb.Common.AltinnApps&version=0.7.1-preview-2&prerelease // Install Dibk.Ftpb.Common.AltinnApps as a Cake Tool #tool nuget:?package=Dibk.Ftpb.Common.AltinnApps&version=0.7.1-preview-2&prerelease
Dibk.Ftpb.Common.AltinnApps
Verktøyklasser for å konfigurere og sette opp Altinn 3 applikasjoner i DIBK sitt FtPB-økosystem.
Eksport av OTEL data til Elasticsearch
Registrering av service for eksport av OTEL-metrics til Elasticsearch gjøres vha extensionmetoden AddOtelElasticExporters
. Det er viktig å påse at servicen blir registert etter at settings er henta fra KeyVault.
<details>
<summary>Eksempel på registrering av service</summary>
// ###########################################################################
// # Unless you are sure what you are doing do not change the following code #
// ###########################################################################
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
ConfigureServices(builder.Services, builder.Configuration);
builder.WebHost.ConfigureAppWebHost(args);
if (!builder.Environment.IsDevelopment())
{
builder.AddAzureKeyVaultAsConfigProvider(); // KeyVault lastes her
}
builder.Services.AddOtelElasticExporters(builder.Configuration); // Registrere her
WebApplication app = builder.Build();
Configure();
app.Run();
</details>
Appsettings
Settings som må være på plass for at ekspostering av OpenTelemetry-data til Elasticsearch skal fungere
appsettings.json må inneholde følgende:
{
"AppSettings": {
"UseOpenTelemetry": true
},
"OTEL_RESOURCE_ATTRIBUTES": "deployment.environment=Local",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OpenTelemetry": {
"ElasticExporter": {
"Endpoint": "https://ein-eller-ana-identifikator.apm.uksouth.azure.elastic-cloud.com:443"
}
}
}
Miljøspesifikke appsettings.{miljø}.json
inneholder endringer fra standarden. Dette er typisk som følger:
{
"OTEL_RESOURCE_ATTRIBUTES": "deployment.environment=Test", // Miljø
"OpenTelemetry": {
"ElasticExporter": {
"Endpoint": "https://ein-heilt-ana-identifiketor.apm.uksouth.azure.elastic-cloud.com:443" // endepunkt
}
}
}
Key vault
Key vault (eller secrets.json ved lokal utvikling) må inneholde authorization settings
Key: OpenTelemetry--ElasticExporter--Headers
Value: Authorization=Bearer heMMEligHET2000
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Altinn.App.Api (>= 8.3.8)
- Altinn.App.Core (>= 8.3.8)
- Dibk.Ftpb.Common (>= 0.0.70)
- Dibk.Ftpb.Validation.Client (>= 0.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.1-preview-2 | 45 | 12/3/2024 |
0.0.1 - Initial version.