diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 059b6b8..c5d1a19 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Cache Docker layers - uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # tag=v3 + uses: actions/cache@f4278025ab0f432ce369118909e46deec636f50c # tag=v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 86f6915..7cf82d3 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -23,12 +23,12 @@ jobs: uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 - name: Initialize CodeQL - uses: github/codeql-action/init@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2 + uses: github/codeql-action/init@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2 + uses: github/codeql-action/autobuild@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2 + uses: github/codeql-action/analyze@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2 diff --git a/.renovaterc.json b/.renovaterc.json index 125f432..aebda42 100644 --- a/.renovaterc.json +++ b/.renovaterc.json @@ -6,5 +6,14 @@ "helpers:pinGitHubActionDigests", "group:allNonMajor", "docker:pinDigests" - ] + ], + "packageRules": [ + { + "matchManagers": ["github-actions", "docker-compose", "kubernetes"], + "extends": ["schedule:monthly"] + } + ], + "kubernetes": { + "fileMatch": ["hack/k8s/.+\\.yaml$"] + } } diff --git a/Dockerfile b/Dockerfile index 22c9016..8a45f2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,8 @@ RUN dotnet restore magniFHIR.sln FROM build AS publish-release COPY src/ src/ -RUN dotnet publish --no-restore -c Release -o /out/release +ARG BUILD_VERSION=0.0.0 +RUN dotnet publish -p:Version=${BUILD_VERSION} --no-restore -c Release -o /out/release FROM publish-release AS test RUN dotnet test src/magniFHIR.Tests/magniFHIR.Tests.csproj \ diff --git a/hack/docker-compose.yaml b/hack/docker-compose.yaml index 34b34a3..de39ca5 100644 --- a/hack/docker-compose.yaml +++ b/hack/docker-compose.yaml @@ -59,7 +59,7 @@ services: - "traefik.http.routers.fhir.entrypoints=web" hapi-fhir-db: - image: docker.io/library/postgres:14.4@sha256:3e2eba0a6efbeb396e086c332c5a85be06997d2cf573d34794764625f405df4e + image: docker.io/library/postgres:14.4@sha256:9ceb24f8c5f15c053d973a3610866f473690875dc13eb3282b45302189321040 restart: unless-stopped ipc: private security_opt: @@ -90,7 +90,7 @@ services: - hapi-fhir-server l4h-fhir-db: - image: docker.io/library/postgres:14.4@sha256:3e2eba0a6efbeb396e086c332c5a85be06997d2cf573d34794764625f405df4e + image: docker.io/library/postgres:14.4@sha256:9ceb24f8c5f15c053d973a3610866f473690875dc13eb3282b45302189321040 restart: unless-stopped ipc: private security_opt: @@ -115,7 +115,7 @@ services: - l4h-fhir-db l4h-fhir-server: - image: docker.io/ibmcom/ibm-fhir-server:4.11.1@sha256:e25a080ef92c663aae2c14ebc9add5673656d845eefe0a809916e42dbbcb4cee + image: docker.io/ibmcom/ibm-fhir-server:4.11.1@sha256:2433f739c48e4d8b087942d0f2df272d3d71cef8ee90f4b3d7ebc570413d6a0a restart: unless-stopped cap_drop: - ALL @@ -170,3 +170,11 @@ services: environment: SA_PASSWORD: 37e9211d1b3!017c2d457e4c3d_f69947bdaab16806ea215ad ACCEPT_EULA: "Y" + + jaeger: + image: docker.io/jaegertracing/all-in-one:1.37@sha256:60ab2e6b0682f79a4e42b2bd2526ac4de80a3a7a1ef136c71dc0cb85e9c50f46 + ports: + - 127.0.0.1:16686:16686 + - 6831:6831/udp + - 6832:6832/udp + - 4317:4317/tcp diff --git a/src/magniFHIR/Program.cs b/src/magniFHIR/Program.cs index 62e77c8..ed0c0e2 100644 --- a/src/magniFHIR/Program.cs +++ b/src/magniFHIR/Program.cs @@ -7,6 +7,7 @@ using System.Net; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Prometheus; +using OpenTelemetry.Resources; var builder = WebApplication.CreateBuilder(args); @@ -54,6 +55,10 @@ builder.Services.AddOpenTelemetryTracing(options => { options + .ConfigureResource(r => r.AddService( + serviceName: serviceName, + serviceVersion: assemblyVersion, + serviceInstanceId: Environment.MachineName)) .SetSampler(new AlwaysOnSampler()) .AddHttpClientInstrumentation() .AddAspNetCoreInstrumentation(o => diff --git a/src/magniFHIR/appsettings.Development.json b/src/magniFHIR/appsettings.Development.json index a0f27ae..fa8da68 100644 --- a/src/magniFHIR/appsettings.Development.json +++ b/src/magniFHIR/appsettings.Development.json @@ -4,7 +4,8 @@ "LogLevel": { "Default": "Information", "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.Hosting.Lifetime": "Information", + "System.Net.Http.HttpClient": "Information" } }, "FhirServers": [ @@ -30,6 +31,9 @@ "Tracing": { "Enabled": true, "Exporter": "jaeger", - "ServiceName": "magniFHIR" + "ServiceName": "magniFHIR", + "Otlp": { + "Endpoint": "http://localhost:4317" + } } } diff --git a/src/magniFHIR/appsettings.json b/src/magniFHIR/appsettings.json index a07e06f..16fe71c 100644 --- a/src/magniFHIR/appsettings.json +++ b/src/magniFHIR/appsettings.json @@ -3,15 +3,16 @@ "LogLevel": { "Default": "Information", "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.Hosting.Lifetime": "Information", + "System.Net.Http.HttpClient": "Warning" } }, "AllowedHosts": "*", "FhirServers": [], "Tracing": { "Enabled": false, - "Exporter": "jaeger", "ServiceName": "magniFHIR", + "Exporter": "jaeger", "Jaeger": {}, "Otlp": { "Endpoint": ""