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

Make operation_strategies part also be part of default_strategy #1749

Merged
merged 12 commits into from
Dec 29, 2019
Merged

Make operation_strategies part also be part of default_strategy #1749

merged 12 commits into from
Dec 29, 2019

Conversation

rutgerbrf
Copy link
Contributor

@rutgerbrf rutgerbrf commented Aug 20, 2019

Which problem is this PR solving?

Resolves #1748

Short description of the changes

Makes operation strategies a default part of strategy so operation strategies can be defined for the default sampling strategy.

Makes it possible to use operation_strategies in default_strategy in
the sampling strategy configuration file.

Signed-off-by: Rutger Broekhoff <[email protected]>
Signed-off-by: Rutger Broekhoff <[email protected]>
Signed-off-by: Rutger Broekhoff <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I have concerns with the modeling. I also think there there should be a code change that interprets this top-level per-operation defaults and includes them in the response for GetStrategy(service) endpoint, so that this PR actually has effect on the clients (without changing the clients themselves).

Param float64 `json:"param"`
Type string `json:"type"`
Param float64 `json:"param"`
OperationStrategies []*operationStrategy `json:"operation_strategies"`
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good encapsulation, a strategy is a "simple" struct. If necessary, the overall config can have a separate service-less per-operation section, but we should not break the notion of a simple strategy.

@yurishkuro
Copy link
Member

btw, this might be of interest #365 (comment)

@codecov
Copy link

codecov bot commented Nov 5, 2019

Codecov Report

Merging #1749 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1749      +/-   ##
==========================================
- Coverage   96.94%   96.89%   -0.05%     
==========================================
  Files         202      203       +1     
  Lines       10068    10100      +32     
==========================================
+ Hits         9760     9786      +26     
- Misses        269      273       +4     
- Partials       39       41       +2
Impacted Files Coverage Δ
plugin/sampling/strategystore/static/constants.go 100% <100%> (ø)
...in/sampling/strategystore/static/strategy_store.go 100% <100%> (ø) ⬆️
cmd/query/app/static_handler.go 83.33% <0%> (-3.51%) ⬇️
plugin/storage/badger/spanstore/reader.go 96.15% <0%> (-0.65%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b1ebe6...7830ebe. Read the comment docs.

@yurishkuro
Copy link
Member

@rutgerbrf thanks for the PR!

PTAL at the respective docs change: jaegertracing/documentation#346

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

Successfully merging this pull request may close these issues.

Allow default per-operation sampling strategies
2 participants