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

export opentelemetry spans with batch processor #6733

Closed
wants to merge 3 commits into from

Conversation

theoclark
Copy link

We have observed slowdowns of up to 50% when running tritonserver with opentelemetry. We have traced this to the SimpleSpan Exporter and have observed these slowdowns go away when switching to the BatchSpanProcessor.

@@ -48,6 +48,9 @@ namespace otel_resource = opentelemetry::sdk::resource;

namespace triton { namespace server {

static const int EXPORT_QUEUE_SIZE = 5000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to make these options configurable through cmdline args?

@@ -40,6 +40,8 @@
#include "opentelemetry/sdk/resource/resource.h"
#include "opentelemetry/sdk/trace/processor.h"
#include "opentelemetry/sdk/trace/simple_processor_factory.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are removing SimpleProcessFactory, then it makes sense to remove this input

Copy link
Contributor

@oandreeva-nv oandreeva-nv left a comment

Choose a reason for hiding this comment

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

Hi @theoclark , thank you for this PR! Left some comments. May I also ask you to write some tests for your code? Open telemetry tests are located here: https://github.com/triton-inference-server/server/tree/main/qa/L0_trace. Could you please also send us a signed CLA?

@oandreeva-nv oandreeva-nv self-assigned this Dec 26, 2023
@theoclark
Copy link
Author

Hi @theoclark , thank you for this PR! Left some comments. May I also ask you to write some tests for your code? Open telemetry tests are located here: https://github.com/triton-inference-server/server/tree/main/qa/L0_trace. Could you please also send us a signed CLA?

Thanks for the review, will make some changes. I work for Speechmatics and I believe we've already signed the CLA? Any specific tests you had in mind?

@oandreeva-nv
Copy link
Contributor

Thanks for the review, will make some changes. I work for Speechmatics and I believe we've already signed the CLA? Any specific tests you had in mind?

Got it, thanks for letting me know about CLA. Regarding tests. Basically, it would be nice to add the following tests:

  • Tests for setting new cmdline args. E.g. test for small queue size (3 or 4) and see if OTEL collector collects all 4 traces only after Triton receives 4 traces. Let me know if it makes sense.
  • Existing tests need adjustments. Since we are removing Simple Span Processor, current tests will fail, unless the default values for BatchSpanProcessor are set to imitate SimpleSpanProcessor.

@oandreeva-nv
Copy link
Contributor

Hi @theoclark , I've pushed a PR, which has a major refactor for tests: #6785

If you are interested, I can pick up this PR as well and add tests myself.

@theoclark
Copy link
Author

Hi @oandreeva-nv, thanks that would be great. Hadn't got around to writing the tests myself.

@theoclark
Copy link
Author

@oandreeva-nv we've also noticed in other parts of our code that exporting traces across HTTP can have more of an impact on performance than gRPC. Is there a reason tritonserver uses HTTP over gRPC that I'm not aware of?

@oandreeva-nv
Copy link
Contributor

@theoclark There was a limited scope of what we could implement initially. gRPC is on our roadmap for implementation. I'll try to make it happen in 24.02 release, since there is one more ask for gRPC exporter

@oandreeva-nv
Copy link
Contributor

Hi @theoclark , I'll close this PR since #6842 was merged, and it includes your commits from this PR and mentions you as a co-author

@theoclark
Copy link
Author

Thanks @oandreeva-nv for your work on this. Great that it's been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants