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

Clarify configuring sampling in the collector #123

Open
yurishkuro opened this issue Aug 16, 2018 · 1 comment
Open

Clarify configuring sampling in the collector #123

yurishkuro opened this issue Aug 16, 2018 · 1 comment
Assignees
Labels

Comments

@yurishkuro
Copy link
Member

https://www.jaegertracing.io/docs/sampling/

(a) change "Collector Sampling Configuration" section title to "Collector Configuration", looks better in the TOC in the right sidebar

(b) explain mounting config file for Docker. From gitter

maniaabdi @maniaabdi 16:19
Hello everyone, how should we specify sampling strategies to jaeger-collector. I am using the following command
sudo docker run --rm -p14268:14268 -p9411:9411 -p14267:14267 -e CASSANDRA_SERVERS=192.168.100.15 -e CASSANDRA_PORT=9042 jaegertracing/jaeger-collector --sampling.strategies-file=/home/ubuntu/strategies.json
and I keep getting
{"level":"fatal","ts":1534364309.442946,"caller":"collector/main.go:228","msg":"Failed to create sampling strategy store","error":"Failed to open strategies file: open /home/ubuntu/strategies.json: no such file or directory","errorVerbose":"open /home/ubuntu/strategies.json: no such file or directory\nFailed to open strategies
but I am sure that my file exist
any help is really appreciated

Won Jun Jang @black-adder 16:26
https://stackoverflow.com/questions/41092587/passing-file-as-argument-to-docker-container
you have to pass the file to the container as a volume

Prithvi Raj @vprithvi 16:26
(because the file isn't in the container)

Won Jun Jang @black-adder 16:26
-v /home/ubuntu/strategies.json:/home/ubuntu/strategies.json should work
@ghost ghost assigned pavolloffay Nov 13, 2018
@ghost ghost added the review label Nov 13, 2018
@FYfirst
Copy link

FYfirst commented Aug 19, 2019

I used "nohup ./jaeger-collector --sampling.strategies-file=./strategies.json --es.server-urls http://127.0.0.1:9200/ --log-level=debug > collector.log 2>&1 &" ,it worked but no effective.
Then,Running the test file strategy_store_test.go,I can see it loaded the sample configuration and I changed the sample.type to remote,it didn't work.

`cfg := jaegerCfg.Configuration{`
       `Sampler: &jaegerCfg.SamplerConfig{`
        `Type: "remote",`
    `},`
   ` Reporter: &jaegerCfg.ReporterConfig{`
       ` LogSpans: true,`
       ` BufferFlushInterval: 1 * time.Second,`
       ` LocalAgentHostPort: "127.0.0.1:6831",`
    `},`
}`

I created a tracer like this,is right?It can't read the param from collector,can u tell me what should I do. There is my strategies.json file.

{
  "service_strategies": [
    {
      "service": "ContextMakeHappyEnding",
      "type": "probabilistic",
      "param": 1,
      "operation_strategies": [
        {
          "operation": "transporter",
          "type": "probabilistic",
          "param": 0.2
        },
        {
          "operation": "op2",
          "type": "probabilistic",
          "param": 0.4
        }
      ]
    },
    {
      "service": "ContextUnpackKafkaItem",
      "type": "probabilistic",
      "param": 1
    }
  ],
  "default_strategy": [
    {
    "type": "probabilistic",
    "param": 1
    },
    {
      "service": "ContextUnpackKafkaItem",
      "type": "probabilistic",
      "param": 1
    }
  ]
}

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

No branches or pull requests

3 participants