Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/dynamic_sampling/rules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class RuleType(Enum):
REVERSE_RESERVED_IDS = {value: key for key, value in RESERVED_IDS.items()}


SamplingValueType = Literal["sampleRate", "factor", "reservoir", "minimumSampleRate"]
SamplingValueType = Literal["sampleRate", "factor", "minimumSampleRate"]
Comment thread
cursor[bot] marked this conversation as resolved.


# (RaduW) Maybe we can split in two types, one for reservoir and one for sampleRate and factor
Expand Down
4 changes: 2 additions & 2 deletions static/gsAdmin/views/dynamicSamplingPanel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('Dynamic Sampling Panel', () => {

const rule1 = {
samplingValue: {
type: 'reservoir',
type: 'minimumSampleRate',
Comment thread
cursor[bot] marked this conversation as resolved.
limit: 100,
},
type: 'transaction',
Expand All @@ -163,7 +163,7 @@ describe('Dynamic Sampling Panel', () => {

const rule2 = {
samplingValue: {
type: 'reservoir',
type: 'minimumSampleRate',
limit: 300,
},
type: 'transaction',
Expand Down
8 changes: 1 addition & 7 deletions static/gsAdmin/views/dynamicSamplingPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type RuleV2 = {
};
id: number;
samplingValue: {
type: 'factor' | 'sampleRate' | 'reservoir';
type: 'factor' | 'sampleRate';
value: number;
limit?: number;
};
Expand Down Expand Up @@ -335,9 +335,6 @@ function DynamicSamplingRulesTable({
) {
return `${round(samplingValue.value * 100)}%`;
}
if (samplingValue.type === 'reservoir') {
return '100%';
}
return `* ${round(samplingValue.value)}`;
};

Expand All @@ -348,9 +345,6 @@ function DynamicSamplingRulesTable({
if (rule.samplingValue.type === 'sampleRate') {
return round(rule.samplingValue.value - baseSampleRate);
}
if (rule.samplingValue.type === 'reservoir') {
Comment thread
cursor[bot] marked this conversation as resolved.
return 1;
}
return round(rule.samplingValue.value - 1);
};

Expand Down
Loading