Skip to content
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

[EXPORTER] Async exporting for otlp grpc #2407

Merged

Conversation

owent
Copy link
Member

@owent owent commented Nov 15, 2023

Fixes #2406

Changes

  • Add arena for OTLP exporters.
  • Add async exporting for OTLP gRPC exporter, and move data lifetime with RPC calls.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@owent owent requested a review from a team November 15, 2023 13:13
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (497eaf4) 87.12% compared to head (d86cb39) 87.09%.
Report is 2 commits behind head on main.

❗ Current head d86cb39 differs from pull request most recent head 37f7dbd. Consider uploading reports for the commit 37f7dbd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2407      +/-   ##
==========================================
- Coverage   87.12%   87.09%   -0.02%     
==========================================
  Files         200      200              
  Lines        6109     6103       -6     
==========================================
- Hits         5322     5315       -7     
- Misses        787      788       +1     

see 3 files with indirect coverage changes

@owent owent changed the title [WIP] Async exporting for otlp grpc exporter Async exporting for otlp grpc exporter Nov 16, 2023
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

It will take me several review passes to go over this change,
please find a first batch of comments for now.

exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_exporter.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_log_record_exporter.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_log_record_exporter.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_metric_exporter.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_metric_exporter.cc Outdated Show resolved Hide resolved
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work.

Please find here more comments / questions.

exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Show resolved Hide resolved
exporters/otlp/src/otlp_grpc_client.cc Show resolved Hide resolved
@owent
Copy link
Member Author

owent commented Jan 10, 2024

Ping - do we need to support GRPC < 1.39, or can we just document a recent GRPC is needed instead ?

@marcalff It would be better if we can suppor a low version of gRPC. We have some project with old toolchains which can only use gRPC 1.33.

@marcalff
Copy link
Member

Ping - do we need to support GRPC < 1.39, or can we just document a recent GRPC is needed instead ?

@marcalff It would be better if we can suppor a low version of gRPC. We have some project with old toolchains which can only use gRPC 1.33.

Thanks for the clarification. Resolved then.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, thanks for the fix.

I will not pretend I know grpc async in depth to fully appreciate the code here.
The patch looks good to me, based on my limited knowledge of this area.

Given the patch size, a second opinion is needed.

@marcalff marcalff added the pr:please-review This PR is ready for review label Jan 10, 2024
@marcalff
Copy link
Member

@lalitb @ThomsonTan @esigo

Added the please review label, for a second review.

@marcalff marcalff changed the title Async exporting for otlp grpc exporter [EXPORTER] Async exporting for otlp grpc Jan 10, 2024
@@ -23,6 +23,8 @@ namespace exporter
namespace otlp
{

class OtlpGrpcClient;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be moved to otlp_grpc_exporter_options.h as a central place?

Copy link
Member Author

@owent owent Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users use the factory and otlp_grpc*_options.h to create OTLP gRPC exporters, but I think users do not need to know the internal class OtlpGrpcClient?

Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @owent for yet another great work.
I had a minor question only.

@ThomsonTan ThomsonTan merged commit 6e8f7c4 into open-telemetry:main Feb 8, 2024
47 checks passed
@owent owent deleted the async_exporting_for_otlp_grpc_exporter branch February 27, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:please-review This PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async exporting for OTLP gRPC exporter
4 participants