Skip to content

Cocurrency otlp http session - #1317

Merged
lalitb merged 21 commits into
open-telemetry:async-changesfrom
owent:cocurrency_otlp_http_session
May 11, 2022
Merged

Cocurrency otlp http session#1317
lalitb merged 21 commits into
open-telemetry:async-changesfrom
owent:cocurrency_otlp_http_session

Conversation

@owent

@owent owent commented Apr 5, 2022

Copy link
Copy Markdown
Member

Fixes #1243

Changes

  • Using curl_multi_handle to improve performance of curl::HttpClient
  • Keep the same behavior as before when using curl::HttpOperation::Send (sync mode), only malloc async data and bind curl_easy_handle to curl_multi_handle for curl::HttpOperation::SendAsync.
  • Add background thread to call curl_multi_perform and curl_multi_poll in curl::HttpClient, and if no more pending request, the thread will exit and we will create background thread again if there are more requests in the future.
  • Do not use system close(fd) to abort request, use curl_multi_wakeup() to wakup and do the real removing the the background thread.Also we allow to break connecting, sending or receiving data from callback of curl.

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 April 5, 2022 08:23
@owent

owent commented Apr 5, 2022

Copy link
Copy Markdown
Member Author

While #1309 is already merged, why there still is only one check here?

@lalitb

lalitb commented Apr 5, 2022

Copy link
Copy Markdown
Member

While #1309 is already merged, why there still is only one check here?

Probably the event is triggered form the workflow file present in the branch where merge is happening, which in this case is async-changes branch :)

@owent

owent commented Apr 6, 2022

Copy link
Copy Markdown
Member Author

While #1309 is already merged, why there still is only one check here?

Probably the event is triggered form the workflow file present in the branch where merge is happening, which in this case is async-changes branch :)

Thanks, I merged main branch, and it works now.

@codecov

codecov Bot commented Apr 6, 2022

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (async-changes@c614258). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##             async-changes    #1317   +/-   ##
================================================
  Coverage                 ?   91.08%           
================================================
  Files                    ?      221           
  Lines                    ?     8618           
  Branches                 ?        0           
================================================
  Hits                     ?     7849           
  Misses                   ?      769           
  Partials                 ?        0           

@lalitb

lalitb commented Apr 6, 2022

Copy link
Copy Markdown
Member

Thanks, I merged main branch, and it works now.

Looks like this has messed up the PR, I see 56 files modified :).

@owent
owent force-pushed the cocurrency_otlp_http_session branch from 403a87e to 9af4aa1 Compare April 6, 2022 05:12
@owent

owent commented Apr 6, 2022

Copy link
Copy Markdown
Member Author

Thanks, I merged main branch, and it works now.

Looks like this has messed up the PR, I see 56 files modified :).

I have merged main branch, it has a lot change between async-changes and main. Maybe I should create a PR to merge main to async-changes first and then create this PR?

@lalitb

lalitb commented Apr 6, 2022

Copy link
Copy Markdown
Member

Thanks, I merged main branch, and it works now.

Looks like this has messed up the PR, I see 56 files modified :).

I have merged main branch, it has a lot change between async-changes and main. Maybe I should create a PR to merge main to async-changes first and then create this PR?

Yes I think that would be better. Sorry about all this trouble.

@owent
owent force-pushed the cocurrency_otlp_http_session branch from 9af4aa1 to 05714bb Compare April 6, 2022 06:22
@owent

owent commented Apr 6, 2022

Copy link
Copy Markdown
Member Author

I have merged main branch, it has a lot change between async-changes and main. Maybe I should create a PR to merge main to async-changes first and then create this PR?

This PR is base on #1321 now, I think the change list will be simple after #1321 is merged.

@owent
owent force-pushed the cocurrency_otlp_http_session branch 2 times, most recently from d41c122 to 8628b63 Compare April 6, 2022 07:54

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we trying to assign here instead of using "==" here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes and thanks.it's fixed now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not clear why are we assigning a new thread id here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not necessary, but I think it's more clear to reset callback_thread after callback is finished.

@owent

owent commented Apr 28, 2022

Copy link
Copy Markdown
Member Author

I will add max_sessions_per_connection option for all OTLP HTTP exporters after #1306 is merged.

owent added 4 commits May 5, 2022 11:26
…o_async_changes

Signed-off-by: owent <admin@owent.net>

# Conflicts:
#	sdk/include/opentelemetry/sdk/metrics/aggregation/sum_aggregation.h
#	sdk/include/opentelemetry/sdk/metrics/data/point_data.h
#	sdk/include/opentelemetry/sdk/metrics/metric_exporter.h
#	sdk/include/opentelemetry/sdk/metrics/metric_reader.h
#	sdk/include/opentelemetry/sdk/metrics/state/sync_metric_storage.h
#	sdk/test/metrics/sync_metric_storage_test.cc
Signed-off-by: owent <admin@owent.net>
Signed-off-by: owent <admin@owent.net>
@owent
owent force-pushed the cocurrency_otlp_http_session branch from dc16ad1 to 8e603fd Compare May 5, 2022 04:40
Signed-off-by: owent <admin@owent.net>
@owent
owent requested a review from DebajitDas May 5, 2022 06:18
@owent

owent commented May 5, 2022

Copy link
Copy Markdown
Member Author

@lalitb This PR is ready to be reviewed now. The Performance Alert is expired and please just ignore them.

@lalitb

lalitb commented May 6, 2022

Copy link
Copy Markdown
Member

@lalitb This PR is ready to be reviewed now. The Performance Alert is expired and please just ignore them.

Thanks @owent. Will review this over the weekend.

@DebajitDas DebajitDas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lalitb

lalitb commented May 11, 2022

Copy link
Copy Markdown
Member

@owent one test is failing. Can we fix that before merging to feature branch.

@owent

owent commented May 11, 2022

Copy link
Copy Markdown
Member Author

@owent one test is failing. Can we fix that before merging to feature branch.

Done. The failed test is network error. I have click rerun and it pass now.

@lalitb
lalitb merged commit 08a12b5 into open-telemetry:async-changes May 11, 2022
@lalitb

lalitb commented May 11, 2022

Copy link
Copy Markdown
Member

Merging it now. Are we good to raise PR from feature branch to main?

@owent
owent deleted the cocurrency_otlp_http_session branch May 16, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants