You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
I am new to opentracing and would like to use it, to get tracing around various microservices which we built (mostly using node).
To start with I tried to build a hello-world service using jaeger-client-node (code snippet) attached.
Below are the steps done:
Docker around Jaeger Tracing
sudo docker run -d -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778 -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest
Here is the below code which I am trying to run to get opentracing work
varrestify=require('restify');varinitTracer=require('jaeger-client').initTracer;varbunyan=require('bunyan');varlogger=bunyan.createLogger({name: 'hello-world'});// See schema https://github.com/uber/jaeger-client-node/blob/master/src/configuration.js#L37varconfig={'serviceName': 'hello-world'};varoptions={'tags': {'hello-world.version': '1.1.2'},'logger': logger};vartracer=initTracer(config,options);functionrespond(req,res,next){varspan=tracer.startSpan('GET-hello');span.log({'name': req.params.name});span.finish();res.send('hello: '+req.params.name);next();}varserver=restify.createServer();server.get('/hello/:name',respond);server.listen(8080,function(){console.log('%s listening at %s',server.name,server.url);});
3. >>node index.js
I Get a log from Jaeger saying
{"name":"hello-world","hostname":"P10-LAP-031","pid":2405,"level":30,"msg":"Initializing Jaeger Tracer with RemoteReporter and RemoteSampler","time":"2017-07-28T07:05:00.264Z","v":0}
restify listening at http://[::]:8080
Every 1 minute I get error in my log
**{"name":"hello-world","hostname":"P10-LAP-031","pid":2405,"level":50,"msg":"Error in parsing sampling strategy: SyntaxError: Unexpected token c in JSON at position 1.","time":"2017-07-28T07:06:04.790Z","v":0}**
Hi there, this ticket should contain the information you need: #135
essentially you want to pass in const sampler (sampler: { type: 'const', param: 1 }) so that all your traces are sampled. Otherwise the default sampling rate is 1 in 1000
I am new to opentracing and would like to use it, to get tracing around various microservices which we built (mostly using node).
To start with I tried to build a hello-world service using jaeger-client-node (code snippet) attached.
Below are the steps done:
Docker around Jaeger Tracing
sudo docker run -d -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778 -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest
Here is the below code which I am trying to run to get opentracing work
3.
>>node index.js
I Get a log from Jaeger saying
Every 1 minute I get error in my log
And I dont get any Traces in Jaeger UI http://localhost:16686/search
Do let me know if I am missing anything
Thanks
The text was updated successfully, but these errors were encountered: