Skip to content

Commit 54a7e3a

Browse files
chglrenovate[bot]
andauthored
fix: tracing service name incorrectly defaults to service_unknown (#20)
* chore(deps): update docker.io/library/postgres digest to 9ceb24f * chore(deps): update github/codeql-action digest to 2ca79b6 * chore(deps): update actions/cache digest to f427802 * chore(deps): update docker.io/ibmcom/ibm-fhir-server digest to 2433f73 * build: add build version to CI and Dockerfile * fix: tracing service name no longer defaults to unknown_service * chore: renovate gha, compose, k8s monthly Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 447d2b0 commit 54a7e3a

File tree

8 files changed

+41
-13
lines changed

8 files changed

+41
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
password: ${{ secrets.GITHUB_TOKEN }}
4040

4141
- name: Cache Docker layers
42-
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # tag=v3
42+
uses: actions/cache@f4278025ab0f432ce369118909e46deec636f50c # tag=v3
4343
with:
4444
path: /tmp/.buildx-cache
4545
key: ${{ runner.os }}-buildx-${{ github.sha }}

.github/workflows/codeql.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
2424

2525
- name: Initialize CodeQL
26-
uses: github/codeql-action/init@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2
26+
uses: github/codeql-action/init@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2
2727
with:
2828
languages: ${{ matrix.language }}
2929

3030
- name: Autobuild
31-
uses: github/codeql-action/autobuild@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2
31+
uses: github/codeql-action/autobuild@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2
3232

3333
- name: Perform CodeQL Analysis
34-
uses: github/codeql-action/analyze@0c670bbf0414f39666df6ce8e718ec5662c21e03 # tag=v2
34+
uses: github/codeql-action/analyze@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2

.renovaterc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@
66
"helpers:pinGitHubActionDigests",
77
"group:allNonMajor",
88
"docker:pinDigests"
9-
]
9+
],
10+
"packageRules": [
11+
{
12+
"matchManagers": ["github-actions", "docker-compose", "kubernetes"],
13+
"extends": ["schedule:monthly"]
14+
}
15+
],
16+
"kubernetes": {
17+
"fileMatch": ["hack/k8s/.+\\.yaml$"]
18+
}
1019
}

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ RUN dotnet restore magniFHIR.sln
1616

1717
FROM build AS publish-release
1818
COPY src/ src/
19-
RUN dotnet publish --no-restore -c Release -o /out/release
19+
ARG BUILD_VERSION=0.0.0
20+
RUN dotnet publish -p:Version=${BUILD_VERSION} --no-restore -c Release -o /out/release
2021

2122
FROM publish-release AS test
2223
RUN dotnet test src/magniFHIR.Tests/magniFHIR.Tests.csproj \

hack/docker-compose.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
- "traefik.http.routers.fhir.entrypoints=web"
6060

6161
hapi-fhir-db:
62-
image: docker.io/library/postgres:14.4@sha256:3e2eba0a6efbeb396e086c332c5a85be06997d2cf573d34794764625f405df4e
62+
image: docker.io/library/postgres:14.4@sha256:9ceb24f8c5f15c053d973a3610866f473690875dc13eb3282b45302189321040
6363
restart: unless-stopped
6464
ipc: private
6565
security_opt:
@@ -90,7 +90,7 @@ services:
9090
- hapi-fhir-server
9191

9292
l4h-fhir-db:
93-
image: docker.io/library/postgres:14.4@sha256:3e2eba0a6efbeb396e086c332c5a85be06997d2cf573d34794764625f405df4e
93+
image: docker.io/library/postgres:14.4@sha256:9ceb24f8c5f15c053d973a3610866f473690875dc13eb3282b45302189321040
9494
restart: unless-stopped
9595
ipc: private
9696
security_opt:
@@ -115,7 +115,7 @@ services:
115115
- l4h-fhir-db
116116

117117
l4h-fhir-server:
118-
image: docker.io/ibmcom/ibm-fhir-server:4.11.1@sha256:e25a080ef92c663aae2c14ebc9add5673656d845eefe0a809916e42dbbcb4cee
118+
image: docker.io/ibmcom/ibm-fhir-server:4.11.1@sha256:2433f739c48e4d8b087942d0f2df272d3d71cef8ee90f4b3d7ebc570413d6a0a
119119
restart: unless-stopped
120120
cap_drop:
121121
- ALL
@@ -170,3 +170,11 @@ services:
170170
environment:
171171
SA_PASSWORD: 37e9211d1b3!017c2d457e4c3d_f69947bdaab16806ea215ad
172172
ACCEPT_EULA: "Y"
173+
174+
jaeger:
175+
image: docker.io/jaegertracing/all-in-one:1.37@sha256:60ab2e6b0682f79a4e42b2bd2526ac4de80a3a7a1ef136c71dc0cb85e9c50f46
176+
ports:
177+
- 127.0.0.1:16686:16686
178+
- 6831:6831/udp
179+
- 6832:6832/udp
180+
- 4317:4317/tcp

src/magniFHIR/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Net;
88
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
99
using Prometheus;
10+
using OpenTelemetry.Resources;
1011

1112
var builder = WebApplication.CreateBuilder(args);
1213

@@ -54,6 +55,10 @@
5455
builder.Services.AddOpenTelemetryTracing(options =>
5556
{
5657
options
58+
.ConfigureResource(r => r.AddService(
59+
serviceName: serviceName,
60+
serviceVersion: assemblyVersion,
61+
serviceInstanceId: Environment.MachineName))
5762
.SetSampler(new AlwaysOnSampler())
5863
.AddHttpClientInstrumentation()
5964
.AddAspNetCoreInstrumentation(o =>

src/magniFHIR/appsettings.Development.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"LogLevel": {
55
"Default": "Information",
66
"Microsoft": "Warning",
7-
"Microsoft.Hosting.Lifetime": "Information"
7+
"Microsoft.Hosting.Lifetime": "Information",
8+
"System.Net.Http.HttpClient": "Information"
89
}
910
},
1011
"FhirServers": [
@@ -30,6 +31,9 @@
3031
"Tracing": {
3132
"Enabled": true,
3233
"Exporter": "jaeger",
33-
"ServiceName": "magniFHIR"
34+
"ServiceName": "magniFHIR",
35+
"Otlp": {
36+
"Endpoint": "http://localhost:4317"
37+
}
3438
}
3539
}

src/magniFHIR/appsettings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
"LogLevel": {
44
"Default": "Information",
55
"Microsoft": "Warning",
6-
"Microsoft.Hosting.Lifetime": "Information"
6+
"Microsoft.Hosting.Lifetime": "Information",
7+
"System.Net.Http.HttpClient": "Warning"
78
}
89
},
910
"AllowedHosts": "*",
1011
"FhirServers": [],
1112
"Tracing": {
1213
"Enabled": false,
13-
"Exporter": "jaeger",
1414
"ServiceName": "magniFHIR",
15+
"Exporter": "jaeger",
1516
"Jaeger": {},
1617
"Otlp": {
1718
"Endpoint": ""

0 commit comments

Comments
 (0)