-
Notifications
You must be signed in to change notification settings - Fork 775
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
feat: Fail fast when insecure channel is not configured for .NET Core 3.1 with gRPC #2691
Conversation
… 3.1 Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Finalizing running tests locally as well, but feel free to trigger the CI for this as well. |
...Telemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpExportClient.cs
Outdated
Show resolved
Hide resolved
...Telemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpExportClient.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Tom Kerkhove <[email protected]>
...Telemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpExportClient.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Tom Kerkhove <[email protected]>
I have not tested the HTTP protocol properly
Codecov Report
@@ Coverage Diff @@
## main #2691 +/- ##
=======================================
Coverage 83.81% 83.82%
=======================================
Files 250 251 +1
Lines 8817 8828 +11
=======================================
+ Hits 7390 7400 +10
- Misses 1427 1428 +1
|
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
This has not been my best PR, sorry @pellared 🤦♂️ |
...metry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpHttpExportClient.cs
Outdated
Show resolved
Hide resolved
...metry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/BaseOtlpGrpcExportClient.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
@pellared As you can see the build directive is not respected in https://github.com/open-telemetry/opentelemetry-dotnet/runs/4350754547?check_suite_focus=true As per https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#conditional-compilation you'll notice that |
I see but now it fails on .NET Core 3.1 🤦 |
Signed-off-by: Tom Kerkhove <[email protected]>
Ok so I see the issue here, I think, is that while the Docker Compose file is getting the correct target framework & SDK version (https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/docker-compose.netcoreapp3.1.yml#L7-L8), it is using a .NET 6 base image:
So that means that the directive that I've switched back to per #2691 (comment) is not available and thus not running the new validation. So I'd suggest going back to using this:
|
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Changed it already but of course the check is now failing for .NET Framework. Chatted with @pellared offline and he raised a valid concern - Given we use .NET 6 as a base image we might have other .NET Core 3.1 build directives that are being ignored. What I would propose, @cijothomas, would be to:
That way we explicitly target this to only run for .NET Core 3.1, and be able to test this. |
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
The test is still failing and I will check tomorrow; |
If I were to guess it's the enabling of the switch by this test that causes a conflict with the It's probably safe to just remove the |
This must have been my worst PR ever, but hey, it looks like we are ready :) Thanks for the help! |
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.
Is it not worth creating an issue to remove this feature when .NET Core 3.1 is no longer supported?
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/ExporterClientValidationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/ExporterClientValidationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/ExporterClientValidationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpExporterOptionsExtensionsTests.cs
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpTraceExporterTests.cs
Show resolved
Hide resolved
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
PTAL @pellared, @alanwest and @cijothomas |
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/ExporterClientValidationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/ExporterClientValidationTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpExporterOptionsExtensionsTests.cs
Outdated
Show resolved
Hide resolved
@pellared are those the final remarks or do you want to do a full review? I'm happy to keep on changing things but at some point we'll need to just complete the review. |
I made a full review. That is also why I approved the PR. |
Signed-off-by: Tom Kerkhove <[email protected]>
Thanks. |
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
Any thoughts on this @cijothomas ? |
Signed-off-by: Tom Kerkhove [email protected]
Fixes #2690.
Changes
Fail fast when unsecure channel is not configured for .NET Core 3.1 which is required for the OTLP exporter to work correctly.
This was not configured correctly and costed me a few hours to remind myself to configure this.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes[ ] Design discussion issue #[ ] Changes in public API reviewed