-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
OpenTelemetry tracing and metrics #1196
Comments
Yes. It is on my radar. |
I'm able to collect EF Core traces using EntityFrameworkCore Instrumentation for OpenTelemetry .NET.
|
Has any work been done in this area already? I'm interested in this feature and would be happy to contribute with some PRs. |
A proposed plan of action could be:
This would only utilize components from .NET runtime, without adding any extra dependencies. |
Just some research looking into what exists now, and what possible improvements could be made to enhance the observability of the system. |
@fdcastel - I just recognized your username and thank you very much for the docker images! |
Not really. I played with replacing the current implementation Metrics is definitely something worth discussing and adding. Spans/tracing makes probably sense for command execution. Both metrics and spans need to have sensible attributes. |
Agreed. About this, Microsoft.Data.SqlClient is probably a good benchmark. |
You can start with logging from scratch. |
Quick question: Fork from here or https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient ? |
Here. |
Here are the common attributes for client metrics. |
Thanks @willibrandon. I will start to work on it now. |
I just pushed into #1200 the last "pillar of observability" that was missing (metrics). I chose not to implement all OpenTelemetry suggested metrics because, frankly, some are really questionable. But it is a good start. Have a great weekend! 😄 |
@fdcastel - Taking your changes for a run 🏃 |
I can foresee extension method APIs for /// <summary>
/// Extension method for setting up FirebirdSql.Data OpenTelemetry tracing.
/// </summary>
public static class TracerProviderBuilderExtensions
{
/// <summary>
/// Subscribes to FirebirdSql.Data activity source to enable OpenTelemetry tracing.
/// </summary>
public static TracerProviderBuilder AddFirebird(
this TracerProviderBuilder builder)
=> builder.AddSource("FirebirdSql.Data");
}
/// <summary>
/// Extension method for setting up FirebirdSql.Data OpenTelemetry metrics.
/// </summary>
public static class MeterProviderBuilderExtensions
{
/// <summary>
/// Subscribes to FirebirdSql.Data meter to enable OpenTelemetry metrics.
/// </summary>
public static MeterProviderBuilder AddFirebird(
this MeterProviderBuilder builder)
=> builder.AddMeter("FirebirdSql.Data");
} |
Regarding the extension methods, I believe the best course of action would be to create a new package This would allow the However, I've deferred this discussion once the instrumentation code is more refined. So, please give it a try in real scenarios and bring us your feedback. So far, I’ve only tested it within the Aspire Dashboard (and OpenObserve) on my end with some basic use cases. |
Will do. Initially I was motivated because I saw a gap with Aspire integrations, but now I see this could be more useful than that. Where I work we are responsible for a large and growing number of Firebird databases running in retail stores across the United States. There, I support a small team of database administrators who I know would appreciate additional metrics, logs, and traces to help them analyze our software's performance and behavior. I will try and get their feedback. |
Please note that Aspire Dashboard never intended to be a production system. Is more a "developer helper" If you want something battle tested, Seq is probably a good option. Though, of course, there are several other professional options available. |
And, on a completely unrelated note, it’s great to hear that Firebird is being utilized in large-scale operations in the U.S.! 🚀 |
First off, thank you for putting together this OpenTelemetry instrumentation proposal! I’ve done some initial testing in real scenarios, and here are a few thoughts and observations:
Overall, this is a fantastic addition and makes the Firebird ADO.NET experience much more observability-friendly. Thanks again for taking the time to implement these changes—I’m looking forward to continuing to test them out and will share more feedback as I gather more data in production environments. |
Thank you @willibrandon for the valuable feedback. 👍🏻 I will be away for the next ~10 days but I will surely address your suggestions upon my return. Meanwhile, if you can, please provide more detailed points you would like to see addressed. Whenever possible, citing sources. E.g. Where did you get that |
@cincuranet What about the creation of a new package as discussed here? |
@cincuranet Additionally, if possible, could you offer guidance on how to measure the 'time spent waiting for a connection from the pool,' as referenced by @willibrandon in the third point? |
@fdcastel Thanks for the update, and I really appreciate you taking time to review this in detail! I realize now that my mention of Sorry for any confusion that caused—your reference is spot on. I look forward to refining the implementation with the new guidance once you’re back. In the meantime, if there are any other details you’d like me to clarify or test, just let me know! |
You're not alone! 😅 When I was coding, I ended up using an old version of the document for a good chunk of it. Eventually, I caught my mistake and updated the attributes to match the latest version.
If possible, please share any other additional metrics/attributes you think are relevant for your real-world scenario. As I said earlier I tried to stick to the specs exactly, but some of them seemed pretty useless. So, I left those out -- at least until someone can show me a solid reason to include them. |
We don't need separate package. .NET has all the pieces in the box ( |
Hello, thanks for the great work.
I am working on .NET Aspire integrations for Firebird and wonder if the .NET data provider is instrumented with OpenTelemetry tracing and metrics?
The text was updated successfully, but these errors were encountered: