diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 918b39ad7..5f2e9dc2c 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -16,4 +16,3 @@ jobs: delay: '3' retries: '30' polling_interval: '1' - checks_exclude: 'coverage' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b0e13c7bc..3b7cbe5c9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -31,7 +31,7 @@ jobs: - name: Install cargo-llvm-cov uses: taiki-e/install-action@v2 with: - tool: cargo-llvm-cov@0.6.9,nextest@0.9.68 + tool: cargo-llvm-cov@0.6.13,nextest@0.9.81 - name: Generate code coverage (including doc tests) run: | cargo llvm-cov --all-features --workspace --no-report nextest diff --git a/Cargo.lock b/Cargo.lock index 5ab0cfb1e..d41dcb304 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.5.0", "cexpr", @@ -1577,13 +1577,13 @@ dependencies = [ [[package]] name = "datadog-protos" version = "0.1.0" -source = "git+https://github.com/DataDog/saluki-backport/#a3e224b2da67f5e4a65e33703aaaa469a3bd3924" +source = "git+https://github.com/DataDog/saluki-backport/?rev=3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751#3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751" dependencies = [ "bytes", "prost 0.13.1", "protobuf", "protobuf-codegen", - "tonic 0.12.1", + "tonic 0.12.3", "tonic-build", ] @@ -1615,7 +1615,7 @@ dependencies = [ [[package]] name = "datadog-serverless-trace-mini-agent" -version = "0.7.2" +version = "0.8.0" dependencies = [ "datadog-trace-mini-agent", "datadog-trace-protobuf", @@ -1864,7 +1864,7 @@ dependencies = [ [[package]] name = "ddsketch-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/saluki-backport/#a3e224b2da67f5e4a65e33703aaaa469a3bd3924" +source = "git+https://github.com/DataDog/saluki-backport/?rev=3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751#3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751" dependencies = [ "datadog-protos", "float_eq", @@ -3155,9 +3155,9 @@ checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -5547,9 +5547,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -5647,9 +5647,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-trait", "base64 0.22.1", diff --git a/LICENSE-3rdparty.yml b/LICENSE-3rdparty.yml index 4702a11f6..2734e7f56 100644 --- a/LICENSE-3rdparty.yml +++ b/LICENSE-3rdparty.yml @@ -21141,16 +21141,16 @@ third_party_libraries: - package_name: ring package_version: 0.16.20 repository: https://github.com/briansmith/ring - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/LICENSE) + license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/LICENSE) licenses: - - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/LICENSE) + - license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/LICENSE) text: "Note that it is easy for this file to get out of sync with the licenses in the\nsource code files. It's recommended to compare the licenses in the source code\nwith what's mentioned here.\n\n*ring* is derived from BoringSSL, so the licensing situation in *ring* is\nsimilar to BoringSSL.\n\n*ring* uses an ISC-style license like BoringSSL for code in new files,\nincluding in particular all the Rust code:\n\n Copyright 2015-2016 Brian Smith.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHORS DISCLAIM ALL WARRANTIES\n WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY\n SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\nBoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL\nlicensing. Files that are completely new have a Google copyright and an ISC\nlicense. This license is reproduced at the bottom of this file.\n\nContributors to BoringSSL are required to follow the CLA rules for Chromium:\nhttps://cla.developers.google.com/clas\n\nFiles in third_party/ have their own licenses, as described therein. The MIT\nlicense, for third_party/fiat, which, unlike other third_party directories, is\ncompiled into non-test libraries, is included below.\n\nThe OpenSSL toolkit stays under a dual license, i.e. both the conditions of the\nOpenSSL License and the original SSLeay license apply to the toolkit. See below\nfor the actual license texts. Actually both licenses are BSD-style Open Source\nlicenses. In case of any license issues related to OpenSSL please contact\nopenssl-core@openssl.org.\n\nThe following are Google-internal bug numbers where explicit permission from\nsome authors is recorded for use of their work:\n 27287199\n 27287880\n 27287883\n\n OpenSSL License\n ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in\n * the documentation and/or other materials provided with the\n * distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n * software must display the following acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n * endorse or promote products derived from this software without\n * prior written permission. For written permission, please contact\n * openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n * nor may \"OpenSSL\" appear in their names without prior written\n * permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n * acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com). This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n\nISC license used for completely new code in BoringSSL:\n\n/* Copyright (c) 2015, Google Inc.\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */\n\n\nThe code in third_party/fiat carries the MIT license:\n\nCopyright (c) 2015-2016 the fiat-crypto authors (see\nhttps://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" - package_name: ring package_version: 0.17.8 repository: https://github.com/briansmith/ring - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/ring-0.17.8/LICENSE) + license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/LICENSE) licenses: - - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/ring-0.17.8/LICENSE) + - license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/LICENSE) text: "Note that it is easy for this file to get out of sync with the licenses in the\nsource code files. It's recommended to compare the licenses in the source code\nwith what's mentioned here.\n\n*ring* is derived from BoringSSL, so the licensing situation in *ring* is\nsimilar to BoringSSL.\n\n*ring* uses an ISC-style license like BoringSSL for code in new files,\nincluding in particular all the Rust code:\n\n Copyright 2015-2016 Brian Smith.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHORS DISCLAIM ALL WARRANTIES\n WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY\n SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\nBoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL\nlicensing. Files that are completely new have a Google copyright and an ISC\nlicense. This license is reproduced at the bottom of this file.\n\nContributors to BoringSSL are required to follow the CLA rules for Chromium:\nhttps://cla.developers.google.com/clas\n\nFiles in third_party/ have their own licenses, as described therein. The MIT\nlicense, for third_party/fiat, which, unlike other third_party directories, is\ncompiled into non-test libraries, is included below.\n\nThe OpenSSL toolkit stays under a dual license, i.e. both the conditions of the\nOpenSSL License and the original SSLeay license apply to the toolkit. See below\nfor the actual license texts. Actually both licenses are BSD-style Open Source\nlicenses. In case of any license issues related to OpenSSL please contact\nopenssl-core@openssl.org.\n\nThe following are Google-internal bug numbers where explicit permission from\nsome authors is recorded for use of their work:\n 27287199\n 27287880\n 27287883\n\n OpenSSL License\n ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in\n * the documentation and/or other materials provided with the\n * distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n * software must display the following acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n * endorse or promote products derived from this software without\n * prior written permission. For written permission, please contact\n * openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n * nor may \"OpenSSL\" appear in their names without prior written\n * permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n * acknowledgment:\n * \"This product includes software developed by the OpenSSL Project\n * for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com). This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n\nISC license used for completely new code in BoringSSL:\n\n/* Copyright (c) 2015, Google Inc.\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */\n\n\nThe code in third_party/fiat carries the MIT license:\n\nCopyright (c) 2015-2016 the fiat-crypto authors (see\nhttps://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" - package_name: rmp package_version: 0.8.14 @@ -28934,37 +28934,33 @@ third_party_libraries: END OF TERMS AND CONDITIONS - package_name: tokio-stream - package_version: 0.1.15 + package_version: 0.1.16 repository: https://github.com/tokio-rs/tokio license: MIT licenses: - license: MIT text: | - Copyright (c) 2023 Tokio Contributors + MIT License - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: + Copyright (c) Tokio Contributors - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. - package_name: tokio-util package_version: 0.7.11 repository: https://github.com/tokio-rs/tokio @@ -29688,7 +29684,7 @@ third_party_libraries: limitations under the License. - package_name: tonic - package_version: 0.12.1 + package_version: 0.12.3 repository: https://github.com/hyperium/tonic license: MIT licenses: @@ -31557,9 +31553,9 @@ third_party_libraries: - package_name: webpki package_version: 0.21.4 repository: https://github.com/briansmith/webpki - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/webpki-0.21.4/LICENSE) + license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/webpki-0.21.4/LICENSE) licenses: - - license: License specified in file ($CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/webpki-0.21.4/LICENSE) + - license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/webpki-0.21.4/LICENSE) text: | Except as otherwise noted, this project is licensed under the following (ISC-style) terms: diff --git a/dogstatsd/Cargo.toml b/dogstatsd/Cargo.toml index 30f3b7cc6..fb2ad1ce4 100644 --- a/dogstatsd/Cargo.toml +++ b/dogstatsd/Cargo.toml @@ -9,8 +9,8 @@ license.workspace = true bench = false [dependencies] -datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki-backport/" } -ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki-backport/" } +datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki-backport/", rev = "3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751" } +ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki-backport/", rev = "3c5d87ab82dea4a1a98ef0c60fb3659ca35c2751" } hashbrown = { version = "0.14.3", default-features = false, features = ["inline-more"] } protobuf = { version = "3.5.0", default-features = false } ustr = { version = "1.0.0", default-features = false } diff --git a/dogstatsd/src/datadog.rs b/dogstatsd/src/datadog.rs index b95882975..e73024458 100644 --- a/dogstatsd/src/datadog.rs +++ b/dogstatsd/src/datadog.rs @@ -8,7 +8,7 @@ use protobuf::Message; use reqwest; use serde::{Serialize, Serializer}; use serde_json; -use tracing::debug; +use tracing::{debug, error}; /// Interface for the `DogStatsD` metrics intake API. #[derive(Debug)] @@ -20,11 +20,18 @@ pub struct DdApi { impl DdApi { #[must_use] - pub fn new(api_key: String, site: String) -> Self { + pub fn new(api_key: String, site: String, https_proxy: Option) -> Self { + let client = match Self::build_client(https_proxy) { + Ok(client) => client, + Err(e) => { + error!("Unable to parse proxy URL, no proxy will be used. {:?}", e); + reqwest::Client::new() + } + }; DdApi { api_key, fqdn_site: site, - client: reqwest::Client::new(), + client, } } @@ -96,6 +103,14 @@ impl DdApi { } }; } + + fn build_client(https_proxy: Option) -> Result { + let mut builder = reqwest::Client::builder(); + if let Some(proxy) = https_proxy { + builder = builder.proxy(reqwest::Proxy::https(proxy)?); + } + builder.build() + } } #[derive(Debug, Serialize, Clone, Copy)] diff --git a/dogstatsd/src/flusher.rs b/dogstatsd/src/flusher.rs index 7969c7f86..601d223b7 100644 --- a/dogstatsd/src/flusher.rs +++ b/dogstatsd/src/flusher.rs @@ -18,8 +18,13 @@ pub fn build_fqdn_metrics(site: String) -> String { #[allow(clippy::await_holding_lock)] impl Flusher { - pub fn new(api_key: String, aggregator: Arc>, site: String) -> Self { - let dd_api = datadog::DdApi::new(api_key, site); + pub fn new( + api_key: String, + aggregator: Arc>, + site: String, + https_proxy: Option, + ) -> Self { + let dd_api = datadog::DdApi::new(api_key, site, https_proxy); Flusher { dd_api, aggregator } } diff --git a/dogstatsd/tests/integration_test.rs b/dogstatsd/tests/integration_test.rs index 1acb6543e..7ffce5411 100644 --- a/dogstatsd/tests/integration_test.rs +++ b/dogstatsd/tests/integration_test.rs @@ -41,6 +41,7 @@ async fn dogstatsd_server_ships_series() { "mock-api-key".to_string(), Arc::clone(&metrics_aggr), mock_server.url(), + None, ); let server_address = "127.0.0.1:18125"; diff --git a/serverless/Cargo.toml b/serverless/Cargo.toml index 558e4be33..6ac825258 100644 --- a/serverless/Cargo.toml +++ b/serverless/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datadog-serverless-trace-mini-agent" -version = "0.7.2" +version = "0.8.0" edition = "2021" [dependencies] diff --git a/serverless/src/main.rs b/serverless/src/main.rs index ff09303dd..4352d1cb8 100644 --- a/serverless/src/main.rs +++ b/serverless/src/main.rs @@ -40,6 +40,9 @@ pub async fn main() { .map(|val| val.to_lowercase() != "false") .unwrap_or(true); + let https_proxy = env::var("DD_PROXY_HTTPS") + .or_else(|_| env::var("HTTPS_PROXY")) + .ok(); debug!("Starting serverless trace mini agent"); let mini_agent_version = env!("CARGO_PKG_VERSION").to_string(); @@ -79,7 +82,8 @@ pub async fn main() { let mut metrics_flusher = if dd_use_dogstatsd { debug!("Starting dogstatsd"); - let (_, metrics_flusher) = start_dogstatsd(dd_dogstatsd_port, dd_api_key, dd_site).await; + let (_, metrics_flusher) = + start_dogstatsd(dd_dogstatsd_port, dd_api_key, dd_site, https_proxy).await; info!("dogstatsd-udp: starting to listen on port {dd_dogstatsd_port}"); metrics_flusher } else { @@ -104,6 +108,7 @@ async fn start_dogstatsd( port: u16, dd_api_key: Option, dd_site: String, + https_proxy: Option, ) -> (CancellationToken, Option) { let metrics_aggr = Arc::new(Mutex::new( MetricsAggregator::new(EMPTY_TAGS, CONTEXTS).expect("Failed to create metrics aggregator"), @@ -131,6 +136,7 @@ async fn start_dogstatsd( dd_api_key, Arc::clone(&metrics_aggr), build_fqdn_metrics(dd_site), + https_proxy, ); Some(metrics_flusher) } diff --git a/trace-mini-agent/src/config.rs b/trace-mini-agent/src/config.rs index a2e7fe1fb..d93a7457f 100644 --- a/trace-mini-agent/src/config.rs +++ b/trace-mini-agent/src/config.rs @@ -20,7 +20,7 @@ pub struct Config { pub dd_site: String, pub dd_dogstatsd_port: u16, pub env_type: trace_utils::EnvironmentType, - pub function_name: Option, + pub app_name: Option, pub max_request_content_length: usize, pub obfuscation_config: obfuscation_config::ObfuscationConfig, pub os: String, @@ -41,7 +41,7 @@ impl Config { .map_err(|_| anyhow::anyhow!("DD_API_KEY environment variable is not set"))? .into(); - let (function_name, env_type) = read_cloud_env().ok_or_else(|| { + let (app_name, env_type) = read_cloud_env().ok_or_else(|| { anyhow::anyhow!("Unable to identify environment. Shutting down Mini Agent.") })?; @@ -70,7 +70,7 @@ impl Config { })?; Ok(Config { - function_name: Some(function_name), + app_name: Some(app_name), env_type, os: env::consts::OS.to_string(), max_request_content_length: 10 * 1024 * 1024, // 10MB in Bytes @@ -90,7 +90,9 @@ impl Config { ..Default::default() }, obfuscation_config, - proxy_url: env::var("HTTPS_PROXY").ok(), + proxy_url: env::var("DD_PROXY_HTTPS") + .or_else(|_| env::var("HTTPS_PROXY")) + .ok(), }) } } diff --git a/trace-mini-agent/src/env_verifier.rs b/trace-mini-agent/src/env_verifier.rs index 3400006aa..393952d9c 100644 --- a/trace-mini-agent/src/env_verifier.rs +++ b/trace-mini-agent/src/env_verifier.rs @@ -5,6 +5,7 @@ use async_trait::async_trait; use hyper::{Body, Client, Method, Request, Response}; use log::{debug, error}; use serde::{Deserialize, Serialize}; +use std::env; use std::fs; use std::path::Path; use std::process; @@ -113,6 +114,9 @@ impl ServerlessEnvVerifier { } }; trace_utils::MiniAgentMetadata { + azure_spring_app_hostname: trace_utils::MiniAgentMetadata::default() + .azure_spring_app_hostname, + azure_spring_app_name: trace_utils::MiniAgentMetadata::default().azure_spring_app_name, gcp_project_id: Some(gcp_metadata.project.project_id), gcp_region: Some(get_region_from_gcp_region_string( gcp_metadata.instance.region, @@ -140,9 +144,13 @@ impl EnvVerifier for ServerlessEnvVerifier { .verify_gcp_environment_or_exit(verify_env_timeout) .await; } - trace_utils::EnvironmentType::AzureSpringApp => { - trace_utils::MiniAgentMetadata::default() - } + trace_utils::EnvironmentType::AzureSpringApp => trace_utils::MiniAgentMetadata { + azure_spring_app_hostname: env::var("HOSTNAME").ok(), + azure_spring_app_name: env::var("ASCSVCRT_SPRING__APPLICATION__NAME").ok(), + gcp_project_id: trace_utils::MiniAgentMetadata::default().gcp_project_id, + gcp_region: trace_utils::MiniAgentMetadata::default().gcp_region, + version: trace_utils::MiniAgentMetadata::default().version, + }, trace_utils::EnvironmentType::LambdaFunction => { trace_utils::MiniAgentMetadata::default() } @@ -468,6 +476,8 @@ mod tests { assert_eq!( res, trace_utils::MiniAgentMetadata { + azure_spring_app_hostname: None, + azure_spring_app_name: None, gcp_project_id: Some("unknown".to_string()), gcp_region: Some("unknown".to_string()), version: None diff --git a/trace-mini-agent/src/trace_processor.rs b/trace-mini-agent/src/trace_processor.rs index 778e4daa8..389719a13 100644 --- a/trace-mini-agent/src/trace_processor.rs +++ b/trace-mini-agent/src/trace_processor.rs @@ -41,12 +41,12 @@ impl TraceChunkProcessor for ChunkProcessor { fn process(&mut self, chunk: &mut pb::TraceChunk, root_span_index: usize) { trace_utils::set_serverless_root_span_tags( &mut chunk.spans[root_span_index], - self.config.function_name.clone(), + self.config.app_name.clone(), &self.config.env_type, ); for span in chunk.spans.iter_mut() { trace_utils::enrich_span_with_mini_agent_metadata(span, &self.mini_agent_metadata); - trace_utils::enrich_span_with_azure_metadata(span); + trace_utils::enrich_span_with_azure_function_metadata(span); obfuscate_span(span, &self.config.obfuscation_config); } } @@ -156,7 +156,7 @@ mod tests { fn create_test_config() -> Config { Config { - function_name: Some("dummy_function_name".to_string()), + app_name: Some("dummy_function_name".to_string()), max_request_content_length: 10 * 1024 * 1024, trace_flush_interval: 3, stats_flush_interval: 3, diff --git a/trace-utils/src/trace_utils.rs b/trace-utils/src/trace_utils.rs index ec3278a40..7ddda2f96 100644 --- a/trace-utils/src/trace_utils.rs +++ b/trace-utils/src/trace_utils.rs @@ -435,7 +435,7 @@ fn set_top_level_span(span: &mut pb::Span, is_top_level: bool) { pub fn set_serverless_root_span_tags( span: &mut pb::Span, - function_name: Option, + app_name: Option, env_type: &EnvironmentType, ) { span.r#type = "serverless".to_string(); @@ -450,8 +450,15 @@ pub fn set_serverless_root_span_tags( span.meta .insert("origin".to_string(), origin_tag.to_string()); - if let Some(function_name) = function_name { - span.meta.insert("functionname".to_string(), function_name); + if let Some(function_name) = app_name { + match env_type { + EnvironmentType::CloudFunction + | EnvironmentType::AzureFunction + | EnvironmentType::LambdaFunction => { + span.meta.insert("functionname".to_string(), function_name); + } + _ => {} + } } } @@ -471,6 +478,8 @@ pub enum EnvironmentType { #[derive(Clone, Debug, Eq, PartialEq)] pub struct MiniAgentMetadata { + pub azure_spring_app_hostname: Option, + pub azure_spring_app_name: Option, pub gcp_project_id: Option, pub gcp_region: Option, pub version: Option, @@ -479,6 +488,8 @@ pub struct MiniAgentMetadata { impl Default for MiniAgentMetadata { fn default() -> Self { MiniAgentMetadata { + azure_spring_app_hostname: Default::default(), + azure_spring_app_name: Default::default(), gcp_project_id: Default::default(), gcp_region: Default::default(), version: env::var("DD_MINI_AGENT_VERSION").ok(), @@ -490,6 +501,18 @@ pub fn enrich_span_with_mini_agent_metadata( span: &mut pb::Span, mini_agent_metadata: &MiniAgentMetadata, ) { + if let Some(azure_spring_app_hostname) = &mini_agent_metadata.azure_spring_app_hostname { + span.meta.insert( + "azurespringapp.hostname".to_string(), + azure_spring_app_hostname.to_string(), + ); + } + if let Some(azure_spring_app_name) = &mini_agent_metadata.azure_spring_app_name { + span.meta.insert( + "azurespringapp.name".to_string(), + azure_spring_app_name.to_string(), + ); + } if let Some(gcp_project_id) = &mini_agent_metadata.gcp_project_id { span.meta .insert("project_id".to_string(), gcp_project_id.to_string()); @@ -506,7 +529,7 @@ pub fn enrich_span_with_mini_agent_metadata( } } -pub fn enrich_span_with_azure_metadata(span: &mut pb::Span) { +pub fn enrich_span_with_azure_function_metadata(span: &mut pb::Span) { if let Some(aas_metadata) = azure_app_services::get_function_metadata() { let aas_tags = [ ("aas.resource.id", aas_metadata.get_resource_id()),