Skip to content

Conversation

codebrain
Copy link
Contributor

Fixes #62

  • Also ensures any access to the resolved HttpContext are null-checked before access
  • Also enhances parsing of the UserAgent using a static property, provided by including code from https://github.com/ua-parser/uap-csharp (Apache 2.0)

… AspnetCore application.

Fixes #62

- Also ensures ay access to the resolved HttpContext are null-checked before access
- Also enhances parsing of the UserAgent using a static property, provided by including code from https://github.com/ua-parser/uap-csharp (Apache 2.0)
Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

I've left a couple of comments

Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@olavaukan
Copy link

Brilliant! This does the trick nicely. Can confirm that this solves #62 for me when running locally.

For some reason I didn't know you could get services from ctx.Configuration this way, so that was very useful. Totally agree that an Examples project is super useful here!

I have a suggestion for the Elastic.CommonSchema.Client.Ip field to be changed to string[] and then the value be split so we have separate IPv4 and IPv6 values, but I'll submit a separate feature request for that.

@codebrain codebrain merged commit 5c91591 into master Mar 16, 2020
@codebrain codebrain deleted the serilog-registration branch March 16, 2020 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request v1.4.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] MapHttpAdapter is always null so no data from HttpContext is logged

3 participants