-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce the algorithm for rotating health report file * Add configuration support for csv health report boundary - SingleLogFileMaximumSizeInMBytes - RententionLogsInDays * Implement date window for csv health report * Remove 'current' suffix for logs for compatbility * Handle log folder no permission issue * Add new tests for CsvHealthReporter * Refactor rotate logfile to add testability * Add testability to log retention * Fix the .NET Core Console Consumer App * Update README.md * Get a better name of logRentensionInDays to replace RetensionLogsInDays It is log retention than logs for retention. * Rewords description for logRetentionInDays in README * Revert the change to IRequireActivation * Refactor the code for better testability * Reword a code comment * Bump up version number for EF.Core
- Loading branch information
1 parent
85926c7
commit 4fb15f8
Showing
17 changed files
with
597 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/FileReportConfig.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 12 additions & 123 deletions
135
src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,136 +1,25 @@ | ||
{ | ||
"inputs": [ | ||
{ | ||
"type": "EventSource", | ||
"sources": [ | ||
{ "providerName": "Microsoft-ServiceFabric-Services" }, | ||
{ "providerName": "MyCompany-AirTrafficControlApplication-Frontend" } | ||
] | ||
}, | ||
{ | ||
"type": "PerformanceCounter", | ||
"counters": [ | ||
{ | ||
"counterCategory": "Process", | ||
"counterName": "% Processor Time" | ||
}, | ||
{ | ||
"counterCategory": "Process", | ||
"counterName": "Private Bytes" | ||
}, | ||
{ | ||
"counterCategory": ".NET CLR Memory", | ||
"counterName": "% Time in GC" | ||
}, | ||
{ | ||
"counterCategory": "Process", | ||
"counterName": "# of Exceps Thrown / sec" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Trace", | ||
"traceLevel": "Warning" | ||
} | ||
], | ||
|
||
"filters": [ | ||
{ | ||
"type": "drop", | ||
"include": "Level == Verbose" | ||
} | ||
], | ||
|
||
"outputs": [ | ||
{ | ||
"type": "ApplicationInsights", | ||
|
||
// Should be a secret, eventually | ||
"InstrumentationKey": "***REMOVED***", | ||
|
||
"filters": [ | ||
// EventSource-based metrics | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "ProviderName == Microsoft-ServiceFabric-Services && EventName == StatefulRunAsyncFailure", | ||
"metricName": "StatefulRunAsyncFailure", | ||
"metricValue": "1.0" | ||
}, | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "ProviderName == Microsoft-ServiceFabric-Services && EventName == StatefulRunAsyncInvocation", | ||
"metricName": "StatefulRunAsyncInvocation", | ||
"metricValue": "1.0" | ||
}, | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "ProviderName == MyCompany-AirTrafficControlApplication-Frontend && EventName == RestApiOperationStop", | ||
"metricName": "FrontendOperationDurationMsec", | ||
"metricValueProperty": "durationMsec" | ||
}, | ||
|
||
// EventSource-based request | ||
{ | ||
"type": "metadata", | ||
"metadata": "request", | ||
"include": "ProviderName == MyCompany-AirTrafficControlApplication-Frontend && EventName == RestApiOperationStop", | ||
"requestNameProperty": "operationName", | ||
"durationProperty": "durationMsec", | ||
"isSuccessProperty": "isSuccess" | ||
}, | ||
|
||
// Performance counter-based metrics | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "CounterName == \"% Processor Time\"", | ||
"metricName": "FrontendServiceProcessorTimePercent" | ||
}, | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "CounterName == \"% Time in GC\"", | ||
"metricName": "FrontendServiceProcessorTimePercent" | ||
}, | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "CounterName == \"# of Exceps Thrown / sec\"", | ||
"metricName": "FrontendServiceExceptionsThrownPerSecond" | ||
}, | ||
{ | ||
"type": "metadata", | ||
"metadata": "metric", | ||
"include": "CounterName == \"PrivateBytes\"", | ||
"metricName": "FrontendServiceProcessPrivateBytes" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "oms", | ||
"filters": [ | ||
{ | ||
"type": "metadata", | ||
"metadata": "request", | ||
"include": "ProviderName == MyCompany-AirTrafficControlApplication-Frontend && EventName == RestApiOperationStop", | ||
"requestNameProperty": "operationName", | ||
"durationProperty": "durationMsec", | ||
"returnCode": "httpCode" | ||
} | ||
] | ||
"type": "StdOutput" | ||
} | ||
], | ||
|
||
"schema-version": "2016-08-11", | ||
|
||
"extensions": [ | ||
{ | ||
"name": "myFilter", | ||
"type": "filter", | ||
"factory": "MyApplication.Diagnostics.MyFilterFactory, MyApplication.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" | ||
} | ||
] | ||
"healthReporter": { | ||
"type": "CsvHealthReporter", | ||
"logFileFolder": ".", | ||
"logFilePrefix": "HealthReportAAABB", | ||
"minReportLevel": "Message", | ||
"throttlingPeriodMsec": "1000", | ||
"singleLogFileMaximumSizeInMBytes": 1, | ||
"logRetentionInDays": 1, | ||
"isDebugMode": false | ||
}, | ||
"schema-version": "2016-08-11" | ||
} |
Oops, something went wrong.