-
Notifications
You must be signed in to change notification settings - Fork 783
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
[bug] Grace Dependency Injection + Otel > 1.7.0 = Exception #5803
Comments
@secovel - Do you know if the library Calling
|
Grace doesn't have any OpenTelemetry references or specific coding. The line of code that triggers the issue is just telling Grace to populate the DI container. Worked fine in every version up till 1.8. I haven't debugged far enough into the Container code to see exactly what is triggering the exception. I was reading some other issues, seems like it could be related to This Unity Container thread? Is there a way to turn off the check that was implemented in 1.8 that is causing the code to fail completely? Or perhaps implement the change recommended in that thread. |
@CodeBlanch - Any insights on this? |
Looks like that is exactly the problem. I see a registration of a concrete type where it should probably be an interface, then the guard code wouldn't be triggered. |
I haven't looked at Grace yet. First I've ever heard of it 🤣 My guess would be it is the same issue as the Unity one linked above. When using M.E.DI if you call I'll see if there is maybe another API which works more consistently, if adding a private ctor or something will fix this, otherwise we can go to an interface registration. The bigger issue I have here is trying to prevent future issues/regressions. We don't want to have CI covering every possible DI container which exists or may exist and we don't want to spend our valuable time chasing down issues in components which are not widely used 🤔 |
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
Runtime Version
net6.0, net8.0
Description
When using the Grace Dependency Injection container with any version of OTEL beyond 1.7.0, I get an exception.
Steps to Reproduce
Program.cs
Expected Result
The service should start, and the /hello endpoint returns "hello"
Actual Result
The service fails to start, and I get the following exception:
Additional Context
This combo has been working since the early Otel days, only recent versions have stopped working. Otel 1.7.0 now has a medium vulnerability so management is looking to move to a newer version soon.
The text was updated successfully, but these errors were encountered: