Code Monkey home page Code Monkey logo

newrelic-logenricher-dotnet's People

Contributors

alanwest avatar angelatan2 avatar bgrainger avatar elucus avatar jaffinito avatar jcolemannr avatar jifeingo avatar lspangler584 avatar ltines avatar niklasarbin avatar nr-ahemsath avatar nrcventura avatar prototypicalpro avatar tangollama avatar tippmar-nr avatar vuqtran88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newrelic-logenricher-dotnet's Issues

Add option to remove "Message.Properties" prefix from custom enriched properties

Description

All custom enriched properties are renamed with prefix Message.Properties.

Expected Behavior

Custom enriched properties should respect name, or at least open for the possibility of overriding the default behavior.

Steps to Reproduce

Enrich your logger with for instance userid. User id is now logged as Message.Properties.userid

Update NuGet Packages and Build Targets for all LogEnrichers

Description

Update NuGet packages to latest version where applicable - leave the log4net, NLog and Serilog package versions used in the main LogEnrichers projects unchanged, but update the example and unit test projects to use the latest version of all packages.

This will also include updating Newtonsoft.Json to the latest version, which will resolve a Snyk issue (#112) that has been lingering in this repo for over a year.

Update the TFM for all projects to net462 or net7.0 as applicable (i.e., net45 goes to net462 and netcoreapp3.1 goes to net7.0.

Update the README docs as needed to reference the new platform targets.

Acceptance Criteria

All Unit tests pass. All example applications run as expected.

Estimates

Please provide initial t-shirt size. S = 1-3 days, M = 3-5 days (1 week), L = 1-2 weeks (1 sprint)
S

NLog MappedDiagnosticsContext and version missmatch for 1.2 package

Description

Hey guys, i have some confusion around versioning and want to verify it with you.

I see that NewRelic.LogEnrichers.NLog was released as 1.2. We need Mdlc\Mdc feature from it so it would log NLog context related properties. I see that change for NewRelic.LogEnrichers.NLog/NewRelicJsonLayout.cs was done for NLog_v.1.2.0 tag - NLog_v1.1.0...NLog_v1.2.0 .

I also see that 1.2 was released a month ago but it doesn't have that change there - https://www.fuget.org/packages/NewRelic.LogEnrichers.NLog/1.2.0/lib/netstandard2.0/NewRelic.LogEnrichers.NLog.dll/NewRelic.LogEnrichers.NLog/NewRelicJsonLayout?code=true

Changelog mentions that feature isn't released yet but new 1.2 version confuses me since it doesn't have any changes compared to 1.1.

If it's a not mistake and it's just not released yet, do you have any plans to actually release it so we can consume it?

Thanks!

Enricher doesn't change output

Hi, I've just installed Serilog, and I'm getting log messages like this:

{"timestamp":1597221824485,"log.level":"Information","message.template":"User logged in.","message":"User logged in.","Message.Properties.SourceContext":"Proj.Web.Areas.Admin.Pages.LoginModel","Message.Properties.ActionId":"cc2880e6-fa97-4fcc-a28c-f58895fa0d05","Message.Properties.ActionName":"/Login","Message.Properties.RequestId":"0HM1UJF7U0DNB:00000001","Message.Properties.RequestPath":"/Admin/Login","Message.Properties.CorrelationId":null,"Message.Properties.ConnectionId":"0HM1UJF7U0DNB"}

When adding the newrelic enricher, I do not get any new fields added to the output?

The code I'm using to configure serilog is:

            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
                .MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning) // <- Request logging
                .Enrich.WithNewRelicLogsInContext()
                .WriteTo.Console(new NewRelicFormatter())
                .CreateLogger();

Which fields should the enricher add, and how come the output doesn't change when adding .Enrich.WithNewRelicLogsInContext()?

How to output logger (class name) with newrelic json layout?

Hello,

When using NLog you typically include a class name from which messages are logged by getting a class logger like:

private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

Then logger name (class name) can be included in the output:

<target xsi:type="File" name="f1" fileName="app.log" layout="${longdate}||${level}|${logger}|${message}" />

producing a resulting logging line like:

2020-12-29 12:45:22.1902|TRACE|RequestTracer|Request completed.

It helps to get a better understanding of where log messages are coming from. It also allows filtering of log messages by class name.

Here's a log line produced by the newrelic json layout. It does not include logger name. Is there a way to include logger name as a separate property?

{
"timestamp":1609263922190,
"log.level":"TRACE",
"message":"Request completed.",
"message.template":"Request completed.",
"thread.id":"149",
"correlation.id":"ce304a5d-206b-4b01-b2a5-550ead04f010",
"process.id":"35396"
}

Output trace.id and span.id in log format.

Since serilog/serilog#1955 is implemented by Serilog I want to propagate trace id and span id from LogEvent to the newrelic log format.

I think NewRelicFormatter could be updated to use LogEvent.TraceId and LogEvent.SpanId. This would also mean upgrading to serilog 3 probably.

Log4net - Log level is not recognized

log4net log level is serialized as "log.level":{"Name":"INFO","Value":40000,"DisplayName":"INFO"} which NR doesn't recognize as a valid log level.
image

It should output just "log.level":"INFO"

Description

When set up log4net NewRelic Layout according to https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/logs-context-net/net-configure-log4net the NewRelicLayout outputs dictionary.Add(LoggingExtensions.GetOutputName(NewRelicLoggingProperty.LogLevel), loggingEvent.Level);. The problem here is loggingEvent.Level is a class which gets serialized.

It should just use loggingEvent.Level.Name

Expected Behavior

Pass log level NR can parse and recognize

Troubleshooting or NR Diag results

Steps to Reproduce

Your Environment

Windows Server 2019, latest NR .NET Agent and NR Infrastructure Agent

Additional context

Is there a way to use NewRelicJsonLayout from NLog.config xml file?

Documentation here only mentions how to used it from c# config.

I tried a few a config below, but it didn't work (it writes empty new lines to log file):

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true">
  <extensions>
    <add assembly="NewRelic.LogEnrichers.NLog" />
  </extensions>
  <targets>
    <target name="NewRelicFileTarget" xsi:type="File" fileName="log.newrelic.json" layout="${newrelic-jsonlayout}"/>
  </targets>
  <rules>
    <logger name="*" minlevel="Trace" writeTo="NewRelicFileTarget" enabled="true" />
  </rules>
</nlog>

If I replace layout="${newrelic-jsonlayout}" with layout="${message}" I start seeing output in a log file, so NLog works. Just can't get new newrelic-jsonlayout layout to work.

How to add contextual data to all logs

Is your feature request related to a problem? Please describe.

In our current integration with New Relic Logs, we add contextual data to facilitate troubleshooting and reporting in dashboards.
This includes, for instance:

  • Static data (container IP, environment labels)
  • Dynamic data (user id, internal transaction id)

Feature Description

We need the ability to add contextual (static and dynamic) data so they appear as separate fields in New Relic Logs to facilitate query.

Describe Alternatives

For now the only way I found to make this work is by creating another layout deriving from NewRelicJsonLayout, but this is not a maintainable long-term solution.
The changes I made to make this work were:

  • Modify these properties which are hardcoded to false in current code: IncludeMdc = true, IncludeMdlc = true,
  • Use MappedDiagnosticsContext for static info: MappedDiagnosticsContext.Set("Message.Properties.labels.version", "from env var");
  • Use MappedDiagnosticsLogicalContext for dynamic info: MappedDiagnosticsLogicalContext.Set($"Message.Properties.UserId", "from request, retrieved in Middleware/Filter");

Additional context

I think a good way to have this would be with a wrapper class that internally adds these fields in MappedDiagnosticsContext/MappedDiagnosticsLogicalContext with the "Message.Properties." prefix.
Similar to the deprecated NewRelic.Api.Agent.NewRelic.AddCustomParameter.

Another option could be to add this into a scoped context class, but it would require additional DI setup which can be avoided by using MappedDiagnosticsContext/MappedDiagnosticsLogicalContext.

Note: it is important to be able to separate between static (set at startup based on env vars) and dynamic (set during request), including both in all logs.

Priority

Blocker - for as much as we want to migrate to JSON layout for distributing tracing, we can't do it without maintaining parity for our dashboards who heavily depend on NRQL.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 5 0 6

Fail #

readme-starts-with-community-plus-header #

The README of a community plus project should have a community plus header at the start of the README. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 1 lines do not contain the pattern(s): Open source Community Plus header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend [![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus) to file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-source-tools/tree/master/javascript/oss-template.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends referencing the open source security policy (found under the "Security" tab of the repository) in the README. For an example of this, please see the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file must be present to grant attribution to all dependencies being used by this project. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Introduce Nullable Reference Types (C# v8.0)

C# 8.0 introduces nullable reference types. Microsoft has recommended that library developers annotate their libraries providing better guidance regarding the nullability of parameters and return values of their methods.

Feature Description

This Issue is to introduce the new language feature and to annotate existing logging tools with nullable reference types.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

readme-starts-with-community-plus-header #

The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 5 lines do not contain the pattern(s): Open source Community Plus header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-2 to file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

readme-starts-with-community-plus-header #

The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 5 lines do not contain the pattern(s): Open source Community Plus header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend [![Community Plus header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus) to file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Include inner exceptions in serilog formatter

Is your feature request related to a problem? Please describe.

When debugging an issue, it is supremely helpful to see the inner exception associated with an exception. Currently, the serilog formatter does not include this information.

Feature Description

Include the inner exception details when logging an exception. One possibility would be to change exception.StackTrace to exception.ToString() here. Granted, that means it is no longer technically a stack trace, but it does provide more useful information.

Describe Alternatives

One alternative would be to include a new property, something like error.full or similar?

Priority

Must Have

-- Internal note --
Integrated to JIRA

Upgrade example apps to a supported .NET version

We need to upgrade our example apps to .NET Core 3.1. However, when we tried doing this to one app (Log4Net) recently, our security scan tool (Synk) had an error. Once we have determined how to resolve this issue, we can do this upgrade.

Provide Option to Truncate Attribute Values that Exceed NR Length Limit

Is your feature request related to a problem? Please describe.

New Relic's logging capability is unreliable from a user's perspective when messages aren't parsed (https://docs.newrelic.com/docs/logs/log-management/troubleshooting/log-message-truncated/). I would much rather have truncated, structured data than no structured data at all. Otherwise searches result in false negatives (results are erroneously omitted).

Feature Description

Provide an option when calling .Enrich.WithNewRelicLogsInContext() to truncate all attribute values that violate New Relic's field length limit of 4096 characters.

Describe Alternatives

I'm guessing that this would probably be easier if New Relic had a sink instead of an enricher, but hopefully not. Perhaps this would be better placed elsewhere in Serilog's configuration, I'd argue it's best placed in New Relic's Serilog integration due to it being a New Relic-specific issue (albeit also prevalent across other logging providers).

Priority

Please help us better understand this feature request by choosing a priority from the following options:
[Really Want]

We should have a Serilog Sink that sends log events directly to New Relic

Is your feature request related to a problem? Please describe.

When trying to logs-in-context for a .NET application, the most difficult and fragile part is always the log forwarding - configuring FluentD or some other process to send the log data being written to disk by our enricher/formatter library to New Relic. This is perhaps more of an issue for .NET logs-in-context because the log forwarders that New Relic documents how to use are much more at home on Linux systems, whereas a significant number of .NET customers are on Windows hosts.

Feature Description

A "Sink" in Serilog is a destination for log data. We should provide a Sink for Serilog that sends log data directly to New Relic. If you look at Serilog's list of sinks, there are several that provide this functionality for other cloud-based logging services: https://github.com/serilog/serilog/wiki/Provided-Sinks

Additional context

Architecturally it would make the most sense to put the "send log data to NR" functionality in our Telemetry SDK and then have a dependency between the log enricher library and the TSDK library.

Priority

Please help us better understand this feature request by choosing a priority from the following options:
[Really Want]

Remove hardcoded limits on IncludeMdc, IncludeMdlc, and IncludeAllProperties in InitializeLayout

  • Remove hardcoded limits on IncludeMdc, IncludeMdlc, and IncludeAllProperties in InitializeLayout
  • Leave the NR defaults to false for IncludeMdc and IncludeMdlc, but true for IncludeAllProperties
  • This will allow setting (NewRelicJsonLayout)layout.XXX when configuring the layout.
  • Messages will be include alongside other NR items as attributes, not in Message.Properties

This includes adding new unit tests to cover MDC/MDLC attributes!

Seems to cause runtime errors

After a package update, I am seeing the following runtime error. Compile is fine.

Inner Exception 1: FileLoadException: Could not load file or assembly 'NewRelic.Api.Agent, Version=8.20.262.0, Culture=neutral, PublicKeyToken=06552fced0b33d87'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

NewRelic.Agent.Api (8.28.0)
NewRelic.LogEnrighers.Serilog (1.0.1)

Reverting back to the following, it everything works
NewRelic.Agent.Api (8.27.139)

Test 4 Story Sync to Jira - nkumar

Description

What's the goal of this unit of work? What is included? What isn't included?

Acceptance Criteria

What tasks need to be accomplished to achieve the goal?

Design Consideration/Limitations

Why is this the route we should take to achieve our goal?
What can't be achieved within this story?

Dependencies

Do any other teams or parts of the New Relic product need to be considered?
Some common areas: UI, collector, documentation

Additional context

What else should we know about this story that might not fit into the other categories?

Estimates

Please provide initial t-shirt size. S = 1-3 days, M = 3-5 days (1 week), L = 1-2 weeks (1 sprint)

Introduce StyleCop

“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
“Ensure that an external contributor can see the results of the builds and tests run against pull requests enabling them to address problems and feedback."
StyleCop provides automation for validating many mundane requirements on build.

Summary

A minimum StyleCop configuration can be introduced with just a few modifications to the repo. This issue intends to introduce StyleCop with a limited ruleset which can be updated on an ongoing basis as the need arises.

Desired Behaviour

StyleCop can be configured to provide build warnings or errors when certain rules are violated. This initial introduction will only include rules to validate the required copyright file headers are in place for all files.

Possible Solution

There are many ways to add StyleCop to projects and solutions. This issue is to use a simple method that includes one ruleset file for all files in the repo. Should more precise rules be necessary in the future, configuration per project or per directory can be introduced at that time (e.g. different ruleset for src vs. tests).

The proposal is to modify the top level Directory.Build.props file to include the StyleCop.Analyzers package, reference a stylecop.json file in the build directory, and add a ruleset file to the build directory. Example addition to Directory.Build.props:

  <PropertyGroup>
    <CodeAnalysisRuleSet>$(SolutionDir)build\xxx.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
    <AdditionalFiles Include="$(SolutionDir)build\stylecop.json" Link="stylecop.json" />
  </ItemGroup>

Example stylecop.json file for enhancing the rules that enforce copyright headers:

{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "documentationRules": {
      "companyName": "New Relic, Inc.",
      "copyrightText": "Copyright (2020) {companyName}. All rights reserved.\nSPDX-License-Identifier: Apache-2.0"
    }
  }
}

Example xxx.ruleset file to cause errors when copyright header is absent from a file in the repo:

<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="New Relic Rules" Description="New Relic ruleset for src and tests directories." ToolsVersion="16.0">
  <Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
    <Name Resource="NewRelicRules_Name" />
    <Description Resource="NewRelicRules_Description" />
  </Localization>
  <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
    ...
    <Rule Id="SA1008" Action="None" />
    <Rule Id="SA1009" Action="None" />
   ...
    <Rule Id="SA1633" Action="Error" />
    <Rule Id="SA1634" Action="Error" />
    <Rule Id="SA1635" Action="Error" />
    <Rule Id="SA1636" Action="Error" />
    <Rule Id="SA1637" Action="None" />
    <Rule Id="SA1638" Action="None" />
    <Rule Id="SA1640" Action="Error" />
    <Rule Id="SA1641" Action="Error" />
    ...
  </Rules>
</RuleSet>

Rules marked "Error" will cause build failures when violated. StyleCop rule codes can be found here.

Additional context

StyleCop has been introduced in other New Relic .NET repos and automates the process of adhering to established coding standards.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

code-of-conduct-file-does-not-exist #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Found files. Below is a list of files or patterns that failed:

  • CODE_OF_CONDUCT.md
    • 🔨 Suggested Fix: Remove file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-starts-with-community-plus-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Integration Test

3:20 pm added Webhook for production and clear out any prototype integration webhooks.
3:25 pm create a new bug.
3:39 pm updated description.

Sink for Serilog - Azure Functions

Is your feature request related to a problem? Please describe.

I am trying to configure a Serilog to use a sink that would communicate with New Relic.

Feature Description

Own sink for Serilog

Describe Alternatives

There is also a project called Serilog.sinks.newrelic.logs but it has been abandoned for 2 years.

Priority

Must Have

Apply rules in logical groups and fix code

This will actually be split out into more than one story. Basically, each person will take a rule or set of rules, apply them locally and fix the code. This will then be a self-contained PR that will allow the build to work and others to work on differing rule sets. There will be conflicts but they can be resolved.

Other Links

  • StyleCop repo
  • StyleCop rule codes can be found here.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

readme-contains-forum-topic #

Doesn't contain a link to the appropriate forum.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate forum.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-starts-with-community-plus-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Create Workflow in GitHub Actions

Create the workflow and port over the Pipeline code. This includes removing SonarCloud, but not implementing StyleCop. The goal is to get the enrichers building. Make sure to get the secrets setup to deploy nuget.

I recommend disabling the Pipelines build before merging any PRs for this. On merge of the PR Actions will build and deploy the nuget package.

This workflow is very close to what we need:
https://github.com/jaffinito/newrelic-dotnet-agent/blob/main/.github/workflows/logging-ext-mock.yml

Docs that might help:

NewRelic.Agent.Api package dependency requires an assembly binding redirect

Hello everybody,

It seems like NewRelic.LogEnrichers still uses old versions of it's dependencies.

For example NewRelic.Agent.Api package has already bumped the major version and it is required to use an assembly binding mechanism at own risk to fix incompatibility issues.

<dependentAssembly>
	<assemblyIdentity name="NewRelic.Api.Agent" publicKeyToken="06552fced0b33d87" culture="neutral" />
	<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>

Would you be so kind as to upgrade the package references to the latest versions?

Some links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.