Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/SlimFaasMcp/Extensions/OpenTelemetryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ private static void ConfigureMetric(OpenTelemetryConfig config, MeterProviderBui
: _ => { }
);

meterProviderBuilder.AddPrometheusExporter();

if (config.EnableConsoleExporter)
{
meterProviderBuilder.AddConsoleExporter();
Expand Down
2 changes: 2 additions & 0 deletions src/SlimFaasMcp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
app.UseCors("SlimFaasMcpCors");
app.UseMiddleware<RequestLoggingMiddleware>();

app.MapPrometheusScrapingEndpoint();

app.MapGet("/mcp", () => Results.StatusCode(StatusCodes.Status405MethodNotAllowed));

/* -------------------------------------------------------------------------
Expand Down Expand Up @@ -357,7 +359,7 @@
// ⬇️ applique le même wrapping pour que l’UI annonce le bon schéma
foreach (var t in tools)
if (HasKnownOutputSchema(t.OutputSchema))
t.OutputSchema = OutputSchemaWrapper.WrapForStructuredContent(t.OutputSchema);

Check warning on line 362 in src/SlimFaasMcp/Program.cs

View workflow job for this annotation

GitHub Actions / build_slimfaas_mcp_aot (macos-14, osx-arm64, SlimFaasMcp-osx-arm64.zip)

Possible null reference assignment.

Check warning on line 362 in src/SlimFaasMcp/Program.cs

View workflow job for this annotation

GitHub Actions / build_slimfaas_mcp_aot (macos-latest, osx-x64, SlimFaasMcp-osx-x64.zip)

Possible null reference assignment.

Check warning on line 362 in src/SlimFaasMcp/Program.cs

View workflow job for this annotation

GitHub Actions / build_slimfaas_mcp_aot (ubuntu-latest, linux-x64, SlimFaasMcp-linux-x64.zip)

Possible null reference assignment.

Check warning on line 362 in src/SlimFaasMcp/Program.cs

View workflow job for this annotation

GitHub Actions / build_slimfaas_mcp_aot (windows-latest, win-x64, SlimFaasMcp-win-x64.zip)

Possible null reference assignment.
else
t.OutputSchema = new JsonObject();
}
Expand Down
1 change: 1 addition & 0 deletions src/SlimFaasMcp/SlimFaasMcp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="OpenTelemetry" Version="1.14.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.14.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.14.0-beta.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
Expand Down
Loading