-
Notifications
You must be signed in to change notification settings - Fork 772
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
[otlp] Remove the Google.Protobuf / Grpc packages, and replace the logs and metrics with the new implementation #6005
[otlp] Remove the Google.Protobuf / Grpc packages, and replace the logs and metrics with the new implementation #6005
Conversation
{ | ||
Guard.ThrowIfNull(options); | ||
Guard.ThrowIfNull(httpClient); | ||
Guard.ThrowIfNull(signalPath); | ||
|
||
Uri exporterEndpoint = options.Endpoint.AppendPathIfNotPresent(signalPath); | ||
Uri exporterEndpoint; | ||
if (options.Protocol == OtlpExportProtocol.Grpc) |
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.
Added a logical condition here to honor the existing behavior.
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.
Curious how it got by tests before?
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.
New implementation was never tested on it. On the replacement we caught this issue.
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.
The actual issue was with the HTTP implementation. In the gRPC case, we append the path in all scenarios. However, for HTTP, the path is appended only if it is provided by default or through environment variables. If an endpoint is explicitly set, we do not append the path in the HTTP case, but this behavior was not being followed in new implementation.
During my initial implementation, I mistakenly assumed this was a bug and removed the check. However, there was an existing test case that validated this behavior.
exporterEndpoint = options.AppendSignalPathToEndpoint
? options.Endpoint.AppendPathIfNotPresent(signalPath)
: options.Endpoint;
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6005 +/- ##
==========================================
+ Coverage 85.15% 86.23% +1.08%
==========================================
Files 272 257 -15
Lines 12420 11690 -730
==========================================
- Hits 10576 10081 -495
+ Misses 1844 1609 -235
Flags with carried forward coverage won't be shown. Click here to find out more.
|
🎉 I do not have enough time to review it right now, but it is great to see this progress. |
It looks like the proto files are copied into two directories, unit test & benchmarks. |
...etryProtocol/Implementation/Transmission/OtlpExporterPersistentStorageTransmissionHandler.cs
Outdated
Show resolved
Hide resolved
<ItemGroup> | ||
<PackageReference Include="Grpc.Net.Client" Condition="'$(TargetFramework)' != 'netstandard2.0' AND '$(TargetFramework)' != '$(NetFrameworkMinimumSupportedVersion)'" /> | ||
<PackageReference Include="Grpc" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(NetFrameworkMinimumSupportedVersion)'" /> | ||
<PackageReference Include="Google.Protobuf" /> | ||
<PackageReference Include="Grpc.Tools" PrivateAssets="All" /> | ||
</ItemGroup> |
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.
Dropping these dependencies is probably worthy of a CHANGELOG entry? What you think @alanwest?
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.
This definitely needs to be a part of the changelog. There are few things we need to cover in the changelog, planning to cover as follow-up.
- Removal of this packages
- Breaking change on PeerServiceResolver, in one the earlier PR got feedback from you and Alan and we decided to remove this look up as we aren't aware why this logic was present https://github.com/open-telemetry/opentelemetry-dotnet/blob/84e6afbebae67f4e9b498f1702edfe4ceccf34ec/src/Shared/PeerServiceResolver.cs
- Call-out on the internal serialization change.
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.
LGTM
Fixes #5730
Design discussion issue #
Changes
Please provide a brief description of the changes here.
OpenTelemetry.Exporter.OpenTelemetryProtocol
Tests / Benchmarks
Google.Protobuf
,Grpc
,Grpc.Tools
andGrpc.Net.Client
.Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes