Skip to content

Conversation

@dd-oleksii
Copy link
Member

What does this PR do?

Add pyo3 conversion methods for datadog-ffe.

Motivation

This will allow our Python tracer to easily call into datadog-ffe with Rust automatically doing conversion from Python to Rust types (and vice versa)

How to test the change?

Will be tested as part of ddtrace.

@dd-oleksii dd-oleksii requested a review from avara1986 October 30, 2025 02:12
@dd-oleksii dd-oleksii requested review from a team as code owners October 30, 2025 02:12
Comment on lines +59 to +76
/// Accepts either a dict with `"targeting_key"` and `"attributes"` items, or any object with
/// `targeting_key` and `attributes` attributes.
///
/// # Examples
///
/// ```python
/// {"targeting_key": "user1", "attributes": {"attr1": 42}}
/// ```
///
/// ```python
/// @dataclass
/// class EvaluationContext:
/// targeting_key: Optional[str]
/// attributes: dict[str, Any]
///
/// EvaluationContext(targeting_key="user1", attributes={"attr1": 42})
/// ```
impl<'py> FromPyObject<'py> for EvaluationContext {
Copy link
Member Author

Choose a reason for hiding this comment

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

@avara1986 for evaluation context, either a dict or an object with targeting_key/attributes is accepted. (We can technically pass OF's EvaluationContext if we filter out unsupported attributes.)

@pr-commenter
Copy link

pr-commenter bot commented Oct 30, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-11-04 05:29:50

Comparing candidate commit 6b94369 in PR branch ffe-pyo3-methods with baseline commit c4a66e2 in branch main.

Found 13 performance improvements and 4 performance regressions! Performance is the same for 38 metrics, 2 unstable metrics.

scenario:benching serializing traces from their internal representation to msgpack

  • 🟩 execution_time [-607.941µs; -596.461µs] or [-4.101%; -4.024%]

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟩 execution_time [-6.578µs; -6.553µs] or [-12.599%; -12.551%]
  • 🟩 throughput [+2749324.492op/s; +2760746.180op/s] or [+14.354%; +14.414%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟥 execution_time [+591.939ns; +595.859ns] or [+9.807%; +9.872%]
  • 🟥 throughput [-14887524.871op/s; -14793324.300op/s] or [-8.986%; -8.929%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟩 execution_time [-4.651µs; -4.605µs] or [-8.010%; -7.931%]
  • 🟩 throughput [+1484552.838op/s; +1498298.030op/s] or [+8.620%; +8.700%]

scenario:credit_card/is_card_number_no_luhn/378282246310005

  • 🟩 execution_time [-4.631µs; -4.580µs] or [-8.447%; -8.356%]
  • 🟩 throughput [+1664526.526op/s; +1681380.883op/s] or [+9.125%; +9.217%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟩 execution_time [-6.492µs; -6.465µs] or [-12.434%; -12.381%]
  • 🟩 throughput [+2706508.127op/s; +2719314.585op/s] or [+14.132%; +14.199%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟥 execution_time [+588.818ns; +592.845ns] or [+9.757%; +9.823%]
  • 🟥 throughput [-14822187.838op/s; -14727030.395op/s] or [-8.945%; -8.888%]

scenario:normalization/normalize_service/normalize_service/[empty string]

  • 🟩 execution_time [-2.140µs; -2.096µs] or [-5.553%; -5.440%]
  • 🟩 throughput [+1494395.004op/s; +1524542.332op/s] or [+5.758%; +5.874%]

scenario:redis/obfuscate_redis_string

  • 🟩 execution_time [-1.700µs; -1.393µs] or [-4.895%; -4.011%]

scenario:single_flag_killswitch/rules-based

  • 🟩 execution_time [-8.945ns; -7.797ns] or [-4.863%; -4.239%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.570µs 25.220µs ± 9.627µs 17.950µs ± 0.210µs 33.551µs 43.617µs 46.239µs 72.962µs 306.47% 1.199 1.788 38.08% 0.681µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [23.886µs; 26.554µs] or [-5.290%; +5.290%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.972µs 5.060µs ± 0.050µs 5.068µs ± 0.049µs 5.090µs 5.137µs 5.140µs 5.159µs 1.80% -0.002 -1.151 0.99% 0.004µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.053µs; 5.067µs] or [-0.137%; +0.137%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.370µs 2.447µs ± 0.020µs 2.451µs ± 0.008µs 2.456µs 2.483µs 2.490µs 2.494µs 1.74% -1.194 3.509 0.81% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.444µs; 2.450µs] or [-0.113%; +0.113%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 171.850ns 175.574ns ± 3.132ns 174.808ns ± 1.972ns 176.810ns 181.517ns 186.059ns 187.218ns 7.10% 1.325 2.074 1.78% 0.221ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [175.140ns; 176.008ns] or [-0.247%; +0.247%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 85.696µs 85.904µs ± 0.146µs 85.884µs ± 0.052µs 85.940µs 86.053µs 86.294µs 87.392µs 1.76% 5.754 52.983 0.17% 0.010µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [85.884µs; 85.924µs] or [-0.024%; +0.024%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 185.666µs 186.068µs ± 0.244µs 186.045µs ± 0.165µs 186.219µs 186.508µs 186.655µs 187.022µs 0.52% 0.603 0.287 0.13% 0.017µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5346977.394op/s 5374393.278op/s ± 7044.886op/s 5375036.811op/s ± 4784.998op/s 5379576.170op/s 5384705.252op/s 5385945.410op/s 5386025.177op/s 0.20% -0.595 0.267 0.13% 498.149op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.782µs 17.837µs ± 0.026µs 17.837µs ± 0.015µs 17.851µs 17.878µs 17.909µs 17.940µs 0.58% 0.549 1.045 0.14% 0.002µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55742430.623op/s 56063729.169op/s ± 81260.416op/s 56064124.167op/s ± 48336.904op/s 56113031.450op/s 56188376.526op/s 56222293.168op/s 56235155.573op/s 0.31% -0.537 1.015 0.14% 5745.979op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.540µs 10.590µs ± 0.023µs 10.585µs ± 0.015µs 10.606µs 10.627µs 10.643µs 10.696µs 1.05% 0.683 1.576 0.21% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 93490959.567op/s 94425779.431op/s ± 202512.856op/s 94475491.544op/s ± 134578.050op/s 94561811.575op/s 94701515.300op/s 94831874.253op/s 94880989.544op/s 0.43% -0.663 1.505 0.21% 14319.821op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [186.034µs; 186.102µs] or [-0.018%; +0.018%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5373416.925op/s; 5375369.632op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.833µs; 17.840µs] or [-0.020%; +0.020%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [56052467.257op/s; 56074991.081op/s] or [-0.020%; +0.020%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.587µs; 10.594µs] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/good throughput [94397713.096op/s; 94453845.765op/s] or [-0.030%; +0.030%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 239.655ns 251.226ns ± 13.707ns 246.213ns ± 3.737ns 252.472ns 290.748ns 294.621ns 296.051ns 20.24% 2.004 3.211 5.44% 0.969ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [249.326ns; 253.125ns] or [-0.756%; +0.756%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 59.307ms 59.769ms ± 2.422ms 59.436ms ± 0.043ms 59.493ms 59.860ms 78.380ms 80.526ms 35.48% 7.961 61.768 4.04% 0.171ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [59.434ms; 60.105ms] or [-0.562%; +0.562%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 496.111µs 497.090µs ± 0.423µs 497.091µs ± 0.266µs 497.310µs 497.760µs 497.972µs 499.815µs 0.55% 1.347 7.406 0.08% 0.030µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 2000742.053op/s 2011707.827op/s ± 1710.448op/s 2011703.308op/s ± 1074.684op/s 2012826.626op/s 2014079.163op/s 2015124.585op/s 2015676.589op/s 0.20% -1.328 7.269 0.08% 120.947op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 370.509µs 371.360µs ± 0.270µs 371.364µs ± 0.189µs 371.541µs 371.792µs 371.893µs 372.035µs 0.18% -0.103 -0.205 0.07% 0.019µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2687921.660op/s 2692808.002op/s ± 1958.655op/s 2692773.614op/s ± 1372.110op/s 2694224.759op/s 2695965.214op/s 2696838.874op/s 2698986.601op/s 0.23% 0.107 -0.202 0.07% 138.498op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 168.435µs 168.774µs ± 0.132µs 168.759µs ± 0.085µs 168.857µs 168.961µs 169.103µs 169.429µs 0.40% 0.765 2.432 0.08% 0.009µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5902179.744op/s 5925083.286op/s ± 4632.604op/s 5925615.610op/s ± 2988.399op/s 5928184.048op/s 5932081.475op/s 5933561.951op/s 5937006.702op/s 0.19% -0.756 2.396 0.08% 327.575op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.203µs 36.411µs ± 0.090µs 36.400µs ± 0.056µs 36.468µs 36.581µs 36.631µs 36.639µs 0.66% 0.386 -0.236 0.25% 0.006µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 27293382.671op/s 27464133.458op/s ± 67923.927op/s 27472747.237op/s ± 41974.961op/s 27510926.288op/s 27570530.283op/s 27591965.098op/s 27621733.040op/s 0.54% -0.374 -0.242 0.25% 4802.947op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.215µs 46.334µs ± 0.064µs 46.324µs ± 0.035µs 46.361µs 46.446µs 46.536µs 46.587µs 0.57% 1.149 1.773 0.14% 0.005µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21465046.676op/s 21582417.333op/s ± 29760.683op/s 21587175.491op/s ± 16426.896op/s 21601630.065op/s 21619909.950op/s 21627787.221op/s 21638152.390op/s 0.24% -1.139 1.739 0.14% 2104.398op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [497.032µs; 497.149µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2011470.776op/s; 2011944.879op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [371.322µs; 371.397µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2692536.551op/s; 2693079.453op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [168.756µs; 168.792µs] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5924441.251op/s; 5925725.320op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.399µs; 36.424µs] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27454719.855op/s; 27473547.061op/s] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.325µs; 46.343µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21578292.788op/s; 21586541.877op/s] or [-0.019%; +0.019%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 32.688µs 33.191µs ± 0.834µs 32.814µs ± 0.051µs 32.901µs 34.963µs 35.055µs 36.543µs 11.36% 1.796 1.614 2.51% 0.059µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [33.075µs; 33.306µs] or [-0.348%; +0.348%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.895µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.917µs 3.919µs 3.920µs 3.921µs 0.14% -1.676 10.413 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255039424.304op/s 255413624.606op/s ± 188247.640op/s 255395926.175op/s ± 110793.664op/s 255538254.079op/s 255668628.802op/s 255742190.162op/s 256736287.921op/s 0.52% 1.698 10.593 0.07% 13311.118op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 77.880µs 78.309µs ± 0.342µs 78.254µs ± 0.242µs 78.518µs 78.865µs 79.104µs 80.758µs 3.20% 2.251 11.873 0.44% 0.024µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12382723.276op/s 12770229.812op/s ± 55216.526op/s 12778871.428op/s ± 39676.370op/s 12816479.109op/s 12829409.497op/s 12837090.837op/s 12840291.551op/s 0.48% -2.140 10.842 0.43% 3904.398op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 71.431µs 71.766µs ± 0.256µs 71.748µs ± 0.192µs 71.904µs 72.242µs 72.487µs 72.774µs 1.43% 1.002 0.874 0.36% 0.018µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13741079.586op/s 13934282.221op/s ± 49473.704op/s 13937724.163op/s ± 37355.820op/s 13977585.544op/s 13991516.384op/s 13998746.231op/s 13999536.615op/s 0.44% -0.982 0.805 0.35% 3498.319op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.897µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.916µs 3.919µs 3.920µs 3.921µs 0.17% -1.204 8.178 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255020223.883op/s 255447007.280op/s ± 174000.464op/s 255447845.573op/s ± 114959.821op/s 255567601.233op/s 255685242.457op/s 255729284.470op/s 256602825.746op/s 0.45% 1.222 8.311 0.07% 12303.691op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 68.242µs 68.669µs ± 0.287µs 68.609µs ± 0.224µs 68.855µs 69.174µs 69.397µs 69.543µs 1.36% 0.575 -0.285 0.42% 0.020µs 1 200
credit_card/is_card_number/378282246310005 throughput 14379688.788op/s 14562808.413op/s ± 60759.468op/s 14575277.414op/s ± 47647.522op/s 14604905.461op/s 14648215.480op/s 14653042.740op/s 14653710.244op/s 0.54% -0.558 -0.314 0.42% 4296.343op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.413µs 45.645µs ± 0.081µs 45.642µs ± 0.056µs 45.701µs 45.776µs 45.830µs 45.838µs 0.43% -0.084 -0.024 0.18% 0.006µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21816053.581op/s 21908493.994op/s ± 39115.846op/s 21909581.359op/s ± 26894.257op/s 21933355.499op/s 21977487.700op/s 22006042.510op/s 22020318.148op/s 0.51% 0.094 -0.017 0.18% 2765.908op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.561µs 6.630µs ± 0.012µs 6.633µs ± 0.007µs 6.639µs 6.642µs 6.646µs 6.647µs 0.22% -1.710 4.737 0.18% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 150440196.983op/s 150832100.471op/s ± 279490.401op/s 150764167.152op/s ± 152360.277op/s 150970266.616op/s 151346069.212op/s 151579290.601op/s 152407190.834op/s 1.09% 1.731 4.880 0.18% 19762.956op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.916µs 3.920µs 3.922µs 3.927µs 0.31% -0.851 8.781 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254660054.741op/s 255455049.142op/s ± 207497.522op/s 255454171.523op/s ± 129580.696op/s 255592901.636op/s 255711356.957op/s 255762999.659op/s 256818402.953op/s 0.53% 0.876 8.925 0.08% 14672.290op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.585µs 65.704µs ± 0.049µs 65.702µs ± 0.031µs 65.735µs 65.781µs 65.831µs 65.866µs 0.25% 0.261 0.237 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15182306.758op/s 15219888.457op/s ± 11315.136op/s 15220335.243op/s ± 7233.643op/s 15227173.379op/s 15237155.420op/s 15246625.604op/s 15247297.715op/s 0.18% -0.256 0.232 0.07% 800.101op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.359µs 53.436µs ± 0.041µs 53.426µs ± 0.032µs 53.467µs 53.508µs 53.536µs 53.548µs 0.23% 0.352 -0.654 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18674948.808op/s 18714127.601op/s ± 14415.629op/s 18717332.098op/s ± 11179.302op/s 18725003.552op/s 18735669.486op/s 18739099.819op/s 18740818.370op/s 0.13% -0.349 -0.658 0.08% 1019.339op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.903µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.917µs 3.920µs 3.922µs 3.923µs 0.20% 0.087 0.332 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254938001.354op/s 255423571.037op/s ± 201733.923op/s 255451345.789op/s ± 149776.065op/s 255578042.059op/s 255688941.289op/s 255789340.284op/s 256230777.048op/s 0.31% -0.081 0.342 0.08% 14264.742op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.151µs 50.214µs ± 0.038µs 50.206µs ± 0.024µs 50.237µs 50.289µs 50.314µs 50.337µs 0.26% 0.738 0.210 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19866035.377op/s 19914689.102op/s ± 15020.626op/s 19917757.588op/s ± 9655.812op/s 19925387.394op/s 19935672.867op/s 19938427.763op/s 19939930.958op/s 0.11% -0.734 0.202 0.08% 1062.119op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.506µs 45.736µs ± 0.091µs 45.739µs ± 0.063µs 45.806µs 45.887µs 45.912µs 45.927µs 0.41% -0.211 -0.410 0.20% 0.006µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21773861.841op/s 21864588.988op/s ± 43458.644op/s 21862985.965op/s ± 30037.660op/s 21890780.709op/s 21942224.526op/s 21969702.708op/s 21975080.059op/s 0.51% 0.221 -0.405 0.20% 3072.990op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.566µs 6.626µs ± 0.013µs 6.630µs ± 0.009µs 6.636µs 6.641µs 6.645µs 6.647µs 0.26% -1.182 2.083 0.20% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 150447359.355op/s 150922266.695op/s ± 303559.953op/s 150835427.119op/s ± 194520.671op/s 151134504.104op/s 151476860.038op/s 151946158.619op/s 152310533.659op/s 0.98% 1.198 2.159 0.20% 21464.930op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.915µs; 3.916µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255387535.294op/s; 255439713.919op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [78.261µs; 78.356µs] or [-0.060%; +0.060%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12762577.332op/s; 12777882.291op/s] or [-0.060%; +0.060%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.731µs; 71.802µs] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13927425.641op/s; 13941138.800op/s] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [255422892.489op/s; 255471122.071op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.629µs; 68.709µs] or [-0.058%; +0.058%] None None None
credit_card/is_card_number/378282246310005 throughput [14554387.735op/s; 14571229.091op/s] or [-0.058%; +0.058%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.633µs; 45.656µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21903072.914op/s; 21913915.074op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.628µs; 6.632µs] or [-0.026%; +0.026%] None None None
credit_card/is_card_number/x371413321323331 throughput [150793365.790op/s; 150870835.153op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.914µs; 3.915µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255426291.981op/s; 255483806.302op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.697µs; 65.710µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15218320.288op/s; 15221456.626op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [53.430µs; 53.441µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18712129.734op/s; 18716125.469op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.915µs; 3.915µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255395612.655op/s; 255451529.418op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.209µs; 50.219µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19912607.388op/s; 19916770.816op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.724µs; 45.749µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21858566.038op/s; 21870611.938op/s] or [-0.028%; +0.028%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.624µs; 6.628µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [150880196.205op/s; 150964337.185op/s] or [-0.028%; +0.028%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.176ms 14.222ms ± 0.030ms 14.217ms ± 0.011ms 14.229ms 14.258ms 14.336ms 14.413ms 1.38% 2.921 12.033 0.21% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.218ms; 14.226ms] or [-0.029%; +0.029%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 160.488µs 161.244µs ± 0.413µs 161.172µs ± 0.172µs 161.383µs 161.761µs 162.604µs 164.855µs 2.28% 4.056 29.463 0.26% 0.029µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [161.187µs; 161.301µs] or [-0.035%; +0.035%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 6.128ms 6.424ms ± 0.071ms 6.439ms ± 0.019ms 6.457ms 6.484ms 6.557ms 6.575ms 2.11% -2.294 6.091 1.11% 0.005ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [6.414ms; 6.433ms] or [-0.154%; +0.154%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.187µs 3.216µs ± 1.442µs 3.010µs ± 0.024µs 3.032µs 3.647µs 13.912µs 14.946µs 396.48% 7.389 55.637 44.73% 0.102µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.016µs; 3.415µs] or [-6.215%; +6.215%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.673ms 10.705ms ± 0.014ms 10.705ms ± 0.008ms 10.713ms 10.729ms 10.751ms 10.762ms 0.53% 0.682 1.277 0.13% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.703ms; 10.707ms] or [-0.019%; +0.019%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 6b94369 1762233086 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 120.148µs 121.836µs ± 1.292µs 121.619µs ± 0.412µs 122.043µs 123.105µs 127.612µs 133.793µs 10.01% 5.385 40.534 1.06% 0.091µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [121.657µs; 122.015µs] or [-0.147%; +0.147%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 47.34043% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.52%. Comparing base (ee5d57c) to head (3ba037f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1289      +/-   ##
==========================================
- Coverage   71.61%   71.52%   -0.09%     
==========================================
  Files         370      369       -1     
  Lines       58454    58530      +76     
==========================================
+ Hits        41861    41866       +5     
- Misses      16593    16664      +71     
Components Coverage Δ
datadog-crashtracker 50.65% <ø> (+0.02%) ⬆️
datadog-crashtracker-ffi 5.86% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 87.89% <ø> (ø)
data-pipeline-ffi 88.19% <ø> (ø)
ddcommon 80.95% <ø> (ø)
ddcommon-ffi 73.84% <ø> (ø)
ddtelemetry 59.98% <ø> (-0.04%) ⬇️
ddtelemetry-ffi 21.24% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.39% <ø> (ø)
datadog-profiling 76.50% <ø> (ø)
datadog-profiling-ffi 62.11% <ø> (ø)
datadog-sidecar 35.74% <ø> (ø)
datdog-sidecar-ffi 6.68% <ø> (ø)
spawn-worker 55.18% <ø> (ø)
tinybytes 92.44% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 59.65% <ø> (ø)
datadog-trace-utils 90.19% <ø> (ø)
datadog-tracer-flare 61.03% <ø> (ø)
datadog-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dd-oleksii dd-oleksii requested a review from bantonsson October 30, 2025 02:32
@dd-octo-sts
Copy link

dd-octo-sts bot commented Oct 30, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 82.73 MB 82.73 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.50 MB 7.50 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 95.91 MB 95.91 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.54 MB 9.54 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 19.00 MB 19.00 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 131.62 MB 131.62 MB -0% (-8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 692.99 MB 692.99 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 6.32 MB 6.32 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 19.01 MB 19.01 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 36.81 MB 36.81 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 16.10 MB 16.10 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 133.72 MB 133.71 MB -0% (-8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 681.37 MB 681.37 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.85 MB 4.85 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 20.18 MB 20.18 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 34.56 MB 34.56 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 71.70 MB 71.70 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.90 MB 8.90 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 90.68 MB 90.68 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.25 MB 10.25 MB 0% (0 B) 👌

@avara1986
Copy link
Member

Correct me if I’m wrong, but libdatadog is language-agnostic and wouldn’t require pyo3, right?the bindings could be added directly in ddtrace-py like: https://github.com/DataDog/dd-trace-py/blob/main/src/native/ffande.rs

@dd-oleksii
Copy link
Member Author

Correct me if I’m wrong, but libdatadog is language-agnostic and wouldn’t require pyo3, right?the bindings could be added directly in ddtrace-py like: https://github.com/DataDog/dd-trace-py/blob/main/src/native/ffande.rs

Yes, somewhat.

The code here is not bindings per se but helper functions that can convert from Python to Rust and back. The reason for adding it here is to satisfy Rust's orphan rule—we technically cannot impl IntoPyObject/FromPyObject for datadog-ffe types outside of datadog-ffe. The two options are: either define these impls here, or create wrappers/custom functions in ddtrace-py. Wrappers are cumbersome and don't compose well (especially in types like HashMap<Str, Attribute> we would need to copy the whole hashmap just to add/remove wrappers).

The code here is added under "pyo3" feature, so other consumers of the library don't need to pull python-related dependencies. The way to think about it is that pyo3 is not a required dependency but "datadog-ffe can play nicely with pyo3 if you enable this feature."

Copy link

@leoromanovsky leoromanovsky left a comment

Choose a reason for hiding this comment

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

considering add a sanity test round trip data

/// - `bool`
/// - `NoneType`
///
/// Note that nesting is not currently supported and will throw an error.

Choose a reason for hiding this comment

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

👍

return Ok(Attribute(AttributeImpl::Number(s.value())));
}
if let Ok(s) = value.downcast::<PyInt>() {
return Ok(Attribute(AttributeImpl::Number(s.extract::<f64>()?)));

Choose a reason for hiding this comment

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

i64 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really. We only support float attributes, so ints are squashed to floats here

targeting_key: targeting_key
.map(|it| it.extract())
.transpose()?
.unwrap_or_else(|| Str::from_static_str("").into()),

Choose a reason for hiding this comment

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

confirming empty strings are acceptable input

These will be defined in dd-trace-py to better match what Python/OF
need.
This reverts commit b9c68ca.

Test generation in build.rs made tests hard to edit.
This is required to allow tracers return more precise error codes.
Copy link

@leoromanovsky leoromanovsky left a comment

Choose a reason for hiding this comment

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

API improvement makes sense

Copy link
Member

@avara1986 avara1986 left a comment

Choose a reason for hiding this comment

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

The UniversalFlagConfigWire structure is not correct compared to the JSON object coming from Remote Config. Consider merging this branch (and please have an expert review it, it’s my first Rust commit):
https://github.com/DataDog/libdatadog/compare/ffe-pyo3-methods...avara1986/ffe-pyo3-methods?expand=1

@dd-oleksii
Copy link
Member Author

@avara1986 thanks for finding this! it's not quite related to pyo3 changes here but I fixed that by dropping support for JSON:API

@dd-oleksii dd-oleksii requested a review from avara1986 October 31, 2025 22:31
/// ffe-specific [`Error`] enum.
pub type Result<T> = std::result::Result<T, Error>;

/// Enum representing possible errors that can occur in the feature flagging SDK.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just an FYI: removing this shouldn't impact anything from the FFI's perspective. The FFI converts all errors to a generic ddog_Error type using a wrap_with_ffi_result method

Within wrap_with_ffi_result, there's a anyhow::Error → ddcommon_ffi::Error conversion that flattens all error details into a string message

impl From<anyhow::Error> for Error {
fn from(value: anyhow::Error) -> Self {
// {:#} is the "alternate" format, see:
// https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations
Self::from(format!("{value:#}"))
}
}

And so there's no distinction of Rust-specific error types once they get to C

Copy link
Member Author

Choose a reason for hiding this comment

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

Well... you'll probably want to change that once you get to reporting reason, error_core, and error_message to OF. It's going to painful to figure these out from error strings (which are not guaranteed to be stable).

You may want to take a look at what we do in Python here: https://github.com/DataDog/dd-trace-py/pull/15098/files#diff-d2ca810369a5f55bf62d0810211bf0d40df1f74ede215ffc430486bb1cce7545. It's basically converting Result<Assignment, EvaluationFailure> to ResolutionDetails which is very similar to what OF expects + a couple of extra fields that we need.

It might even be a good idea to move ResolutionDetails into datadog-ffe, so we can share that code between python, ruby and other SDKs

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for referring me to that PR, particularly the methods you have to map the native errors to OF errors are helpful: _map_reason_to_openfeature and _map_error_code_to_openfeature. We'll update Ruby to do the same mapping.

Moving ResolutionDetails into datadog-ffe doesn't sound like a bad idea. If the OF specs for python, ruby, and other SDKs never drift, that would be ideal. But even if one of them diverges, I imagine we could just augment the code for that specific SDK

@dd-oleksii
Copy link
Member Author

Unrelated failure from data-pipeline-ffi

@dd-oleksii
Copy link
Member Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 4, 2025

View all feedbacks in Devflow UI.

2025-11-04 14:38:17 UTC ℹ️ Start processing command /merge


2025-11-04 14:38:22 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 35m (p90).


2025-11-04 14:38:43 UTCMergeQueue: This merge request was updated

This PR is rejected because it was updated

@dd-oleksii
Copy link
Member Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 5, 2025

View all feedbacks in Devflow UI.

2025-11-05 01:55:35 UTC ℹ️ Start processing command /merge


2025-11-05 01:55:40 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-05 02:08:12 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 35m (p90).


2025-11-05 02:36:45 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit e112efa into main Nov 5, 2025
64 of 67 checks passed
@dd-mergequeue dd-mergequeue bot deleted the ffe-pyo3-methods branch November 5, 2025 02:36
anais-raison pushed a commit that referenced this pull request Nov 10, 2025
[ffe] add pyo3 conversion methods

[ffe] Remove unused errors

[ffe] step back and remove IntoPyObject types

These will be defined in dd-trace-py to better match what Python/OF
need.

Revert "test(ffe): run sdk tests individually (#1273)"

This reverts commit b9c68ca.

Test generation in build.rs made tests hard to edit.

[ffe] Expose EvaluationFailure

This is required to allow tracers return more precise error codes.

[ffe] remove support for JSON:API

Merge remote-tracking branch 'origin/main' into HEAD

[ffe] fix clippy

Merge remote-tracking branch 'origin/main' into HEAD

refactor(ffe): merge EvaluationError and EvalutionFailure into one type

The distinction served us well in Eppo but it's less useful as we're
migrating to OpenFeature and it handles these various errors rather
similarly.

Merge branch 'main' into ffe-pyo3-methods

Co-authored-by: oleksii.shmalko <[email protected]>
avara1986 added a commit to DataDog/dd-trace-py that referenced this pull request Nov 12, 2025
## Description

<!-- Provide an overview of the change and motivation for the change -->
Integrate datadog-ffe from libdatadog:
DataDog/libdatadog#1289

## Testing

<!-- Describe your testing strategy or note what tests are included -->

Tested manually that native bindings work:
```
>>> from ddtrace.internal.native._native import ffe
>>> with open("/Users/oleksii.shmalko/dd/libdatadog/datadog-ffe/tests/data/flags-v1.json", 'rb') as f:
...     json = f.read()
... 
>>> config = ffe.Configuration(json)
>>> details = config.resolve_value("numeric_flag", ffe.FlagType.Float, {})
>>> details.variant
'pi'
>>> details.value
3.1415926
```

More testing will be done as part of FFE feature.

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

This PR is stacked against
#15219

---------

Co-authored-by: Alberto Vara <[email protected]>
avara1986 added a commit to DataDog/dd-trace-py that referenced this pull request Nov 13, 2025
Reopening #15098 as it was accidentally merged too early.

## Description

<!-- Provide an overview of the change and motivation for the change -->
Integrate datadog-ffe from libdatadog:
DataDog/libdatadog#1289

## Testing

<!-- Describe your testing strategy or note what tests are included -->

Tested manually that native bindings work:
```
>>> from ddtrace.internal.native._native import ffe
>>> with open("/Users/oleksii.shmalko/dd/libdatadog/datadog-ffe/tests/data/flags-v1.json", 'rb') as f:
...     json = f.read()
... 
>>> config = ffe.Configuration(json)
>>> details = config.resolve_value("numeric_flag", ffe.FlagType.Float, {})
>>> details.variant
'pi'
>>> details.value
3.1415926
```

More testing will be done as part of FFE feature.

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

This PR is stacked against
#15219

---------

Co-authored-by: Alberto Vara <[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.

6 participants