Skip to content

Commit

Permalink
Update default samplingServerURL to include /sampling path (jaegertra…
Browse files Browse the repository at this point in the history
…cing#158)

* Update default samplingServerURL to include /sampling path

Fixes issue jaegertracing#157

Signed-off-by: Jorrit Salverda <jorrit.salverda@gmail.com>

* Improve test for default sampling server url

By asserting against a static string the test will fail if the value changes, while otherwise it would not

Signed-off-by: Jorrit Salverda <jsalverda@travix.com>
  • Loading branch information
JorritSalverda authored and yurishkuro committed Sep 13, 2019
1 parent 68be4e2 commit b083108
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -68,7 +68,7 @@ NOTE: It is not recommended to use a remote host for UDP connections.

### Updating Sampling Server URL

The default sampling collector URL is `http://127.0.0.1:5778`. Similar to UDP address above, you can use a different URL by updating the sampler configuration.
The default sampling collector URL is `http://127.0.0.1:5778/sampling`. Similar to UDP address above, you can use a different URL by updating the sampler configuration.

```yml
sampler:
Expand Down
6 changes: 6 additions & 0 deletions src/jaegertracing/ConfigTest.cpp
Expand Up @@ -73,6 +73,12 @@ TEST(Config, testDefaultSamplingProbability)
Config().sampler().param());
}

TEST(Config, testDefaultSamplingServerURL)
{
ASSERT_EQ("http://127.0.0.1:5778/sampling",
Config().sampler().samplingServerURL());
}

TEST(Config, testZeroSamplingParam)
{
{
Expand Down
2 changes: 1 addition & 1 deletion src/jaegertracing/samplers/Config.h
Expand Up @@ -42,7 +42,7 @@ class Config {

static constexpr auto kDefaultSamplingProbability =
static_cast<double>(0.001);
static constexpr auto kDefaultSamplingServerURL = "http://127.0.0.1:5778";
static constexpr auto kDefaultSamplingServerURL = "http://127.0.0.1:5778/sampling";
static constexpr auto kDefaultMaxOperations = 2000;

static Clock::duration defaultSamplingRefreshInterval()
Expand Down

0 comments on commit b083108

Please sign in to comment.