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

Add _dd.gcrfx.resource_name to serverless compatibility layer for Google Cloud Functions #770

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

nina9753
Copy link

@nina9753 nina9753 commented Nov 27, 2024

What does this PR do?

Adds gcrfx.resource_name span tag to cloud run services needed for trace mapping by creating a unified tag of the necessary fields i.e projects/{}/locations/{}/functions/{} to the top level span only
Updates tests to look for the new gcrfx.resource_name span tag

Motivation

https://datadoghq.atlassian.net/browse/SVLS-6008

Additional Notes

relates to this PR #31434
billing is now done in this PR

@pr-commenter
Copy link

pr-commenter bot commented Nov 27, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-12-12 19:38:59

Comparing candidate commit ac860e7 in PR branch nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions with baseline commit 373b778 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics.

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 ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 625.873µs 627.258µs ± 1.536µs 627.020µs ± 0.269µs 627.376µs 628.031µs 634.429µs 642.055µs 2.40% 7.555 63.416 0.24% 0.109µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1557499.315op/s 1594248.395op/s ± 3832.669op/s 1594845.096op/s ± 685.042op/s 1595409.415op/s 1596534.180op/s 1597080.911op/s 1597768.237op/s 0.18% -7.494 62.581 0.24% 271.011op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 463.716µs 465.008µs ± 0.656µs 464.923µs ± 0.296µs 465.271µs 465.655µs 466.189µs 470.780µs 1.26% 4.440 34.081 0.14% 0.046µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2124135.840op/s 2150505.073op/s ± 3014.338op/s 2150895.143op/s ± 1367.312op/s 2151959.365op/s 2153504.510op/s 2155097.315op/s 2156491.357op/s 0.26% -4.371 33.329 0.14% 213.146op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 179.288µs 179.894µs ± 0.367µs 179.883µs ± 0.300µs 180.188µs 180.534µs 180.695µs 180.854µs 0.54% 0.244 -0.816 0.20% 0.026µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5529316.775op/s 5558860.453op/s ± 11347.457op/s 5559181.078op/s ± 9261.466op/s 5568238.388op/s 5575695.868op/s 5577184.345op/s 5577630.274op/s 0.33% -0.237 -0.823 0.20% 802.386op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 47.439µs 47.579µs ± 0.066µs 47.573µs ± 0.035µs 47.608µs 47.683µs 47.720µs 48.100µs 1.11% 2.624 18.703 0.14% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 20789845.396op/s 21017859.477op/s ± 28857.835op/s 21020299.440op/s ± 15373.557op/s 21034930.789op/s 21055228.875op/s 21072116.456op/s 21079525.259op/s 0.28% -2.568 18.148 0.14% 2040.557op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 49.540µs 49.874µs ± 0.132µs 49.878µs ± 0.060µs 49.936µs 50.011µs 50.075µs 51.092µs 2.43% 3.537 34.496 0.26% 0.009µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 19572522.608op/s 20050827.965op/s ± 52734.704op/s 20049099.559op/s ± 23985.303op/s 20075252.217op/s 20128830.150op/s 20165379.536op/s 20185849.024op/s 0.68% -3.350 32.474 0.26% 3728.907op/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 [627.046µs; 627.471µs] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1593717.224op/s; 1594779.566op/s] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [464.917µs; 465.099µs] or [-0.020%; +0.020%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2150087.315op/s; 2150922.832op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [179.843µs; 179.945µs] or [-0.028%; +0.028%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5557287.805op/s; 5560433.101op/s] or [-0.028%; +0.028%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [47.570µs; 47.588µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [21013860.059op/s; 21021858.896op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [49.855µs; 49.892µs] or [-0.037%; +0.037%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20043519.442op/s; 20058136.488op/s] or [-0.036%; +0.036%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 140.586µs 141.371µs ± 0.339µs 141.350µs ± 0.130µs 141.458µs 141.759µs 142.054µs 144.556µs 2.27% 4.610 39.527 0.24% 0.024µ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 [141.324µs; 141.418µs] or [-0.033%; +0.033%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 6.745ms 6.765ms ± 0.008ms 6.764ms ± 0.004ms 6.768ms 6.775ms 6.780ms 6.836ms 1.06% 3.930 34.126 0.11% 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 [6.764ms; 6.766ms] or [-0.016%; +0.016%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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.435µs 3.262µs ± 1.434µs 3.104µs ± 0.019µs 3.122µs 3.173µs 14.159µs 15.230µs 390.73% 7.636 58.208 43.87% 0.101µ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.063µs; 3.460µs] or [-6.095%; +6.095%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 60.740ms 61.066ms ± 0.223ms 61.057ms ± 0.124ms 61.159ms 61.349ms 61.786ms 62.393ms 2.19% 2.384 11.530 0.36% 0.016ms 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 [61.035ms; 61.096ms] or [-0.051%; +0.051%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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.705µs 2.762µs ± 0.018µs 2.764µs ± 0.012µs 2.775µs 2.792µs 2.800µs 2.803µs 1.39% -0.391 0.280 0.66% 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.760µs; 2.765µs] or [-0.091%; +0.091%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 4.613µs 4.629µs ± 0.006µs 4.629µs ± 0.004µs 4.632µs 4.639µs 4.642µs 4.650µs 0.45% 0.158 0.619 0.13% 0.000µs 1 200
credit_card/is_card_number/ throughput 215053784.842op/s 216037656.524op/s ± 275178.060op/s 216021487.034op/s ± 164776.524op/s 216224821.191op/s 216440738.408op/s 216715635.929op/s 216794087.952op/s 0.36% -0.148 0.611 0.13% 19458.027op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 95.126µs 95.642µs ± 0.433µs 95.599µs ± 0.200µs 95.782µs 96.126µs 96.311µs 100.461µs 5.09% 7.005 74.856 0.45% 0.031µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 9954142.687op/s 10455886.569op/s ± 45920.974op/s 10460408.455op/s ± 21831.928op/s 10482565.920op/s 10499271.406op/s 10502429.296op/s 10512417.267op/s 0.50% -6.638 69.393 0.44% 3247.103op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 85.557µs 86.206µs ± 0.486µs 86.149µs ± 0.237µs 86.384µs 86.813µs 87.077µs 91.101µs 5.75% 5.217 49.618 0.56% 0.034µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 10976816.490op/s 11600505.972op/s ± 63617.995op/s 11607765.691op/s ± 31984.227op/s 11639973.707op/s 11675988.162op/s 11684918.062op/s 11688063.716op/s 0.69% -4.821 44.395 0.55% 4498.472op/s 1 200
credit_card/is_card_number/37828224631 execution_time 4.618µs 4.630µs ± 0.007µs 4.629µs ± 0.004µs 4.633µs 4.639µs 4.652µs 4.690µs 1.32% 3.607 27.214 0.15% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 213203986.293op/s 215982754.159op/s ± 324466.949op/s 216012288.217op/s ± 172483.102op/s 216184360.689op/s 216366463.960op/s 216497872.646op/s 216545412.258op/s 0.25% -3.535 26.413 0.15% 22943.278op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 82.324µs 82.886µs ± 0.347µs 82.852µs ± 0.239µs 83.102µs 83.558µs 83.786µs 83.823µs 1.17% 0.525 -0.257 0.42% 0.025µs 1 200
credit_card/is_card_number/378282246310005 throughput 11929924.609op/s 12064912.661op/s ± 50444.961op/s 12069766.444op/s ± 34973.773op/s 12104347.581op/s 12137677.062op/s 12144402.279op/s 12147199.157op/s 0.64% -0.506 -0.286 0.42% 3566.997op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 58.990µs 59.073µs ± 0.049µs 59.064µs ± 0.016µs 59.084µs 59.124µs 59.177µs 59.545µs 0.81% 5.638 46.770 0.08% 0.003µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 16794077.736op/s 16928186.249op/s ± 14104.649op/s 16930801.276op/s ± 4655.160op/s 16935050.694op/s 16940189.446op/s 16947942.733op/s 16952046.052op/s 0.13% -5.595 46.237 0.08% 997.349op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.832µs 6.844µs ± 0.004µs 6.843µs ± 0.002µs 6.846µs 6.850µs 6.855µs 6.862µs 0.27% 0.546 2.682 0.06% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 145728334.456op/s 146123307.692op/s ± 83763.493op/s 146128948.146op/s ± 45140.814op/s 146170289.638op/s 146244330.041op/s 146326398.436op/s 146359817.949op/s 0.16% -0.538 2.663 0.06% 5922.973op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 4.615µs 4.628µs ± 0.006µs 4.628µs ± 0.004µs 4.632µs 4.637µs 4.642µs 4.659µs 0.67% 0.791 3.000 0.12% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 214656989.851op/s 216075077.956op/s ± 269257.681op/s 216090924.182op/s ± 179493.376op/s 216256272.211op/s 216474112.866op/s 216615980.009op/s 216676576.370op/s 0.27% -0.775 2.921 0.12% 19039.393op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 75.190µs 75.419µs ± 0.086µs 75.417µs ± 0.055µs 75.470µs 75.574µs 75.625µs 75.672µs 0.34% 0.163 0.080 0.11% 0.006µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 13214966.974op/s 13259312.210op/s ± 15198.157op/s 13259637.002op/s ± 9612.286op/s 13269200.198op/s 13284688.666op/s 13290894.333op/s 13299716.716op/s 0.30% -0.156 0.077 0.11% 1074.672op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 65.857µs 66.104µs ± 0.113µs 66.094µs ± 0.064µs 66.165µs 66.296µs 66.418µs 66.617µs 0.79% 0.760 1.985 0.17% 0.008µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 15011121.068op/s 15127804.050op/s ± 25862.706op/s 15130046.231op/s ± 14743.840op/s 15142853.145op/s 15168621.507op/s 15181424.242op/s 15184473.875op/s 0.36% -0.742 1.930 0.17% 1828.770op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 4.613µs 4.628µs ± 0.005µs 4.628µs ± 0.004µs 4.632µs 4.637µs 4.639µs 4.642µs 0.32% 0.106 -0.336 0.11% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 215402075.734op/s 216078505.098op/s ± 247169.383op/s 216093387.552op/s ± 174446.380op/s 216254540.902op/s 216458088.781op/s 216634328.794op/s 216780756.610op/s 0.32% -0.101 -0.336 0.11% 17477.515op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 62.436µs 62.858µs ± 0.189µs 62.853µs ± 0.107µs 62.970µs 63.163µs 63.311µs 63.348µs 0.79% 0.015 -0.026 0.30% 0.013µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 15785876.009op/s 15909076.942op/s ± 47892.457op/s 15910069.490op/s ± 27037.685op/s 15935300.676op/s 15998225.761op/s 16011842.973op/s 16016279.793op/s 0.67% 0.002 -0.031 0.30% 3386.508op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 58.979µs 59.077µs ± 0.040µs 59.069µs ± 0.020µs 59.100µs 59.151µs 59.185µs 59.245µs 0.30% 0.703 1.438 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 16879167.106op/s 16927175.895op/s ± 11593.392op/s 16929255.182op/s ± 5782.859op/s 16933979.495op/s 16944416.553op/s 16952815.772op/s 16955060.612op/s 0.15% -0.697 1.426 0.07% 819.777op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.831µs 6.843µs ± 0.005µs 6.843µs ± 0.002µs 6.846µs 6.852µs 6.856µs 6.859µs 0.23% 0.317 0.693 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 145794952.463op/s 146126375.284op/s ± 98152.771op/s 146132099.720op/s ± 52831.518op/s 146183455.687op/s 146292403.410op/s 146351669.663op/s 146387331.869op/s 0.17% -0.311 0.689 0.07% 6940.449op/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 [4.628µs; 4.630µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number/ throughput [215999519.492op/s; 216075793.557op/s] or [-0.018%; +0.018%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [95.582µs; 95.702µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [10449522.364op/s; 10462250.775op/s] or [-0.061%; +0.061%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [86.138µs; 86.273µs] or [-0.078%; +0.078%] None None None
credit_card/is_card_number/ 378282246310005 throughput [11591689.130op/s; 11609322.814op/s] or [-0.076%; +0.076%] None None None
credit_card/is_card_number/37828224631 execution_time [4.629µs; 4.631µs] or [-0.021%; +0.021%] None None None
credit_card/is_card_number/37828224631 throughput [215937786.160op/s; 216027722.157op/s] or [-0.021%; +0.021%] None None None
credit_card/is_card_number/378282246310005 execution_time [82.838µs; 82.935µs] or [-0.058%; +0.058%] None None None
credit_card/is_card_number/378282246310005 throughput [12057921.474op/s; 12071903.847op/s] or [-0.058%; +0.058%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [59.066µs; 59.080µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [16926231.480op/s; 16930141.017op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.843µs; 6.844µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/x371413321323331 throughput [146111698.877op/s; 146134916.506op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ execution_time [4.627µs; 4.629µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/ throughput [216037761.431op/s; 216112394.481op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [75.407µs; 75.431µs] or [-0.016%; +0.016%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [13257205.891op/s; 13261418.528op/s] or [-0.016%; +0.016%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [66.088µs; 66.119µs] or [-0.024%; +0.024%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [15124219.727op/s; 15131388.372op/s] or [-0.024%; +0.024%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [4.627µs; 4.629µs] or [-0.016%; +0.016%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [216044249.798op/s; 216112760.397op/s] or [-0.016%; +0.016%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [62.832µs; 62.884µs] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [15902439.508op/s; 15915714.376op/s] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [59.071µs; 59.082µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [16925569.162op/s; 16928782.628op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.843µs; 6.844µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [146112772.254op/s; 146139978.314op/s] or [-0.009%; +0.009%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 73.647µs 73.960µs ± 0.238µs 73.923µs ± 0.076µs 74.040µs 74.164µs 74.207µs 76.756µs 3.83% 8.270 93.725 0.32% 0.017µ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 [73.927µs; 73.993µs] or [-0.045%; +0.045%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 18.222µs 24.235µs ± 14.095µs 18.620µs ± 0.111µs 18.790µs 45.934µs 49.326µs 156.549µs 740.76% 5.426 42.305 58.01% 0.997µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [22.281µs; 26.188µs] or [-8.060%; +8.060%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 274.653ns 286.125ns ± 13.714ns 280.324ns ± 4.521ns 290.448ns 318.407ns 334.400ns 335.463ns 19.67% 1.925 3.550 4.78% 0.970ns 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 [284.224ns; 288.026ns] or [-0.664%; +0.664%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 190.110µs 192.486µs ± 0.828µs 192.431µs ± 0.540µs 193.000µs 194.007µs 194.328µs 194.800µs 1.23% 0.106 0.041 0.43% 0.059µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5133458.437op/s 5195266.436op/s ± 22330.831op/s 5196668.252op/s ± 14577.483op/s 5208958.038op/s 5229560.404op/s 5242544.487op/s 5260125.673op/s 1.22% -0.080 0.043 0.43% 1579.028op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.202µs 18.265µs ± 0.039µs 18.258µs ± 0.021µs 18.284µs 18.322µs 18.357µs 18.524µs 1.46% 1.850 9.226 0.21% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53983188.093op/s 54750874.020op/s ± 115674.382op/s 54770788.852op/s ± 62793.420op/s 54814674.589op/s 54903152.583op/s 54927530.026op/s 54940311.276op/s 0.31% -1.801 8.837 0.21% 8179.414op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 11.113µs 11.178µs ± 0.055µs 11.156µs ± 0.028µs 11.218µs 11.290µs 11.327µs 11.333µs 1.59% 0.978 -0.027 0.49% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 88237281.078op/s 89464557.245op/s ± 440731.835op/s 89640091.924op/s ± 229183.388op/s 89831448.481op/s 89900348.975op/s 89947698.239op/s 89986600.433op/s 0.39% -0.963 -0.068 0.49% 31164.447op/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 [192.372µs; 192.601µs] or [-0.060%; +0.060%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5192171.598op/s; 5198361.275op/s] or [-0.060%; +0.060%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.259µs; 18.270µs] or [-0.029%; +0.029%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54734842.663op/s; 54766905.377op/s] or [-0.029%; +0.029%] None None None
normalization/normalize_name/normalize_name/good execution_time [11.170µs; 11.186µs] or [-0.069%; +0.069%] None None None
normalization/normalize_name/normalize_name/good throughput [89403476.052op/s; 89525638.439op/s] or [-0.068%; +0.068%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ac860e7 1734031671 nina.rei/SLVS-6008/add-resource_name-mini-agent-gcp-cloud-functions
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 37.207µs 37.840µs ± 1.144µs 37.315µs ± 0.048µs 37.393µs 40.323µs 40.386µs 40.848µs 9.47% 1.700 0.926 3.01% 0.081µ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 [37.681µs; 37.998µs] or [-0.419%; +0.419%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 98.59155% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.99%. Comparing base (373b778) to head (ac860e7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
+ Coverage   70.95%   70.99%   +0.04%     
==========================================
  Files         313      313              
  Lines       45747    45870     +123     
==========================================
+ Hits        32458    32566     +108     
- Misses      13289    13304      +15     
Components Coverage Δ
crashtracker 38.27% <ø> (ø)
crashtracker-ffi 5.71% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 92.06% <ø> (ø)
data-pipeline-ffi 90.54% <ø> (ø)
ddcommon 82.31% <ø> (ø)
ddcommon-ffi 65.52% <ø> (ø)
ddtelemetry 59.51% <ø> (ø)
ddtelemetry-ffi 22.46% <ø> (ø)
dogstatsd 89.45% <ø> (ø)
dogstatsd-client 79.77% <ø> (ø)
ipc 82.76% <ø> (ø)
profiling 84.31% <ø> (ø)
profiling-ffi 77.55% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.56% <ø> (ø)
sidecar-ffi 1.18% <ø> (ø)
spawn-worker 54.37% <ø> (ø)
tinybytes 93.60% <ø> (ø)
trace-mini-agent 72.71% <100.00%> (+0.33%) ⬆️
trace-normalization 98.23% <ø> (ø)
trace-obfuscation 95.77% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.81% <98.29%> (+0.28%) ⬆️

Copy link
Contributor

@duncanpharvey duncanpharvey left a comment

Choose a reason for hiding this comment

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

Nice work! Just a few minor comments

trace-utils/src/trace_utils.rs Show resolved Hide resolved
env_type: &EnvironmentType,
) {
if let EnvironmentType::CloudFunction = env_type {
let function = span.meta.get("functionname");
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about passing the functionname in self.config.app_name.clone() as a parameter to the enrich_span_with_google_cloud_function_metadata method instead of fetching it from the span?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, I added this

);

span.meta.insert(
"_dd.gcrfx.resource_name".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this resource span tag needs to be prefixed with _dd? For Azure App Services and Functions the resource name is visible to end users (ie. not hidden by using _dd).

Copy link
Author

Choose a reason for hiding this comment

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

That's a good point i hid the tag for now since it was only to be used to billing and matching traces to their functions. resource_name is just a combination of other tags that the customer can see like location and project_id . I can expose the tag if we think the customers would find it useful

Copy link
Author

@nina9753 nina9753 Dec 12, 2024

Choose a reason for hiding this comment

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

nevermind! After talking about it again in person, I updated the tag to exclude the _dd prefix. this will now be visible to everyone

@nina9753 nina9753 changed the title Add _dd.gcrfx.resource_name to mini agent for Google Cloud Functions Add _dd.gcrfx.resource_name to serverless compatibility layer for Google Cloud Functions Dec 12, 2024
@nina9753 nina9753 closed this Dec 12, 2024
@nina9753 nina9753 reopened this Dec 12, 2024
Comment on lines +525 to +530
let Some(region) = &mini_agent_metadata.gcp_region else {
return;
};
let Some(project) = &mini_agent_metadata.gcp_project_id else {
return;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're short circuiting here on either the gcp_region or the gcp_project_id being empty there's a possibility that one of the span tags is not set even when the values is available. I'll approve since I think that occurrence should be rare but just wanted to point that out in case it's not what was intended!

Copy link
Author

Choose a reason for hiding this comment

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

let Some().... else {return;}; should check/handle the error if the value is empty and should return before adding the resource_name span tag.

Copy link
Contributor

@duncanpharvey duncanpharvey left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

3 participants