Open sandboxFocus

Class ApplicationInsightsLoggingBackend

Logging backend for Microsoft Application Insights.

Inheritance
ApplicationInsightsLoggingBackend
Implements
Namespace: PostSharp.Patterns.Diagnostics.Backends.ApplicationInsights
Assembly: PostSharp.Patterns.Diagnostics.Backends.ApplicationInsights.dll
Syntax
public class ApplicationInsightsLoggingBackend : TextLoggingBackend, IDisposable
Remarks

To use this backend, assign a new instance to DefaultBackend when the application starts. Pass the instrumentation key to the constructor, or use the parameterless constructor to rely on the default Application Insights configuration, for example the APPINSIGHTS_INSTRUMENTATIONKEY environment variable or, on .NET Framework, an ApplicationInsights.config file.

Constructors

Name Description
ApplicationInsightsLoggingBackend()

Initializes a new instance of the ApplicationInsightsLoggingBackend class.

ApplicationInsightsLoggingBackend(string)

Initializes a new instance of the ApplicationInsightsLoggingBackend class that uses the given instrumentation key.

Properties

Name Description
Options

Gets the backend options.

Methods

Name Description
CreateRecordBuilder()

Creates a new LogRecordBuilder.

CreateTypeSource(LoggingNamespaceSource, Type)

Creates a LoggingTypeSource for the given role and type.

Dispose(bool)

Disposes the current object.

~ApplicationInsightsLoggingBackend()
Flush()

Flushes the in-memory buffer, so that buffered data reaches the server immediately.

GetTextBackendOptions()

Gets the backend options.

See Also