Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NLog integration #65

Merged
merged 4 commits into from
Jul 28, 2017
Merged

NLog integration #65

merged 4 commits into from
Jul 28, 2017

Conversation

aholovko
Copy link
Contributor

No description provided.

@aholovko aholovko requested a review from kyrylo July 26, 2017 12:55
README.md Outdated
ProjectId = "127348",
ProjectKey = "e2046ca6e4e9214b24ad252e3c99a0f6"
ProjectId = "113743",
ProjectKey = "81bbff95d52f8856c770bb39e827f3f6"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how this change is related to the NLog integration (and all other changes related to key/id). We probably want to revert these.

README.md Outdated
@@ -370,9 +373,11 @@ airbrake.AddFilter(notice =>
return null;

// clear environment variables with "token"-related keys
foreach (var key in notice.EnvironmentVars.Keys)
if (key.Contains("token"))
new List<string>(notice.EnvironmentVars.Keys).ForEach(key =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see how this is relevant to the NLog integration. If the example is incorrect, it's probably better to open a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Example is incorrect. Would switching title from "Add documentation on NLog integration" to "Add documentation on NLog integration. Cleanup README" or something like that work here? Or using separate PRs are still the better way?

README.md Outdated
```
```
PM> Install-Package Sharpbrake.Http.Module
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change intentional (and other changed related to indentation)? I don't see the reason. This probably doesn't help with the NLog integration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are intentional, the previous indentation doesn't indent properly code snippets in relation to explanations.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this to a different PR?

README.md Outdated
set any configuration option supported by the Airbrake client in the declarative
way ([how to configure](#configuration)).

In the case if you need programmatically access `Notifier` (e.g. for setting
Copy link
Contributor

Choose a reason for hiding this comment

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

In the case if you need programmatically -> When you need to access `Notifier` programmatically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good

var httpContext = System.Web.HttpContext.Current;
return httpContext == null ? null : new AspNetHttpContext(httpContext);
}
#elif NETSTANDARD1_4
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a new platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, for simplicity, this is what is called ".NET Core"

Copy link
Contributor

Choose a reason for hiding this comment

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

I remember it used to be NETCORE. Did something change?

@aholovko
Copy link
Contributor Author

@kyrylo PTAL

README.md Outdated
### Airbrake NLog target for ASP.NET

Airbrake NLog target for ASP.NET differs from the regular one in the additional
support for the HTTP context.
Copy link
Contributor

Choose a reason for hiding this comment

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

This will sound a bit better:

Airbrake NLog target for ASP.NET is almost identical to the standard target with the exception of support for HTTP context.

Copy link
Contributor Author

@aholovko aholovko Jul 26, 2017

Choose a reason for hiding this comment

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

That "is almost identical" is a little bit vague. What about:

With Airbrake NLog target for ASP.NET you get, in addition, reporting of HTTP context properties in web applications.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me.

README.md Outdated
</rules>
```

4. In the case if you are setting up the target for ASP.NET Core, extra step is
Copy link
Contributor

Choose a reason for hiding this comment

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

To get reporting of HTTP context properties for ASP.NET Core you need to call the following code in the Configure method in Startup.cs:

README.md Outdated
```

Here you have also access to the `Notifier` object that can be used for the
additional configuration from your code:
Copy link
Contributor

Choose a reason for hiding this comment

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

The Notifier object can be accessed from here, too. It can be used for additional configuration:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does the word "too" here imply that there is another place where the Notifier object can be accessed? Or it means "in addition to [setting NLog, some framework features, etc.] you can access Notifier as well"?

Copy link
Contributor

Choose a reason for hiding this comment

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

The former.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for me, this one looks more accurate:

The Notifier object can be accessed from here for the additional configuration:

With "too" it looks like we were talked about one place of accessing Notifier and this is another one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, no objections here.

var httpContext = System.Web.HttpContext.Current;
return httpContext == null ? null : new AspNetHttpContext(httpContext);
}
#elif NETSTANDARD1_4
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember it used to be NETCORE. Did something change?

@aholovko
Copy link
Contributor Author

In past with old project format I have defined it manually in that way, while the new one has predefined consts.

@aholovko aholovko merged commit 3083866 into master Jul 28, 2017
@aholovko aholovko deleted the nlog-integration branch July 28, 2017 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants