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

Support sampling file reload interval #6440

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

yurishkuro
Copy link
Member

Which problem is this PR solving?

Description of the changes

  • Add support for reload interval

How was this change tested?

go run ./cmd/jaeger

$ curl "http://localhost:5778/?service=x"
{"strategyType":0,"probabilisticSampling":{"samplingRate":1}}%

Edit cmd/jaeger/sampling-strategies.json to change default to 0.1.

Observe server logs showing new values.

$ curl "http://localhost:5778/?service=x"
{"strategyType":0,"probabilisticSampling":{"samplingRate":0.1}}%

Signed-off-by: Yuri Shkuro <[email protected]>
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (fc518ce) to head (329e920).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6440      +/-   ##
==========================================
- Coverage   96.27%   96.25%   -0.03%     
==========================================
  Files         369      369              
  Lines       21048    21051       +3     
==========================================
- Hits        20264    20262       -2     
- Misses        600      604       +4     
- Partials      184      185       +1     
Flag Coverage Δ
badger_v1 10.53% <ø> (ø)
badger_v2 2.59% <ø> (ø)
cassandra-4.x-v1-manual 16.41% <ø> (ø)
cassandra-4.x-v2-auto 2.52% <ø> (ø)
cassandra-4.x-v2-manual 2.52% <ø> (ø)
cassandra-5.x-v1-manual 16.41% <ø> (ø)
cassandra-5.x-v2-auto 2.52% <ø> (ø)
cassandra-5.x-v2-manual 2.52% <ø> (ø)
elasticsearch-6.x-v1 20.14% <ø> (+<0.01%) ⬆️
elasticsearch-7.x-v1 20.22% <ø> (ø)
elasticsearch-8.x-v1 20.37% <ø> (ø)
elasticsearch-8.x-v2 2.59% <ø> (+<0.01%) ⬆️
grpc_v1 12.19% <ø> (ø)
grpc_v2 8.97% <ø> (+<0.01%) ⬆️
kafka-3.x-v1 10.37% <ø> (ø)
kafka-3.x-v2 2.59% <ø> (ø)
memory_v2 2.59% <ø> (ø)
opensearch-1.x-v1 20.25% <ø> (-0.01%) ⬇️
opensearch-2.x-v1 20.26% <ø> (ø)
opensearch-2.x-v2 2.58% <ø> (ø)
tailsampling-processor 0.39% <ø> (ø)
unittests 95.11% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yurishkuro yurishkuro marked this pull request as ready for review December 30, 2024 15:59
@yurishkuro yurishkuro requested a review from a team as a code owner December 30, 2024 15:59
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one comment

@yurishkuro yurishkuro enabled auto-merge (squash) December 30, 2024 16:52
@yurishkuro yurishkuro merged commit 752e8d2 into jaegertracing:main Dec 30, 2024
54 checks passed
@yurishkuro yurishkuro deleted the sampling-reload branch December 30, 2024 17:43
Manik2708 pushed a commit to Manik2708/jaeger that referenced this pull request Jan 5, 2025
## Which problem is this PR solving?
- Accidentally stumbled upon this when looking at jaegertracing#6431
- Turns out v2 config did not support all the options from v1

## Description of the changes
- Add support for reload interval

## How was this change tested?
`go run ./cmd/jaeger`

```
$ curl "http://localhost:5778/?service=x"
{"strategyType":0,"probabilisticSampling":{"samplingRate":1}}%
```

Edit cmd/jaeger/sampling-strategies.json to change default to 0.1.

Observe server logs showing new values.

```
$ curl "http://localhost:5778/?service=x"
{"strategyType":0,"probabilisticSampling":{"samplingRate":0.1}}%
```

---------

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants