Skip to content

Commit

Permalink
Merge pull request #11 from FHIR/dev
Browse files Browse the repository at this point in the history
Update for Foundry OpenTelemetry use.
  • Loading branch information
GinoCanessa authored Sep 5, 2024
2 parents 9c000ab + 0eecba6 commit a1c9789
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions src/fhir-candle/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,22 @@ public static async Task<int> RunServer(
return general;
}

if (general.EndsWith('/'))
if (general.EndsWith("v1/"))
{
return general + relative;
}

return general + "/" + relative;
if (general.EndsWith("v1"))
{
return general + "/" + relative;
}

if (general.EndsWith('/'))
{
return general + "v1/" + relative;
}

return general + "/v1/" + relative;
}

return null;
Expand All @@ -403,19 +413,19 @@ private static void ConfigureOpenTelemetry(CandleConfig config, WebApplicationBu
string? traceEndpoint = getTelemetryUrl(
config.OpenTelemetryTracesEndpoint,
config.OpenTelemetryEndpoint,
"v1/traces",
"traces",
protocol);

string? metricsEndpoint = getTelemetryUrl(
config.OpenTelemetryMetricsEndpoint,
config.OpenTelemetryEndpoint,
"v1/metrics",
"metrics",
protocol);

string? logsEndpoint = getTelemetryUrl(
config.OpenTelemetryLogsEndpoint,
config.OpenTelemetryEndpoint,
"v1/logs",
"logs",
protocol);

if (logsEndpoint != null)
Expand Down
2 changes: 1 addition & 1 deletion src/fhir-candle/_ForPackages/FhirCiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private async Task<List<FhirCiQaRecord>> downloadCoreQAs()
BuildDate = ciBuildDate,
BuildDateIso = ciBuildDate,
FhirVersion = ciFhirVersion,
RepositoryUrl = "HL7/fhir/branches/master/qa.json"
RepositoryUrl = $"HL7/fhir/branches/{ciBranchRec.Name}/qa.json"
});
}
}
Expand Down

0 comments on commit a1c9789

Please sign in to comment.