Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tracing, Metrics #85

Open
timheuer opened this issue May 15, 2024 · 5 comments
Open

Add Tracing, Metrics #85

timheuer opened this issue May 15, 2024 · 5 comments

Comments

@timheuer
Copy link

Describe the solution you'd like
Would like the C# SDK for Milvus to have Tracing/HealthChecks/Metrics. For .NET Aspire, the components are desired to have all of these 'by default' for consumers. .NET Aspire is introducing hosting support for Milvus and wrapping the Milvus C# Client in a component and would like these to be exposed more. See: https://github.com/dotnet/aspire/tree/main/src/Components

@roji
Copy link
Collaborator

roji commented May 15, 2024

For tracing - makes absolute sense to me.

For metrics, note that Milvus emits these on the server side (docs, docs); using this probably makes more sense than on the cilent side (since you get fully aggregated metrics for the entire server). It's probably worth checking how easy it would be to add these server metrics to Aspire...

For the health check, MilvusClient already exposes a HealthCheck() API - can that be used?

@timheuer
Copy link
Author

RE: HealthChecks -- let me see if I can add that easily -- we've been leveraging the AspNetCore.HealthChecks project as primary generally and there isn't a Milvus one there. Xabaril/AspNetCore.Diagnostics.HealthChecks#2214

RE: Metrics, the Aspire pattern has been that the Client provides the signal still not a direct from the server. eg: https://github.com/dotnet/aspire/blob/main/src/Components/Aspire.MySqlConnector/AspireMySqlConnectorExtensions.cs#L99

@timheuer timheuer changed the title Add Tracing, HealthChecks, Metrics Add Tracing, Metrics May 16, 2024
@timheuer
Copy link
Author

Got the HealthChecks implemented for Aspire.

@roji
Copy link
Collaborator

roji commented May 16, 2024

RE: Metrics, the Aspire pattern has been that the Client provides the signal still not a direct from the server

Yeah, that's true, but I think that's more because traditional database servers (PostgreSQL, MySQL, SQL Server...) simply don't emit OpenTelemetry metrics (yet)... Where server metrics do exist (like in the Milvus case, it seems), by default I'd expect them to be the better thing - the server has more meaningful/interesting/internal metrics it can report, and in general, you're interested in your server performance (so aggregated for all clients) rather than a particular client instance, I'd think...

@timheuer
Copy link
Author

in general, you're interested in your server performance (so aggregated for all clients) rather than a particular client instance

Agreed. I think looking at the model we have established, the meter exists in the client component. E.g from MySqlconnector: https://github.com/mysql-net/MySqlConnector/blob/9efc679afa3d662fef2684adc89fe4152e272817/src/MySqlConnector/Utilities/ActivitySourceHelper.cs#L59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants