-
Notifications
You must be signed in to change notification settings - Fork 127
Conversation
✅ Build jaeger-client-cpp 30 completed (commit 0d5d404a6f by @mdouaihy) |
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.
It would be good to add an integration test for HTTP sender, similar to how it's done in the Java client:
|
||
} // anonymous namespace | ||
|
||
ThriftTransport::ThriftTransport(const net::IPAddress& ip, |
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.
I am not sure about this renaming. Thrift is an encoding, not a transport. UDP vs. HTTP are the transports (although we call the "senders").
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.
I agree, Thrift is just the encoding.
Knowing that it creates a thrift::Batch from a span and sends it to a sender to be sent. What do you suggest as naming? ThriftSender?
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.
I renamed it to ThriftSender because it takes and Span and transform it to ThriftSpan and flush it via a UDP/Http sender.
What do you think?
{ | ||
} | ||
|
||
ThriftTransport::ThriftTransport(const net::URI& endpoint, |
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 looks like an unnecessary abstraction leak of the sender implementation into this class. Why not just accept sender as a ctor argument?
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.
Indeed. You're right. The config will now build the actual sender and pass it as argument to the ctor.
src/jaegertracing/utils/HttpSender.h
Outdated
uint8_t* data = nullptr; | ||
uint32_t size = 0; | ||
_buffer->getBuffer(&data, &size); | ||
if (static_cast<int>(size) > _maxPacketSize) { |
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.
a) how is _maxPacketSize defined for HTTP?
b) does it matter if it's exceeded?
Also, I haven't looked into Sender implementation here, but in other clients (e.g. Go), senders simply don't reach the state where a buffer is overflowed and spans must be dropped, because sender would flush previous spans if append(span)
exceeds msg size. But again, this only makes sense for UDP because of fragmentation, it's not very relevant to HTTP (i.e. +/- extra span, who cares)
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.
Indeed, this should not happen.
As for the max value, it's the same as the Java implementation.
This limit is now used only to know when to flush.
✅ Build jaeger-client-cpp 33 completed (commit 318c05a84f by @mdouaihy) |
Integration test added. |
a077dd8
to
778793c
Compare
✅ Build jaeger-client-cpp 34 completed (commit f366a79b94 by @mdouaihy) |
@@ -14,4 +14,4 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
#include "jaegertracing/Transport.h" | |||
#include "jaegertracing/Sender.h" |
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.
what's the purpose of this Transport.cpp
?
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.
Oh, this file was not renamed automatically when I renamed the class. should be fixed.
a58a55e
to
7e7bed6
Compare
✅ Build jaeger-client-cpp 36 completed (commit b3863274ab by @mdouaihy) |
✅ Build jaeger-client-cpp 37 completed (commit 0a61db7674 by @mdouaihy) |
@yurishkuro. any additional remarks on this PR? |
@mdouaihy could you resolve the conflicts / merge master? |
Support an HTTP Sender that allows to connect directly to a Collector. For instance, authentication is not supported. Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
* Rename ThriftTransporter to ThriftSender * Add Integration Test for http Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
7e7bed6
to
53a2f88
Compare
✅ Build jaeger-client-cpp 40 completed (commit 67c94429f1 by @mdouaihy) |
Hi @yurishkuro, I rebased the PR to the latest commit. |
hi @yurishkuro, anything missing to merge this PR? |
@mdouaihy the readme only seems to mention a file-based configuration. Does this support env var configuration like JAEGER_ENDPOINT, per https://www.jaegertracing.io/docs/1.14/client-features/ ? |
@yurishkuro, this implementation does not support configuration via the env variable, neither for the agent nor for the collector. We can work on supporting that if you think it's important. |
Not sure how critical it is if nobody asked so far. I booked a ticket anyway: #178 |
Support an HTTP Sender that allows to connect directly to a Collector.
For instance, authentication is not supported.
Signed-off-by: FR-MUREX-COM\mchaikhadouaihy mehrez.douaihy@gmail.com
Which problem is this PR solving?
Short description of the changes