File tree Expand file tree Collapse file tree 4 files changed +16
-8
lines changed
Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ jobs:
110110 - run :
111111 name : Install dependencies
112112 command : |
113- choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
113+ choco install -y cmake --version=3.31.6 -- installargs 'ADD_CMAKE_TO_PATH=System'
114114 choco install -y ninja
115115 - run :
116116 name : Building
Original file line number Diff line number Diff line change @@ -25,14 +25,15 @@ jobs:
2525 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
2727 - name : Initialize CodeQL
28- uses : github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
28+ uses : github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
2929 with :
3030 languages : ${{ matrix.language }}
3131
32+ - name : Install dependencies
33+ run : bin/install-cmake
34+
3235 - name : Build dd-trace-cpp
33- run : |
34- bin/install-cmake
35- bin/cmake-build
36+ run : bin/cmake-build --preset=ci-codeql
3637
3738 - name : Perform CodeQL Analysis
38- uses : github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
39+ uses : github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
Original file line number Diff line number Diff line change 1212 "DD_TRACE_STATIC_CRT" : " 1" ,
1313 "DD_TRACE_BUILD_TESTING" : " 1"
1414 }
15+ },
16+ {
17+ "name" : " ci-codeql" ,
18+ "displayName" : " CI CodeQL" ,
19+ "cacheVariables" : {
20+ "CMAKE_POLICY_VERSION_MINIMUM" : " 3.5"
21+ }
1522 }
1623 ]
1724}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ SamplingDecision TraceSampler::decide(const SpanData& span) {
5555 decision.limiter_max_per_second = limiter_max_per_second_;
5656 decision.configured_rate = rule.rate ;
5757 const std::uint64_t threshold = max_id_from_rate (rule.rate );
58- if (knuth_hash (span.trace_id .low ) < threshold) {
58+ if (knuth_hash (span.trace_id .low ) <= threshold) {
5959 const auto result = limiter_.allow ();
6060 if (result.allowed ) {
6161 decision.priority = int (SamplingPriority::USER_KEEP);
@@ -90,7 +90,7 @@ SamplingDecision TraceSampler::decide(const SpanData& span) {
9090 }
9191
9292 const std::uint64_t threshold = max_id_from_rate (*decision.configured_rate );
93- if (knuth_hash (span.trace_id .low ) < threshold) {
93+ if (knuth_hash (span.trace_id .low ) <= threshold) {
9494 decision.priority = int (SamplingPriority::AUTO_KEEP);
9595 } else {
9696 decision.priority = int (SamplingPriority::AUTO_DROP);
You can’t perform that action at this time.
0 commit comments