-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix: Format and log audit-level messages only when audit logging is enabled. #1734
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tippmar-nr
requested review from
a team,
jaffinito,
nrcventura,
nr-ahemsath and
chynesNR
June 21, 2023 20:06
Codecov Report
@@ Coverage Diff @@
## main #1734 +/- ##
=======================================
Coverage 82.69% 82.69%
=======================================
Files 389 389
Lines 24401 24414 +13
=======================================
+ Hits 20178 20189 +11
- Misses 4223 4225 +2
|
nr-ahemsath
approved these changes
Jun 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
nrcventura
reviewed
Jun 21, 2023
nrcventura
reviewed
Jun 21, 2023
chynesNR
added a commit
that referenced
this pull request
Jul 24, 2023
commit a544592 Author: Marty Tippin <[email protected]> Date: Fri Jul 21 15:46:32 2023 -0500 ci: bump JamesIves/github-pages-deploy-action from 4.4.2 to 4.4. (#1786) commit 798946f Author: Marty Tippin <[email protected]> Date: Thu Jul 20 13:55:03 2023 -0500 chore: Use Autofac instead of Castle.Windsor for .Net Framework builds (#1782) (#1784) commit fb41c06 Author: Alex Hemsath <[email protected]> Date: Wed Jul 19 16:47:15 2023 -0700 test: add an Elasticsearch 7.x server to test infrastructure and use it to test older clients (#1783) * Added 7.x Elasticsearch server to services and updated test apps and tests * Removed obsolete comment * Refactor credentials access commit 974335c Author: Marty Tippin <[email protected]> Date: Wed Jul 19 09:28:51 2023 -0500 test: Add .NET 7 Unit Test Build Targets (#1778) commit 561897d Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue Jul 18 09:12:29 2023 -0700 chore(main): release 10.13.0 (#1747) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 790a3b7 Author: Jacob Affinito <[email protected]> Date: Fri Jul 14 15:32:26 2023 -0700 fix: Remove invalid trailing comma added to W3C tracestate header. (#1779) commit 4b4e375 Author: Chris Hynes <[email protected]> Date: Fri Jul 14 08:29:23 2023 -0700 test: Update libraries called out by Dotty (#1774) (#1757) (#1776) commit aadce3a Author: Marty Tippin <[email protected]> Date: Thu Jul 13 11:40:03 2023 -0500 summary: Log Level Filtering (#1770) feat: Add support for filtering log events based on a list of log levels so that they are not forwarded to New Relic. Also adds new logging metrics to count the total number of filtered log events (Logging/denied). Refer to our [application logging configuration](https://docs.newrelic.com/docs/apm/agents/net-agent/configuration/net-agent-configuration/#application_logging) documentation for more details. (#1760) (#1761) (#1762) (#1766) commit 6c98ba2 Author: Marty Tippin <[email protected]> Date: Wed Jul 12 14:24:11 2023 -0500 ci: Add sha to pin debian:buster-slim image (#1772) commit 8341818 Author: Marty Tippin <[email protected]> Date: Wed Jul 12 13:41:43 2023 -0500 ci: Update debian image used in package deploy Dockerfile (#1771) commit eee7564 Author: Chris Hynes <[email protected]> Date: Wed Jul 12 11:05:27 2023 -0700 security: Update Grpc.Net.Client library to address Dependabot alerts. (#1768) (#1769) commit ec70f4e Author: Marty Tippin <[email protected]> Date: Mon Jul 10 15:47:34 2023 -0500 ci: Update AwsLamba unit tests to .NET 7.0 (#1759) commit 32f966d Author: Alex Hemsath <[email protected]> Date: Mon Jul 10 06:45:46 2023 -0700 chore: Weekly dependabot roundup 20230630 (#1753) * chore(deps): bump ossf/scorecard-action from 2.1.3 to 2.2.0 Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@80e868c...08b4669) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump google-github-actions/release-please-action Bumps [google-github-actions/release-please-action](https://github.com/google-github-actions/release-please-action) from 3.7.9 to 3.7.10. - [Release notes](https://github.com/google-github-actions/release-please-action/releases) - [Changelog](https://github.com/google-github-actions/release-please-action/blob/main/CHANGELOG.md) - [Commits](google-github-actions/release-please-action@51ee8ae...8016a66) --- updated-dependencies: - dependency-name: google-github-actions/release-please-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump step-security/harden-runner from 2.4.0 to 2.4.1 Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@128a634...55d479f) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 902b025 Author: Jacob Affinito <[email protected]> Date: Fri Jun 30 15:36:31 2023 -0700 fix: Refactor StackExchange.Redis v2+ instrumentation to eliminate potential memory leaks. commit 881989c Author: Marty Tippin <[email protected]> Date: Thu Jun 29 16:23:01 2023 -0500 ci: Add MSI certificate validation to ArtifactBuilder (#1752) commit 3fbc543 Author: Jacob Affinito <[email protected]> Date: Tue Jun 27 14:27:22 2023 -0700 fix: Update the MSI UI to clean up formatting and readability issues. (#1748) commit a695ce6 Author: Chris Hynes <[email protected]> Date: Tue Jun 27 09:58:12 2023 -0700 feat: Instrument OpenAsync() for SQL libraries. (#1725) commit dd490dc Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon Jun 26 17:30:55 2023 -0500 chore(main): release 10.12.1 (#1743) commit 386a277 Author: Marty Tippin <[email protected]> Date: Mon Jun 26 17:27:02 2023 -0500 fix: Resolved an issue in the `all_solutions.yml` workflow where the MSI installers were built with a self-signed certificate rather than the production code signing certificate. commit 68bdcf9 Author: Marty Tippin <[email protected]> Date: Mon Jun 26 17:17:20 2023 -0500 ci: Update all solutions workflow to create self-signed cert only on non-release builds. (#1742) commit f70ffca Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon Jun 26 10:57:24 2023 -0500 chore(main): release 10.12.0 (#1709) commit fc9e4cf Author: Alex Hemsath <[email protected]> Date: Fri Jun 23 14:29:13 2023 -0700 chore: update latest versions of instrumented libraries tested (#1738) * Update latest Serilog version tested to 3.0.1 * Update latest MongoDB.Driver version tested to 2.20.0 * Update latest version of Stackexchange.Redis tested to 2.6.116 commit 0f197fa Author: Alex Hemsath <[email protected]> Date: Fri Jun 23 11:19:23 2023 -0700 chore: weekly dependabot roundup 20230623 (#1741) * chore(deps): bump peter-evans/create-pull-request from 5.0.1 to 5.0.2 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](peter-evans/create-pull-request@284f54f...1534078) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump aws-actions/configure-aws-credentials Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](aws-actions/configure-aws-credentials@5727f24...5fd3084) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 3b91dff Author: Marty Tippin <[email protected]> Date: Fri Jun 23 13:13:53 2023 -0500 fix: Update install script to correctly stop and restart IIS. (#1740) commit f03077c Author: Alex Hemsath <[email protected]> Date: Fri Jun 23 11:12:57 2023 -0700 chore: remove mongocsharpdriver from Dotty's list of concerns (#1739) commit f71521f Author: Marty Tippin <[email protected]> Date: Fri Jun 23 13:12:35 2023 -0500 fix: Format and log audit-level messages only when audit logging is enabled. (#1734) commit 1a56612 Author: Marty Tippin <[email protected]> Date: Fri Jun 23 13:11:42 2023 -0500 fix: Include config file path in the "Agent is disabled " message on all platforms. (#1727) commit 1aa5680 Author: Alex Hemsath <[email protected]> Date: Wed Jun 21 15:20:31 2023 -0700 feat: add instrumentation for newer MongoDB.Client methods (#1732) * Instrument CountDocuments and CountDocumentsAsync * Refactor to simplify test logic and driver version logic * Instrument EstimatedDocumentCount(Async) Also add test for AggregateAsync * Instrument and test AggregateToCollection(Async) * Instrument and test ListCollectionNames(Async) * Refactor database tests * Instrument and test Db.Aggregate(Async) * Instrument and test Db.AggregateToCollection(Async) * Instrument and test Db.Watch(Async) * Refactor indexmanager tests to use theory * Test stability improvements commit beb32bf Author: Marty Tippin <[email protected]> Date: Fri Jun 16 11:24:21 2023 -0500 chore: Weekly dependabot roundup. (#1726) commit ce12017 Author: Chris Ventura <[email protected]> Date: Thu Jun 15 10:11:22 2023 -0700 chore: Update Arm64 base image to use a pinned image. (#1724) commit 1624938 Author: Marty Tippin <[email protected]> Date: Thu Jun 15 11:05:31 2023 -0500 fix: Cache the AgentEnabled setting value. (#1723) commit 269023c Author: Chris Ventura <[email protected]> Date: Wed Jun 14 12:56:53 2023 -0700 chore: Update multiverse scanner dependencies. (#1721) commit 5b4e384 Author: Chris Ventura <[email protected]> Date: Wed Jun 14 12:16:13 2023 -0700 chore: Add dockerfile and docker-compose to build arm64 profiler locally. (#1717) commit d7bb7f2 Author: Chris Ventura <[email protected]> Date: Tue Jun 13 13:11:16 2023 -0700 fix: Add more validation to msi installer. (#1716) commit 2fcce95 Author: Marty Tippin <[email protected]> Date: Mon Jun 12 12:57:34 2023 -0500 fix: Exclude WebResource.axd and ScriptResource.axd from browser instrumentation (via default config). (#1711) commit 69d15df Author: Alex Hemsath <[email protected]> Date: Sat Jun 10 08:25:51 2023 -0700 feat: add support for MySql.Data version 8.0.33+ (#1708) * Add async instrumentation points for 8.0.33+ * Add comment re: MySql 8.0.33 in MFAH.csproj * Move new instrumentation points to async tracer factory * Move new async data reader instrumentation points to async factory commit 79b1c6f Author: Alex Hemsath <[email protected]> Date: Fri Jun 9 17:15:06 2023 -0700 chore: Dependabot weekly roundup 20230609 (#1712) * chore(deps): bump aws-actions/configure-aws-credentials Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](aws-actions/configure-aws-credentials@e1e17a7...5727f24) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump github/codeql-action from 2.3.5 to 2.3.6 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.5 to 2.3.6. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@0225834...83f0fe6) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 8b734a5 Author: Marty Tippin <[email protected]> Date: Fri Jun 9 08:47:56 2023 -0500 fix: Handle empty Request.Path values in AspNetCore middleware wrapper. (#1704) commit b644dfd Author: Chris Ventura <[email protected]> Date: Thu Jun 8 15:27:09 2023 -0700 chore: Update community support url. (#1707) commit 5850145 Author: Marty Tippin <[email protected]> Date: Thu Jun 8 16:34:27 2023 -0500 ci: Give repolinter write permission for issues (#1705) commit e0f3dc1 Author: Chris Ventura <[email protected]> Date: Thu Jun 8 14:07:13 2023 -0700 chore: Remove old settings from profiler testing tool. (#1701) commit a9fcb74 Author: Alex Hemsath <[email protected]> Date: Thu Jun 8 12:31:20 2023 -0700 test: update latest tested versions of core tech libraries, June 2023 roundup (#1703) * Update Microsoft.Data.SqlClient to latest version * Update latest RabbitMQ tested to 6.5.0 * Update latest Stackexchange.Redis version tested to 2.6.111 * Update latest version of Serilog tested to 2.12.0 * Update MultiFunctionApplicationHelpers.csproj Update latest NLog version tested to 5.2.0 * Update latest version of Elastic.Clients.Elasticsearch tested to 8.1.1 * Update the latest version of MEL (and friends) tested to 7.0.0 commit a41d120 Author: Alex Hemsath <[email protected]> Date: Wed Jun 7 13:18:07 2023 -0700 ci: add new core tech libraries to the list to scan for updates (#1700) commit 3520f7f Author: Marty Tippin <[email protected]> Date: Wed Jun 7 13:40:20 2023 -0500 ci: Artifactbuilder parses output from nuget pack (#1699) * Modifies Nuget build / validation to capture and parse stdout from the `nuget pack` command, to obtain the actual filename of the NuGet package that was generated and use that in content validation. * Use regex to parse output from nuget pack commit 0e86e4b Author: Alex Hemsath <[email protected]> Date: Wed Jun 7 10:10:17 2023 -0700 ci: let the core tech update scanner create issues in our repo for the new package versions it finds (#1696) commit a5ce546 Author: Alex Hemsath <[email protected]> Date: Tue Jun 6 15:42:32 2023 -0700 ci: let the ArtifactBuilder's content validation logic handle semantic versioning of NuGet packages (#1697) commit 68ac379 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue Jun 6 12:27:19 2023 -0700 chore(main): release 10.11.0 (#1614) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit f249753 Author: Jacob Affinito <[email protected]> Date: Fri Jun 2 17:14:06 2023 -0700 feat: Add detailed assembly reporting to enable Vulnerability Management support. (#1685) commit e8bdc34 Author: Chris Ventura <[email protected]> Date: Wed May 31 09:38:20 2023 -0700 fix: Stop double injecting headers with HttpClient on .NET Framework (#1679) commit 51080df Author: Marty Tippin <[email protected]> Date: Tue May 30 15:30:52 2023 -0500 feat: Use Serilog instead of log4net for internal logging. (#1661) commit 0882d47 Author: Chris Hynes <[email protected]> Date: Tue May 30 10:01:51 2023 -0700 chore: Update weekly dependabot issues. (#1671) commit ddaf483 Author: Jacob Affinito <[email protected]> Date: Fri May 26 17:22:42 2023 -0700 test: Improve unbounded test logging and reliability for MsSQL, Oracle, Elastic, and CosmosDB (#1648) commit b835b82 Author: Marty Tippin <[email protected]> Date: Fri May 26 15:53:52 2023 -0500 ci: Update codecov configuration, add some status badges to Readme. (#1668) commit af01977 Author: Chris Hynes <[email protected]> Date: Fri May 26 10:44:09 2023 -0700 test: Fix bug in new retry logic (#1670) commit 81454ed Author: Chris Ventura <[email protected]> Date: Thu May 25 13:54:30 2023 -0700 test: Update MongoDB driver in unbounded tests. (#1666) commit cc7cede Author: Alex Hemsath <[email protected]> Date: Thu May 25 13:45:33 2023 -0700 notice: The Dotnet VMs UI page is now available for .NET CLR performance metrics. There is a new New Relic APM UI page available called "Dotnet VMs" that displays the data the .NET agent collects about an application's CLR performance. See the [performance metrics documentaton](https://docs.newrelic.com/docs/apm/agents/net-agent/other-features/net-performance-metrics/) for more details. commit 2116e88 Author: Chris Hynes <[email protected]> Date: Wed May 24 08:24:24 2023 -0700 test: Retry tests on known unrelated errors. (#1644)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for submitting a pull request. Please review our contributing guidelines and code of conduct.
Description
Adds code to check whether audit logging is enabled before going to the trouble of formatting audit log messages and sending them to Serilog.
(Note that Serilog would already suppress sending those messages if audit logging was disabled, so there's no functional change with this PR, only an optimization to reduce unnecessary string formatting and Serilog calls.)
Author Checklist
Reviewer Checklist