-
Notifications
You must be signed in to change notification settings - Fork 50
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 OpenTelemetry library and expose metrics for Witsml requests #2291
Conversation
If this is only supported with .NET 8, we will also need to update the version in the dockerfile for our internal server setup. We should also give a heads up and enough time for anyone else using Witsml Explorer that we will no longer support version 7. At least unless it's possible to only enable this when using .NET 8. |
Good call. I'm not sure if I'm able to fully test this in a .NET 7 environment since I have .NET 8 sdk installed (the Witsml library seems to support multiple versions, currently .NET 6 and 7 although I added .NET 8 in this PR). I'll see if I can create a dummy .NET 7 project and reference a locally built witsml package and see how it goes. That being said, .NET 8 is the latest LTS release and should be favored over .NET 7. I've also added a PR for updating to .NET 8 here: #2293 |
6095b84
to
517e43f
Compare
This PR also fixes an issue with duplicate references in Witsml.csproj that was not discovered in the previous PR (#2293). Discovered in the action that builds and publishes the package after merge. |
…ceptions are thrown in the fetch methods
3f6d6a3
to
60f3978
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Read issue and PR
- Pulled branch and manually tested
- Verify that PR resolves issue
- Reviewed the code
Fixes
#2290
Implements OpenTelemetry metrics:
Description
The histogram has been set up with the following buckets: 0.5, 1, 3, 5, 10, 15, 30 and 60 seconds.
When used in an application using the library, the metrics can be added within the
AddOpenTelemetry
method added by the OpenTelementry SDK:Example from prometheus export:
All metrics are tagged with host, method and objectType. If available, resultCode is also added as a tag.
Note: This has only been tested in a .NET 8 application.
Type of change
Impacted Areas in Application
Checklist:
Communication
Code quality
Test coverage