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

Provide extension on Serilog to log custom events #15

Closed
tomkerkhove opened this issue Feb 6, 2020 · 4 comments
Closed

Provide extension on Serilog to log custom events #15

tomkerkhove opened this issue Feb 6, 2020 · 4 comments
Assignees
Labels
application-insights All issues related to Azure Application Insights custom-events All issues related to custom/business events serilog All issues related to Serilog
Milestone

Comments

@tomkerkhove
Copy link
Contributor

Provide extension on Serilog to log custom events:

Ideas are:

var context = new Dictionary<string, object>
{
    {ContextProperties.Networking.OldNetworkStatus, oldStatus ?? NetworkStatus.Unknown},
    {ContextProperties.Networking.NetworkStatus, newStatus}
};

_logger.LogEvent("Network Connectivity Changed", context);

Extension should allow you to provide contextual information by passing a dictionary, but should not be mandatory.

It should seemlessly integrate with the Azure Application Insight sink and track it as a "Custom Event".

A sample by Tom will be provided as a starting point.

@tomkerkhove tomkerkhove added application-insights All issues related to Azure Application Insights serilog All issues related to Serilog custom-events All issues related to custom/business events labels Feb 6, 2020
@stijnmoreels stijnmoreels added this to the v0.2 milestone Feb 26, 2020
@tomkerkhove tomkerkhove self-assigned this Mar 3, 2020
@tomkerkhove tomkerkhove modified the milestones: v0.2, v0.1 Mar 6, 2020
@tomkerkhove
Copy link
Contributor Author

This was done in #40 and documentation is up on https://observability.arcus-azure.net/features/writing-different-telemetry-types#events, ok if we close @stijnmoreels?

@stijnmoreels
Copy link
Member

This was done in #40 and documentation is up on https://observability.arcus-azure.net/features/writing-different-telemetry-types#events, ok if we close @stijnmoreels?

Same, should we have some integration tests with Application Insights?

@tomkerkhove
Copy link
Contributor Author

We need to add tests indeed, but only unit tests given we rely on Serilog to handle the rest

@stijnmoreels
Copy link
Member

Done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-insights All issues related to Azure Application Insights custom-events All issues related to custom/business events serilog All issues related to Serilog
Projects
None yet
Development

No branches or pull requests

2 participants