Comments (11)
Try updating the config.yml to look something like this:
sampler:
samplingServerURL: <collector-url>
By default, the value of <collector-url>
is 127.0.0.1:5778
.
from jaeger-client-cpp.
@isaachier I suggest adding a section to the readme
from jaeger-client-cpp.
@isaachier
I tried with that but it's ignoring the sampling URL and stills sends the traces to localhost:9411
my config file looks like this:
disabled: false
reporter:
logSpans: true
sampler:
type: const
param: 1
samplingServerURL: zipkin.istio-system.svc.cluster.local:9411
Also is there any way to see logs of what the library is doing? I can't see any error logs if I stop the localhost jaeger.
from jaeger-client-cpp.
The default logger is noop. You can change it by passing the consoleLogger to the Tracer constructor. See here: https://github.com/jaegertracing/jaeger-client-cpp/blob/master/src/jaegertracing/Logging.h, https://github.com/jaegertracing/jaeger-client-cpp/blob/master/src/jaegertracing/Tracer.h.
from jaeger-client-cpp.
I was doing that, but I can only see the traces I generate, but no errors about contacting the collector
void setUpTracer(const char* configFilePath)
{
auto configYAML = YAML::LoadFile(configFilePath);
auto config = jaegertracing::Config::parse(configYAML);
auto tracer = jaegertracing::Tracer::make("followers-service", config, jaegertracing::logging::consoleLogger());
opentracing::Tracer::InitGlobal(std::static_pointer_cast<opentracing::Tracer>(tracer));
}
And I see something like this
Followers Service starting...
Initializing Jaeger tracing...
INFO: Initializing logging reporter
INFO: Reporting span f218f30d30fd823b:4e0db680f75733dc:f218f30d30fd823b:1
INFO: Reporting span f218f30d30fd823b:f218f30d30fd823b:0:1
from jaeger-client-cpp.
The collector manages the sampling strategy. The agent forwards traces to the collector from your application. It seems you meant to change the agent endpoint. That requires updating the reporting config, not the sampling config. Please override the localAgentHostPort property of the reporter section like so:
reporter:
logSpans: true
localAgentHostPort: <agent-host-port>
from jaeger-client-cpp.
Final thought: you might have the correct setup in your application, but your agent might experience errors when it sends traces to an invalid endpoint. See the main Jaeger repo for how to set up the agent etc.
from jaeger-client-cpp.
Will do, thanks a lot for your help @isaachier
from jaeger-client-cpp.
No problem, I'll try to add some stuff to the README about this.
from jaeger-client-cpp.
reporter:
logSpans: true
localAgentHost: 10.244.1.140
localAgentHostPort: 6832
Setting yml like this, throws an error:
Running main function
terminate called after throwing an instance of 'std::runtime_error'
what(): Cannot connect socket to remote address { family=2, addr=0.0.26.176, port=0 }
Aborted (core dumped)
Kindly help @isaachier , how can I define agentHost, agentPort?
from jaeger-client-cpp.
@tarunz you pass the host and port in the same parameter:
localAgentHostPort: 10.244.1.140:6832
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.