Comments (14)
Interesting. I'm strongly considering another approach for you instead of using system-wide packages. The few I can think of are: wget/curl from archives and submodules. Any reason not to do that instead?
from jaeger-client-cpp.
from jaeger-client-cpp.
To be honest, the only reason I developed this library the current way is to allow for rapid development. Using apt-get
makes it very difficult to port to Mac, etc. Hunter produces the same build on all supported platforms. So I'm definitely interested in enlarging the scope of Jaeger C++ to allow for deb/rpm. However, I would like to keep Hunter as default because it makes building so much easier for the casual developer.
Meanwhile, the idea of Jaeger C++ being a library/platform level library does bother me. Especially, considering the use of C++11 in C executables, which no one loves. If we really want a lowest common denominator utility, we should push forward the idea of opentracing-c and follow up with jaeger-c. That library would be painful to develop, but probably much easier to link in with the classic C/C++ development environment, and have much less bloat.
My final point, think of Jaeger C++ as a project with a lot of room for improvement. The basic proof of concept is here and it works in production, but compatibility could be extended to other platforms and build systems. I am totally open to hearing about features you'd like, and better yet, seeing pull requests with initial implementations.
from jaeger-client-cpp.
Certainly no complaint about Hunter as default. I can see how it's handy for development, for container based work, etc. Though it'd be much, much more useful if you could do something like
cmake -DCMAKE_INSTALL_PREFIX=/opt/jaeger-cpp -DHUNTER_ENABLED=1 -DHUNTER_INSTALL_DEPENDENCIES=1
make
make install
and get everything Hunter built as well as jaeger-cpp its self. So you can use it from other apps that may in turn not be able to use Hunter. Or where the user doesn't have the time/knowledge to convert the app's build system to use Hunter and just wants to use jaeger-cpp. Big barrier to entry there. (That's what I was getting at with #44)
I don't have a huge problem with thunking C++11 into C. It's awkward and annoying, but less so than writing a whole new library and API. Sure, if it massively takes off, that might make sense, but for now just making the C++ lib play a bit better with local installs (and documenting it) would be enough IMO. That's what I've been trying to do here, but am running out of time. I can keep working on it if you're OK with committing to maintaining a degree of lib version compatibility going forward, but otherwise need to drop it here.
Definitely no time to write a pure C client.
Working on it re doing the work and actually sending pulls. I'm trying to help not just complain. Lots to learn and figure out as I go given I've never met this Hunter tool before - a sort of Maven for C. And that jaeger-cpp hasn't had to care about dependency versions or compatibility so there are lots of unknowns there.
from jaeger-client-cpp.
I am willing to agree to that. Good work so far!
from jaeger-client-cpp.
@ringerc you've inspired me to begin a minimal client in C. This is a side project so can't guarantee anything about if/when it will be completed. Nonetheless, this might be more along the lines of what you wanted: jaeger-c-client.
from jaeger-client-cpp.
@isaachier Cool. I wasn't asking you to, and I've been trying to do what I can to help make the C++ one usable from C. IMO it's OK enough, the problems are related to builds and library management more than language. Thunking from C++ to C is ugly but manageable.
from jaeger-client-cpp.
The bigger problem has been Hunter, specific Thrift and json library dependencies not widely packaged, etc.
Sure, some folks will whine about C++, and I won't pretend it's a joy to work with in a C project, but that's not where the main challenges have been.
from jaeger-client-cpp.
I find C makes tends to be better as a base layer especially when considering language bindings. C99 compiles pretty much anywhere unlike C++11. The C library is more of a challenge for me to implement a bare bones client with as few dependencies as possible.
from jaeger-client-cpp.
@isaachier So long as you're happy :)
I imagine it'd do good things for adoption if it's easy to plug in, mind.
Here are some things I'd be considering, if I were the one doing the work. But since I'm not putting my hand up for that part, feel free to ignore everything I say! I have my hands full trying to get the C++ lib usable for my needs and getting some mergable pulls together for you.
Anyway, considerations in a C infrastructure lib:
-
exposing
jaeger_malloc()
andjaeger_free(...)
wrappers formalloc()
andfree()
. Memory allocated in the client to be freed by jaeger should be allocated withjaeger_malloc()
; memory allocated by jaeger to be freed by the client should be freed withjaeger_free()
. This ensures you can ensure you use the same C library to free memory returned by jaeger c-client as was used to allocate it. Important for Windows. Standard pattern for C libraries. -
Allocator wrappers should be function pointers so applications can replace the allocator used by jaeger-cpp.
-
Minimising allocations by letting the client pass pointers to pre-allocated, possibly on-stack, memory where possible. Lets client apps manage memory lifetimes if they have their own allocators (e.g. PostgreSQL
palloc
/MemoryContextAlloc
, Samba'stalloc
, etc. And lets client apps integrate their own memory statistics. -
Low cost of trace before the "should I send this" decision is made so hot paths can be traced. Preferably avoiding heap allocations before sampler/filter decisions are made.
-
Shameless use of
static inline
functions and macros to minimise overheads. (This is one area C++ rocks, I miss inline template functions so much when I write C). -
Doesn't call abort(). Ever.
from jaeger-client-cpp.
If you check out the repo, the alloc.h header allows you to replace the Jaeger allocator. Before joining Uber, used to work at Bloomberg where they rewrote the STL with custom allocators, so I understand the importance of that. Otherwise, all sound like good suggestions I will use going forward.
from jaeger-client-cpp.
Thanks.
Closing this issue. I've had a look at the changelog between 2.0.2 and 2.1.0 in nlohmann json and it's huge. I have no chance of figuring out what's needed to make jaeger cpp-client work with 2.0.2. There are changes to assignment operators and conversion support, tons of things.
I suggest documenting a current required version and sticking to it for a while; the world will catch up. And it's a header-only library so the usual issues with packaging aren't such a concern.
from jaeger-client-cpp.
BTW, rewrote the STL o_O ? Seems an odd choice given std::allocator
and the way the templates all take allocator arguments. Presumably issues with the pre-c++11 requirement that custom allocators must be stateless.
But gee. I thought PostgreSQL liked wheel reinvention. That's a new level.
from jaeger-client-cpp.
Agreed about the plan for libs and will document eventually :/.
BSL is a big debate there. Now that you mention it, who do you think was behind that C++11 change to the standard? Bloomberg engineers wrote the proposal: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2554.pdf. Anyway, I didn't use any scoped allocators in the Jaeger code so no issue here.
from jaeger-client-cpp.
Related Issues (20)
- Provide access to context HTTP Header name
- Jaeger 32 bit C/C++ client required
- QUESTION: Can not use with hunter manager
- how to release version to real scene
- Unit test: Socket.testFailBind fails when run as "root" HOT 6
- Can we please ditch hunter HOT 1
- Enable ppc64le arch for jaeger-client-cpp
- Unable to build windows in a pipeline.
- Add support for adding tracer tags via config yaml HOT 1
- My jaeger version is 1.23, and the jaeger-collector component has enabled --sampling.strategies-reload-interval, but the collected logs show that the sampling strategy is still old HOT 4
- Envoy - failed to load dynamic library opentracing versions are incomptable
- `RemoteReporter::report()` is blocked
- Default queue size & buffer flush interval are not used when reading configuration from YAML
- Issue facing while trying to build jaeger-client-cpp
- Compilation issue on Ubuntu 20.04 HOT 2
- When the sampling type is rate, the number of actual results is equal to the number of threads multiplied by the configured rate parameter
- warning const' was hidden [-Woverloaded-virtual] when using jaeger client with opentracing libraries
- Enablement TravisCI integration for IBM ppc64le architecture HOT 1
- Deprecate Jaeger C++ SDK HOT 3
- [Bug]: W3C Propagation is wrongfully encoding debug span flag into traceparent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaeger-client-cpp.