-
Notifications
You must be signed in to change notification settings - Fork 189
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
Performance counters based on Event Source in .NET Core #195
Comments
Not immediately. There haven't been too many people asking yet for this feature. If developers upvote the Event counters enhancement, then the ODP.NET team will make it a priority to add to a future release. Previously, developers asked for the more traditional counters support via System.Diagnostics, which is available in ODP.NET Core on Windows today. |
Should developers upvote current issue? |
Yes, if it's something they want. I believe that's how organizations gauge the desirability of each feature request. The number of upvotes and comments informs me and the Oracle .NET dev team which features developers want the most. |
Is there an alternative to being able to monitor performance on a .net core application running managed data access? I'd like to start monitoring some oracle parameters under load and don't know if this is something that should even be possible. |
@ronnyek You can use ODP.NET Core performance counters on Windows with System.Diagnostics. |
Would this be based on this example? Do I really need an app.config with a .net core application? If not is there another way to tell the oracle drivers to enable the performance counters? (I ran the powershell scripts to register the counters with windows, and can see them in performance monitor, just need to know how to tell my app to enable them) |
For .NET Core, you wouldn't use app.config. You can set which counters to enable with the |
appreciate this response... hope it helps others too! Thanks again |
I noticed I cant add these performance counters to performance monitor... they show up, but selecting them and hitting add doesn't actually add them.
And may be completely unrelated, but I notice other counters reference a dll with the same name, but include a relative path like so:
Should I need to do anything special? I tried rebuilding registry etc, but still seems like perfmon is aware of the counters, just wont let me add them to an existing session |
Run the ODP.NET Core app and leave it running. Go to PerfoMon and select the counters you're interested in. In the Instances window, you should see the app process. Select that process to monitor the counters. You can see what the experience is supposed to be like by watching the second half of this video. |
Managed ODP.NET and ODP.NET Core plan to support .NET Metrics in lieu of event counters. Metrics has fewer limitations than event counters. |
@alexkeh What's the timeline for metrics support? Oracle Support indicated to us this would be included in 23c. |
@mike-geiger The plan is to include .NET metrics support early in 2024. It will be part of ODP.NET 23c. The specific minor version to include it with hasn't been decided yet. |
Managed ODP.NET and ODP.NET Core 23.3.2 is now available on NuGet Gallery with .NET Metrics support. |
Am I able to enable the PerformanceCounters using my dotnet core web application through web.config or is it only available changing the code using the OracleConfiguration class? |
web.config is a .NET Framework construct. .NET Core doesn't recognize web.config. ODP.NET .NET Metrics are automatically enabled. When an ODP.NET app starts, the metric counters are available in memory. To access the counters, you need an app to be an active subscriber. |
Thanks Alex, I believe the usage with the change on the registry for windows also incurs into .NET Framework only, am I right?. So , for dotnet Core we need to implement the subscription using the OracleConfiguration class explicitly in the code. Is it right? |
I think you're mixing the two different ODP.NET connection stats: Performance Counters and .NET Metrics. .NET Metrics never had any Registry config; Perf Counters did. Perf Counters could also be registered in .NET config files. ODP.NET Core also support Perf Counters with .NET Metrics does not require any ODP.NET-specific settings to be set. It is mutli-platform and the long term method MS recommends for .NET apps. It is well-integrated with OpenTelemetry. There are optional ODP.NET settings that can be used, such as setting the pool name so that it's easier to distinguish which pool is being measured in a graph. |
Thanks for clarifying it Alex, I was actually referring to the Perf Counters, which provides info like: 'NumberOfPooledConnections' or 'NumberOfActiveConnections'.
<configuration>
(...)
<oracle.manageddataaccess.client>
<version number="*">
<settings>
<setting name="PerformanceCounters" value="4095"/>
</settings>
</version>
</oracle.manageddataaccess.client>
(...)
</configuration>
public void Configure(IApplicationBuilder app, ........
(...)
OracleConfiguration.PerformanceCounters = 4095;
OracleConfiguration.TraceFileLocation = @"c:\oracle-trace";
OracleConfiguration.TraceLevel = 7; Am I missing something? I mean, with a dotnet core webapp, are there any way of configuring it to be able to monitor on 'perfmon' without having to do the option 3? |
In the future, create a new issue. This thread is about EventCounters and .NET Metrics, which is what I thought you were asking about. .NET Core doesn't look at the Registry nor .NET config files. Programmatic enablement is the only way. However, you can create your own application configuration file with a numeric setting. Perf Counters support is not very strong in .NET Core and will likely remain that way. MS intends for .NET Metrics to be the method to track counters in .NET Core. |
Are there plans about implementation performance counters based on Event Source?
SqlClient Data Provider for SQL Server already have it: dotnet/SqlClient#719
The text was updated successfully, but these errors were encountered: