diff --git a/README.md b/README.md index dce13202..ca29b0b4 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It runs in the same process as the application, so communication overhead is min - [Application Insights](#application-insights) - [Azure EventHub](#event-hub) - [Elasticsearch](#elasticsearch) -- [OMS (Operations Management Suite)](#oms-operations-management-suite) +- [Azure Monitor Logs](#azure-monitor-logs) There are several EventFlow extensions available from non-Microsoft authors and vendors, including: - [Google Big Query output](https://github.com/tsu1980/diagnostics-eventflow-bigquery) @@ -845,17 +845,17 @@ Fields injected byt the `request` metadata are: | `IsSuccess` | Success indicator, read from the event property specified by `isSuccessProperty` (if available). | | `ResponseCode` | Response code for the request, read from the event property specified by `responseCodeProperty` (if available). | -#### OMS (Operations Management Suite) +#### Azure Monitor Logs -*Nuget package*: [**Microsoft.Diagnostics.EventFlow.Outputs.Oms**](https://www.nuget.org/packages/Microsoft.Diagnostics.EventFlow.Outputs.Oms/) +*Nuget package*: [**Microsoft.Diagnostics.EventFlow.Outputs.AzureMonitorLogs**](https://www.nuget.org/packages/Microsoft.Diagnostics.EventFlow.Outputs.AzureMonitorLogs/) -The OMS output writes data to [Operations Management Suite](https://www.microsoft.com/en-us/cloud-platform/operations-management-suite) Log Analytics workspaces. You will need to create a Log Analytics workspace in Azure and know its ID and key before using OMS output. Here is a sample configuration fragment enabling the output: +The Azure Monitor Logs output writes data to [Azure Monitor Logs service (also knowns as Log Analytics service)](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-logs-overview) via [HTTP Data Collector API](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api). You will need to create a Log Analytics workspace in Azure and know its ID and key before using Azure Monitor Logs output. Here is a sample configuration fragment enabling the output: ```json { - "type": "OmsOutput", + "type": "AzureMonitorLogs", "workspaceId": "", "workspaceKey": "", - "serviceDomain" : "" + "serviceDomain" : "" } ``` @@ -863,12 +863,11 @@ Supported configuration settings are: | Field | Values/Types | Required | Description | | :---- | :-------------- | :------: | :---------- | -| `type` | "OmsOutput" | Yes | Specifies the output type. For this output, it must be "OmsOutput". | +| `type` | "AzureMonitorLogs" | Yes | Specifies the output type. For this output, it must be "AzureMonitorLogs". | | `workspaceId` | string (GUID) | Yes | Specifies the workspace identifier. | | `workspaceKey` | string (base-64) | Yes | Specifies the workspace authentication key. | -| `logTypeName` | string | No | Specifies the log entry type created by the output. Default value for this setting is "Event", which results in "Event_CL" entries being created in OMS (the "_CL" suffix is appended automatically by OMS -ingestion service). | -| `serviceDomain` | string | No | Specifies the domain for your OMS workspace. Default value is "ods.opinsights.azure.com", for Azure Commercial. +| `logTypeName` | string | No | Specifies the log entry type created by the output. Default value for this setting is "Event", which results in "Event_CL" entries being created in Log Analytics (the "_CL" suffix is appended automatically by Log Analytics Data Collector). | +| `serviceDomain` | string | No | Specifies the domain for your Log Analytics workspace. Default value is "ods.opinsights.azure.com", for Azure Commercial. ### Filters As data comes through the EventFlow pipeline, the application can add extra processing or tagging to them. These optional operations are accomplished with filters. Filters can transform, drop, or tag data with extra metadata, with rules based on custom expressions. @@ -1118,7 +1117,7 @@ The `ServiceFabricDiagnosticPipelineFactory` is a replacement for the standard ` | `configurationFileName` | "eventFlowConfig.json" | The name of the configuration file that contains pipeline configuration. The file is expected to be part of a (Service Fabric) service configuration package.| | `configurationPackageName` | "Config" | The name of the Service Fabric configuration package that contains the pipeline configuration file.| -The recommended place to create the diagnostic pipeline is in the service `Main()` method: +The recommended place to create the diagnostic pipeline is in the service `Main()` method. The following code will work all types of Service Fabric services (statefull, stateless and actor): ```csharp public static void Main(string[] args) @@ -1175,6 +1174,9 @@ The UnhandledException event method is a very simple addition to the standard Se } ``` +Depending on the type of inputs and outputs used, additional startup code may be necessary. For example [Microsoft.Extensions.Logging](#microsoftextensionslogging) input requires a call to `LoggerFactory.AddEventFlow()` method to register EventFlow logger provider. + + ### Support for Service Fabric settings and application parameters Version 1.0.1 of the EventFlow Service Fabric NuGet package introduced the ability to refer to Service Fabric settings from EventFlow configuration using special syntax for values: @@ -1392,7 +1394,8 @@ The following table lists platform support for standard inputs and outputs. | [Application Insights](#application-insights) | Yes | Yes | Yes | | [Azure EventHub](#event-hub) | Yes | Yes | Yes | | [Elasticsearch](#elasticsearch) | Yes | Yes | Yes | -| [OMS (Operations Management Suite)](#oms-operations-management-suite) | Yes | Yes | Yes | +| [Azure Monitor Logs](#azure-monitor-logs) | Yes | Yes | Yes | +[HTTP (json via http)](#http) | Yes | Yes | Yes | ## Contributions Refer to [contribution guide](contributing.md). diff --git a/Warsaw.sln b/Warsaw.sln index 15f42ad4..f5cb6d7e 100644 --- a/Warsaw.sln +++ b/Warsaw.sln @@ -31,8 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Core", "src\Microsoft.Diagnostics.EventFlow.Core\Microsoft.Diagnostics.EventFlow.Core.csproj", "{F1EF768D-9E8B-42D5-B0E1-C7EF2270C245}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Consumers.ASPNET", "src\Microsoft.Diagnostics.EventFlow.Consumers.ASPNET\Microsoft.Diagnostics.EventFlow.Consumers.ASPNET.csproj", "{0EB2C089-06A7-495D-8909-E00C88E112D3}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch", "src\Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch\Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch.csproj", "{B6372F30-BBDC-41A4-AFB0-93D571DDA9FB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Outputs.TableStorage", "src\Microsoft.Diagnostics.EventFlow.Outputs.TableStorage\Microsoft.Diagnostics.EventFlow.Outputs.TableStorage.csproj", "{B56C3023-E73E-43C4-859A-8AD328E675ED}" @@ -47,8 +45,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Event EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Outputs.StdOutput", "src\Microsoft.Diagnostics.EventFlow.Outputs.StdOutput\Microsoft.Diagnostics.EventFlow.Outputs.StdOutput.csproj", "{49A23DFF-CE13-4413-A024-65247B30D09C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore", "src\Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore\Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore.csproj", "{8DD84071-078D-4B93-9BC5-968F0F67CCA3}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Core.Tests", "test\Microsoft.Diagnostics.EventFlow.Core.Tests\Microsoft.Diagnostics.EventFlow.Core.Tests.csproj", "{06D5E2CB-446F-4C92-9E76-17088B0B9ED7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Outputs.Tests", "test\Microsoft.Diagnostics.EventFlow.Outputs.Tests\Microsoft.Diagnostics.EventFlow.Outputs.Tests.csproj", "{F66B606A-E2D9-49B1-A3A1-8C1B746435A2}" @@ -68,25 +64,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.Event EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Consumers.SimpleBenchmark", "src\Microsoft.Diagnostics.EventFlow.Consumers.SimpleBenchmark\Microsoft.Diagnostics.EventFlow.Consumers.SimpleBenchmark.csproj", "{15E2ED90-4B9A-42BD-97BB-C6AD2B1863AF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.EventFlow.Signing", "src\Microsoft.Diagnostics.EventFlow.Signing\Microsoft.Diagnostics.EventFlow.Signing.csproj", "{69AA6421-82A5-43BF-AD27-8E2C172FF8CE}" - ProjectSection(ProjectDependencies) = postProject - {B56C3023-E73E-43C4-859A-8AD328E675ED} = {B56C3023-E73E-43C4-859A-8AD328E675ED} - {B254AD24-EBDF-4871-8A69-184D167923F0} = {B254AD24-EBDF-4871-8A69-184D167923F0} - {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB} = {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB} - {EF3B9B49-1372-4A4B-9E20-A2C1ADABEB64} = {EF3B9B49-1372-4A4B-9E20-A2C1ADABEB64} - {E987F059-33CD-4F0E-8680-63C8033D54D8} = {E987F059-33CD-4F0E-8680-63C8033D54D8} - {C80DF85E-9756-4E30-989F-0D160B444F39} = {C80DF85E-9756-4E30-989F-0D160B444F39} - {9235A262-D532-4A06-91D4-6CF6F0BE2BCA} = {9235A262-D532-4A06-91D4-6CF6F0BE2BCA} - {02D7E06C-E535-4BDC-8990-7A403DA546D9} = {02D7E06C-E535-4BDC-8990-7A403DA546D9} - {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245} = {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245} - {03836F90-8D65-4A93-834C-5CE22F3292B5} = {03836F90-8D65-4A93-834C-5CE22F3292B5} - {7072DB92-0FDA-4B87-ABFD-897882C9284A} = {7072DB92-0FDA-4B87-ABFD-897882C9284A} - {705EB0A8-8FB0-4F80-8F6A-7BB71A202A2A} = {705EB0A8-8FB0-4F80-8F6A-7BB71A202A2A} - {C81591D6-AF6B-4B55-B6EB-A5CBD9E73EDD} = {C81591D6-AF6B-4B55-B6EB-A5CBD9E73EDD} - {E988D6E6-5DC2-4FED-9AD6-3B2B5EF2BD58} = {E988D6E6-5DC2-4FED-9AD6-3B2B5EF2BD58} - {49A23DFF-CE13-4413-A024-65247B30D09C} = {49A23DFF-CE13-4413-A024-65247B30D09C} - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Inputs.Serilog", "src\Microsoft.Diagnostics.EventFlow.Inputs.Serilog\Microsoft.Diagnostics.EventFlow.Inputs.Serilog.csproj", "{C80DF85E-9756-4E30-989F-0D160B444F39}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging", "src\Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging\Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging.csproj", "{E987F059-33CD-4F0E-8680-63C8033D54D8}" @@ -97,8 +74,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Event EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.ServiceFabric.Tests", "test\Microsoft.Diagnostics.EventFlow.ServiceFabric.Tests\Microsoft.Diagnostics.EventFlow.ServiceFabric.Tests.csproj", "{DDD81612-98D7-4CFC-BB69-7A2598B3AD2F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp", "src\Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp\Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp.csproj", "{9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights", "src\Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights\Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights.csproj", "{D8AD5E1D-BA05-4064-B3DF-2180CE680657}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestHelpers", "test\TestHelpers\TestHelpers.csproj", "{F7BB746D-9863-4831-B950-8FC64A39ACB6}" @@ -113,6 +88,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.Event EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource", "src\Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource\Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource.csproj", "{A53665AF-C4B4-4DD8-B002-F8065C1A3D10}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.EventFlow.Signing", "src\Microsoft.Diagnostics.EventFlow.Signing\Microsoft.Diagnostics.EventFlow.Signing.csproj", "{69AA6421-82A5-43BF-AD27-8E2C172FF8CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -129,14 +106,6 @@ Global {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245}.Release|Any CPU.Build.0 = Release|Any CPU {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245}.Release|x64.ActiveCfg = Release|Any CPU {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245}.Release|x64.Build.0 = Release|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Debug|x64.ActiveCfg = Debug|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Debug|x64.Build.0 = Debug|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Release|Any CPU.Build.0 = Release|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Release|x64.ActiveCfg = Release|Any CPU - {0EB2C089-06A7-495D-8909-E00C88E112D3}.Release|x64.Build.0 = Release|Any CPU {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -193,14 +162,6 @@ Global {49A23DFF-CE13-4413-A024-65247B30D09C}.Release|Any CPU.Build.0 = Release|Any CPU {49A23DFF-CE13-4413-A024-65247B30D09C}.Release|x64.ActiveCfg = Release|Any CPU {49A23DFF-CE13-4413-A024-65247B30D09C}.Release|x64.Build.0 = Release|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Debug|x64.ActiveCfg = Debug|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Debug|x64.Build.0 = Debug|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Release|Any CPU.Build.0 = Release|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Release|x64.ActiveCfg = Release|Any CPU - {8DD84071-078D-4B93-9BC5-968F0F67CCA3}.Release|x64.Build.0 = Release|Any CPU {06D5E2CB-446F-4C92-9E76-17088B0B9ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {06D5E2CB-446F-4C92-9E76-17088B0B9ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU {06D5E2CB-446F-4C92-9E76-17088B0B9ED7}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -265,14 +226,6 @@ Global {15E2ED90-4B9A-42BD-97BB-C6AD2B1863AF}.Release|Any CPU.Build.0 = Release|Any CPU {15E2ED90-4B9A-42BD-97BB-C6AD2B1863AF}.Release|x64.ActiveCfg = Release|Any CPU {15E2ED90-4B9A-42BD-97BB-C6AD2B1863AF}.Release|x64.Build.0 = Release|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|x64.ActiveCfg = Debug|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|x64.Build.0 = Debug|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|Any CPU.Build.0 = Release|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|x64.ActiveCfg = Release|Any CPU - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|x64.Build.0 = Release|Any CPU {C80DF85E-9756-4E30-989F-0D160B444F39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C80DF85E-9756-4E30-989F-0D160B444F39}.Debug|Any CPU.Build.0 = Debug|Any CPU {C80DF85E-9756-4E30-989F-0D160B444F39}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -313,14 +266,6 @@ Global {DDD81612-98D7-4CFC-BB69-7A2598B3AD2F}.Release|Any CPU.Build.0 = Release|Any CPU {DDD81612-98D7-4CFC-BB69-7A2598B3AD2F}.Release|x64.ActiveCfg = Release|Any CPU {DDD81612-98D7-4CFC-BB69-7A2598B3AD2F}.Release|x64.Build.0 = Release|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Debug|x64.ActiveCfg = Debug|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Debug|x64.Build.0 = Debug|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Release|Any CPU.Build.0 = Release|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Release|x64.ActiveCfg = Release|Any CPU - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F}.Release|x64.Build.0 = Release|Any CPU {D8AD5E1D-BA05-4064-B3DF-2180CE680657}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8AD5E1D-BA05-4064-B3DF-2180CE680657}.Debug|Any CPU.Build.0 = Debug|Any CPU {D8AD5E1D-BA05-4064-B3DF-2180CE680657}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -377,13 +322,20 @@ Global {A53665AF-C4B4-4DD8-B002-F8065C1A3D10}.Release|Any CPU.Build.0 = Release|Any CPU {A53665AF-C4B4-4DD8-B002-F8065C1A3D10}.Release|x64.ActiveCfg = Release|Any CPU {A53665AF-C4B4-4DD8-B002-F8065C1A3D10}.Release|x64.Build.0 = Release|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|x64.ActiveCfg = Debug|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Debug|x64.Build.0 = Debug|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|Any CPU.Build.0 = Release|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|x64.ActiveCfg = Release|Any CPU + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {F1EF768D-9E8B-42D5-B0E1-C7EF2270C245} = {FC86C736-6428-431B-B83F-940BF7182757} - {0EB2C089-06A7-495D-8909-E00C88E112D3} = {D67068AF-16BB-4037-BE4E-B642419089BA} {B6372F30-BBDC-41A4-AFB0-93D571DDA9FB} = {5AD3BB0F-B6F8-4361-AC2D-CC3514DA37A0} {B56C3023-E73E-43C4-859A-8AD328E675ED} = {DF3A81C9-6084-4945-B493-39B9A78572C2} {705EB0A8-8FB0-4F80-8F6A-7BB71A202A2A} = {47200F40-43E1-4B09-B803-A921FED2BF05} @@ -391,7 +343,6 @@ Global {EF3B9B49-1372-4A4B-9E20-A2C1ADABEB64} = {5AD3BB0F-B6F8-4361-AC2D-CC3514DA37A0} {03836F90-8D65-4A93-834C-5CE22F3292B5} = {47200F40-43E1-4B09-B803-A921FED2BF05} {49A23DFF-CE13-4413-A024-65247B30D09C} = {5AD3BB0F-B6F8-4361-AC2D-CC3514DA37A0} - {8DD84071-078D-4B93-9BC5-968F0F67CCA3} = {D67068AF-16BB-4037-BE4E-B642419089BA} {06D5E2CB-446F-4C92-9E76-17088B0B9ED7} = {86A33E36-2266-4E31-8D91-1F720C9A1F27} {F66B606A-E2D9-49B1-A3A1-8C1B746435A2} = {86A33E36-2266-4E31-8D91-1F720C9A1F27} {4F92132C-C455-40DD-A02D-A204FCF9DF50} = {86A33E36-2266-4E31-8D91-1F720C9A1F27} @@ -400,13 +351,11 @@ Global {E988D6E6-5DC2-4FED-9AD6-3B2B5EF2BD58} = {23A17E0F-86FD-4C55-A448-9A43C4C5E451} {242D4BE6-4CA8-4288-8843-65DF84BBBD3E} = {05441E68-B217-475A-8E81-DB36614D1823} {15E2ED90-4B9A-42BD-97BB-C6AD2B1863AF} = {D67068AF-16BB-4037-BE4E-B642419089BA} - {69AA6421-82A5-43BF-AD27-8E2C172FF8CE} = {FC86C736-6428-431B-B83F-940BF7182757} {C80DF85E-9756-4E30-989F-0D160B444F39} = {47200F40-43E1-4B09-B803-A921FED2BF05} {E987F059-33CD-4F0E-8680-63C8033D54D8} = {47200F40-43E1-4B09-B803-A921FED2BF05} {C81591D6-AF6B-4B55-B6EB-A5CBD9E73EDD} = {47200F40-43E1-4B09-B803-A921FED2BF05} {9235A262-D532-4A06-91D4-6CF6F0BE2BCA} = {C0F892AE-D5F5-42FD-943C-6428CA252650} {DDD81612-98D7-4CFC-BB69-7A2598B3AD2F} = {86A33E36-2266-4E31-8D91-1F720C9A1F27} - {9BC644CD-01DC-4B3E-A6D0-B26AD07DE34F} = {D67068AF-16BB-4037-BE4E-B642419089BA} {D8AD5E1D-BA05-4064-B3DF-2180CE680657} = {47200F40-43E1-4B09-B803-A921FED2BF05} {F7BB746D-9863-4831-B950-8FC64A39ACB6} = {86A33E36-2266-4E31-8D91-1F720C9A1F27} {3E372AAF-E93E-4F71-B006-C0DF9B2DA5D2} = {5AD3BB0F-B6F8-4361-AC2D-CC3514DA37A0} @@ -414,6 +363,7 @@ Global {B19F59CA-8030-40EB-BF22-6A4B1B896C37} = {47200F40-43E1-4B09-B803-A921FED2BF05} {C1CB9BDC-2F26-46AA-9F2C-F9C12E9A3418} = {FC86C736-6428-431B-B83F-940BF7182757} {A53665AF-C4B4-4DD8-B002-F8065C1A3D10} = {47200F40-43E1-4B09-B803-A921FED2BF05} + {69AA6421-82A5-43BF-AD27-8E2C172FF8CE} = {FC86C736-6428-431B-B83F-940BF7182757} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {8F1BC23F-956D-4D83-B675-710B743F08EF} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Controllers/ValuesController.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Controllers/ValuesController.cs deleted file mode 100644 index 3eab5018..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Controllers/ValuesController.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ASPNET.Controllers -{ - [Route("api/[controller]")] - public class ValuesController : Controller - { - // GET api/values - [HttpGet] - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/values/5 - [HttpGet("{id}")] - public string Get(int id) - { - return "value"; - } - - // POST api/values - [HttpPost] - public void Post([FromBody]string value) - { - } - - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api/values/5 - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET.csproj b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET.csproj deleted file mode 100644 index 614a856b..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - netcoreapp1.0 - true - Microsoft.Diagnostics.EventFlow.Consumers.ASPNET - Exe - 1.0.4 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Program.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Program.cs deleted file mode 100644 index 541e2ed3..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Program.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Builder; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ASPNET -{ - public class Program - { - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Project_Readme.html b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Project_Readme.html deleted file mode 100644 index 1a0f5b51..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Project_Readme.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Welcome to ASP.NET Core - - - - - - - - - - diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Properties/launchSettings.json b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Properties/launchSettings.json deleted file mode 100644 index 563585dd..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:28927/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "api/values", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Microsoft.Diagnostics.EventFlow.Consumers.ASPNET": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "http://localhost:5000/api/values", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Startup.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Startup.cs deleted file mode 100644 index bd7d83ce..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/Startup.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ASPNET -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - app.UseMvc(); - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/appsettings.json b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/appsettings.json deleted file mode 100644 index fa8ce71a..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/web.config b/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/web.config deleted file mode 100644 index dc0514fc..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ASPNET/web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/App.config b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/App.config deleted file mode 100644 index bae5d6d8..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp.csproj b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp.csproj deleted file mode 100644 index 8ce9b593..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Exe - net461 - false - Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/MyEventSource.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/MyEventSource.cs deleted file mode 100644 index 5ea88960..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/MyEventSource.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Diagnostics.Tracing; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp -{ - [EventSource(Name = "MyEventSource")] - internal class MyEventSource : EventSource - { - public static MyEventSource Log = new MyEventSource(); - - [Event(1, Level = EventLevel.Informational)] - public void Message(string message) - { - WriteEvent(1, message); - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Program.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Program.cs deleted file mode 100644 index 7076df40..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Program.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. -// ------------------------------------------------------------ -using System; -using System.Diagnostics; -using System.Net.Http; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp -{ - class Program - { - static void Main(string[] args) - { - using (DiagnosticPipeline pipeline = DiagnosticPipelineFactory.CreatePipeline("eventFlowConfig.json")) - { - // Build up the pipeline - Console.WriteLine("Pipeline is created."); - - // Send a trace to the pipeline - Trace.TraceInformation("This is a message from trace . . ."); - MyEventSource.Log.Message("This is a message from EventSource ..."); - - // Make a simple get request to bing.com just to generate some HTTP trace - HttpClient client = new HttpClient(); - client.GetStringAsync("http://www.bing.com").Wait(); - - // Check the result - Console.WriteLine("Press any key to continue . . ."); - Console.ReadKey(true); - } - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Properties/AssemblyInfo.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Properties/AssemblyInfo.cs deleted file mode 100644 index 8a240534..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f0dc8bed-405a-42c7-8d65-a46385f859f9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/eventFlowConfig.json b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/eventFlowConfig.json deleted file mode 100644 index c8566fc0..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleApp/eventFlowConfig.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "healthReporter": { - "type": "CsvHealthReporter", - "logFileFolder": ".", - "logFilePrefix": "HealthReport", - "minReportLevel": "Warning", - "throttlingPeriodMsec": "1000" - }, - "inputs": [ - { - "type": "EventSource", - "sources": [ - { "providerName": "MyEventSource" }, - { "providerName": "System.Diagnostics.Eventing.FrameworkEventSource" } - //{ - // "providerName": "MyEventSource", - // "level": "Informational", - // "keywords": "0x7F" - //} - ] - }, - { - "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": "Verbose" - } - ], - - "filters": [ - { - "type": "drop", - "include": "ProviderName == System.Diagnostics.Eventing.FrameworkEventSource && (EventId < 140 || EventId > 143)" - } - ], - - "outputs": [ - { - "type": "StdOutput" - } - //{ - // "type": "ElasticSearch", - // "indexNamePrefix": "app1-", - // "serviceUri": "https://myElasticSearchCluster:9200", - // "basicAuthenticationUserName": "esUser1", - // "basicAuthenticationPassword": "", - // "eventDocumentTypeName": "" - //} - //{ - // "type": "ApplicationInsights", - // "instrumentationKey": "00000000-0000-0000-0000-000000000000" - //}, - //{ - // "type": "EventHub", - // "eventHubName": "eventhub name", - // "connectionString": "" - //} - ], - - "schema-version": "2016-08-11" -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore.csproj b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore.csproj deleted file mode 100644 index dcfd444c..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - netcoreapp1.0 - Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore - Exe - 1.0.4 - $(PackageTargetFallback);dnxcore50 - false - false - false - - - - - - - - - - - PreserveNewest - - - - diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Program.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Program.cs deleted file mode 100644 index 407dbb17..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. -// ------------------------------------------------------------ - -using System; -using System.Diagnostics; -using System.Threading; - -namespace Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore -{ - public class Program - { - public static void Main(string[] args) - { - using (var pipeline = DiagnosticPipelineFactory.CreatePipeline("config.json")) - { - for (int i = 0; i < 200000; i++) - { - // You shall not need to call this unless you really want to diagnose EventHub issue. - pipeline.HealthReporter.ReportHealthy("Some health report content. . ."); - Thread.Sleep(1); - } - Trace.TraceWarning("EventFlow is working!"); - Console.ReadLine(); - } - } - } -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Properties/AssemblyInfo.cs b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Properties/AssemblyInfo.cs deleted file mode 100644 index c662e00a..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8dd84071-078d-4b93-9bc5-968f0f67cca3")] diff --git a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/config.json b/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/config.json deleted file mode 100644 index 8786eb06..00000000 --- a/src/Microsoft.Diagnostics.EventFlow.Consumers.ConsoleAppCore/config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "inputs": [ - { - "type": "Trace", - "traceLevel": "Warning" - } - ], - - "outputs": [ - { - "type": "StdOutput" - } - ], - "healthReporter": { - "type": "CsvHealthReporter", - "logFileFolder": ".", - "logFilePrefix": "HealthReportAAABB", - "minReportLevel": "Message", - "throttlingPeriodMsec": "1000", - "singleLogFileMaximumSizeInMBytes": 1, - "logRetentionInDays": 1, - "ensureOutputCanBeSaved": false - }, - "schema-version": "2016-08-11" -} diff --git a/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/DiagnosticPipelineFactory.cs b/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/DiagnosticPipelineFactory.cs index 4116d8cd..8039a1cf 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/DiagnosticPipelineFactory.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/DiagnosticPipelineFactory.cs @@ -332,6 +332,8 @@ private static void CreateItemFactories( outputFactories["StdOutput"] = "Microsoft.Diagnostics.EventFlow.Outputs.StdOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.StdOutput"; outputFactories["EventHub"] = "Microsoft.Diagnostics.EventFlow.Outputs.EventHubOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.EventHub"; outputFactories["ElasticSearch"] = "Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearchOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch"; + outputFactories["AzureMonitorLogs"] = "Microsoft.Diagnostics.EventFlow.Outputs.OmsOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.Oms"; + // Old name of the Azure Monitor Logs output, to maintain backward compatibility outputFactories["OmsOutput"] = "Microsoft.Diagnostics.EventFlow.Outputs.OmsOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.Oms"; outputFactories["Http"] = "Microsoft.Diagnostics.EventFlow.Outputs.HttpOutputFactory, Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput"; diff --git a/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/EventFlowJsonUtilities.cs b/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/EventFlowJsonUtilities.cs new file mode 100644 index 00000000..d1351d27 --- /dev/null +++ b/src/Microsoft.Diagnostics.EventFlow.Core/Implementations/EventFlowJsonUtilities.cs @@ -0,0 +1,19 @@ +// ------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. +// ------------------------------------------------------------ + +using Newtonsoft.Json; + +namespace Microsoft.Diagnostics.EventFlow +{ + public static class EventFlowJsonUtilities + { + public static JsonSerializerSettings DefaultSerializerSettings { get; } =new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + DateFormatHandling = DateFormatHandling.IsoDateFormat, + ReferenceLoopHandling = ReferenceLoopHandling.Ignore + }; + } +} \ No newline at end of file diff --git a/src/Microsoft.Diagnostics.EventFlow.Core/Microsoft.Diagnostics.EventFlow.Core.csproj b/src/Microsoft.Diagnostics.EventFlow.Core/Microsoft.Diagnostics.EventFlow.Core.csproj index fdce585f..cd628f5e 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Core/Microsoft.Diagnostics.EventFlow.Core.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Core/Microsoft.Diagnostics.EventFlow.Core.csproj @@ -3,7 +3,7 @@ Defines core interfaces and types that comprise Microsoft.Diagnostics.EventFlow library. © Microsoft Corporation. All rights reserved. - 1.5.6 + 1.5.7 Microsoft netstandard1.6;netstandard2.0;net451;net471 Microsoft.Diagnostics.EventFlow.Core @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Core Microsoft;Diagnostics;EventFlow;Core https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 @@ -30,6 +30,7 @@ + diff --git a/src/Microsoft.Diagnostics.EventFlow.EtwUtilities/Microsoft.Diagnostics.EventFlow.EtwUtilities.csproj b/src/Microsoft.Diagnostics.EventFlow.EtwUtilities/Microsoft.Diagnostics.EventFlow.EtwUtilities.csproj index 98451178..0247a92d 100644 --- a/src/Microsoft.Diagnostics.EventFlow.EtwUtilities/Microsoft.Diagnostics.EventFlow.EtwUtilities.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.EtwUtilities/Microsoft.Diagnostics.EventFlow.EtwUtilities.csproj @@ -12,7 +12,7 @@ Microsoft.Diagnostics.EventFlow.EtwUtilities Microsoft;Diagnostics;EventFlow;Utilities;Event Tracing for Windows https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights.csproj index 300dc2a6..6154eccb 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights.csproj @@ -12,7 +12,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.ApplicationInsights Microsoft;Diagnostics;EventFlow;Inputs;Application Insights;Telemetry processor https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true false false diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource.csproj index 90c68d64..7123f539 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource/Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.DiagnosticSource Microsoft;Diagnostics;EventFlow;Inputs;DiagnosticSource https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true false false diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.Etw/Microsoft.Diagnostics.EventFlow.Inputs.Etw.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.Etw/Microsoft.Diagnostics.EventFlow.Inputs.Etw.csproj index 16e50efd..36615aa6 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.Etw/Microsoft.Diagnostics.EventFlow.Inputs.Etw.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.Etw/Microsoft.Diagnostics.EventFlow.Inputs.Etw.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.Etw Microsoft;Diagnostics;EventFlow;Inputs;ETW;Event Tracing for Windows https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true false false diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.EventSource/Microsoft.Diagnostics.EventFlow.Inputs.EventSource.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.EventSource/Microsoft.Diagnostics.EventFlow.Inputs.EventSource.csproj index 99c6ae0d..5b13a81b 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.EventSource/Microsoft.Diagnostics.EventFlow.Inputs.EventSource.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.EventSource/Microsoft.Diagnostics.EventFlow.Inputs.EventSource.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.EventSource Microsoft;Diagnostics;EventFlow;Inputs;EventSource https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.Log4net/Microsoft.Diagnostics.EventFlow.Inputs.Log4net.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.Log4net/Microsoft.Diagnostics.EventFlow.Inputs.Log4net.csproj index 96cb76eb..0dc039e3 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.Log4net/Microsoft.Diagnostics.EventFlow.Inputs.Log4net.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.Log4net/Microsoft.Diagnostics.EventFlow.Inputs.Log4net.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.Log4net Microsoft;Diagnostics;EventFlow;Inputs;Log4net https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging.csproj index f44a3015..60f2d1f4 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging/Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.MicrosoftLogging Microsoft;Diagnostics;EventFlow;Inputs;MicrosoftLogging https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.NLog/Microsoft.Diagnostics.EventFlow.Inputs.NLog.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.NLog/Microsoft.Diagnostics.EventFlow.Inputs.NLog.csproj index 5bea029e..86b262e7 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.NLog/Microsoft.Diagnostics.EventFlow.Inputs.NLog.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.NLog/Microsoft.Diagnostics.EventFlow.Inputs.NLog.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.NLog Microsoft;Diagnostics;EventFlow;Inputs;NLog https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter.csproj index 28a28a8a..351364fb 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter/Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.PerformanceCounter Microsoft;Diagnostics;EventFlow;Inputs;Performance Counter https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 2.0 false diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.Serilog/Microsoft.Diagnostics.EventFlow.Inputs.Serilog.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.Serilog/Microsoft.Diagnostics.EventFlow.Inputs.Serilog.csproj index c872812b..5a4b8edc 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.Serilog/Microsoft.Diagnostics.EventFlow.Inputs.Serilog.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.Serilog/Microsoft.Diagnostics.EventFlow.Inputs.Serilog.csproj @@ -13,7 +13,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.Serilog Microsoft;Diagnostics;EventFlow;Inputs;Serilog https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true $(PackageTargetFallback);dnxcore50 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Inputs.Trace/Microsoft.Diagnostics.EventFlow.Inputs.Trace.csproj b/src/Microsoft.Diagnostics.EventFlow.Inputs.Trace/Microsoft.Diagnostics.EventFlow.Inputs.Trace.csproj index 7f2aade0..c3fed4de 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Inputs.Trace/Microsoft.Diagnostics.EventFlow.Inputs.Trace.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Inputs.Trace/Microsoft.Diagnostics.EventFlow.Inputs.Trace.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Inputs.Trace Microsoft;Diagnostics;EventFlow;Inputs;Trace https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true $(PackageTargetFallback);dnxcore50 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights.csproj index b3bf55d2..87163d42 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights Microsoft;Diagnostics;EventFlow;Outputs;Application Insights https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch.csproj index 8b3cb760..ac58057a 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch/Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch.csproj @@ -11,7 +11,7 @@ Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch Microsoft;Diagnostics;EventFlow;Outputs;Elasticsearch https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/EventDataExtensions.cs b/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/EventDataExtensions.cs index 4e2d2ca9..fb6791b3 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/EventDataExtensions.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/EventDataExtensions.cs @@ -10,6 +10,8 @@ using Newtonsoft.Json; using MessagingEventData = Microsoft.Azure.EventHubs.EventData; +using Microsoft.Diagnostics.EventFlow; + namespace Microsoft.Diagnostics.EventFlow.Outputs { internal static class EventDataExtensions @@ -39,12 +41,6 @@ internal class ShoeBoxEventData public List records = new List(); } - private static readonly JsonSerializerSettings serializerSetting = new JsonSerializerSettings() - { - NullValueHandling = NullValueHandling.Ignore, - DateFormatHandling = DateFormatHandling.IsoDateFormat - }; - public static MessagingEventData ToMessagingEventData(this EventData eventData, out int messageSize) { IReadOnlyCollection metadataCollection; @@ -55,7 +51,7 @@ public static MessagingEventData ToMessagingEventData(this EventData eventData, // If this turns out to consume significant CPU time, we could serialize the object "manually". // See https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.EventSource/EventSourceLogger.cs for an example. // This avoids the reflection cost that is associate with single-call SerializeObject approach - string eventDataSerialized = JsonConvert.SerializeObject(sbEventData, serializerSetting); + string eventDataSerialized = JsonConvert.SerializeObject(sbEventData, EventFlowJsonUtilities.DefaultSerializerSettings); byte[] messageBytes = Encoding.UTF8.GetBytes(eventDataSerialized); messageSize = messageBytes.Length; diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/Microsoft.Diagnostics.EventFlow.Outputs.EventHub.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/Microsoft.Diagnostics.EventFlow.Outputs.EventHub.csproj index 23077656..001c39b1 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/Microsoft.Diagnostics.EventFlow.Outputs.EventHub.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.EventHub/Microsoft.Diagnostics.EventFlow.Outputs.EventHub.csproj @@ -6,12 +6,12 @@ Microsoft net451;netstandard1.6;netstandard2.0 Microsoft.Diagnostics.EventFlow.Outputs.EventHub - 1.4.0 + 1.4.1 true Microsoft.Diagnostics.EventFlow.Outputs.EventHub Microsoft;Diagnostics;EventFlow;Outputs;Event Hub;Event Hubs https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 1.6.1 2.0.0 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/HttpOutput.cs b/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/HttpOutput.cs index 799137be..3c167b5a 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/HttpOutput.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/HttpOutput.cs @@ -124,13 +124,13 @@ public async Task SendEventsAsync(IReadOnlyCollection events, long tr switch (configuration.Format) { case HttpOutputFormat.Json: - payload.Append(JsonConvert.SerializeObject(events)); + payload.Append(JsonConvert.SerializeObject(events, EventFlowJsonUtilities.DefaultSerializerSettings)); break; case HttpOutputFormat.JsonLines: foreach (EventData evt in events) { - payload.AppendLine(JsonConvert.SerializeObject(evt)); + payload.AppendLine(JsonConvert.SerializeObject(evt, EventFlowJsonUtilities.DefaultSerializerSettings)); } break; } diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput.csproj index 0d238a5f..1205822b 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput/Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput.csproj @@ -6,12 +6,12 @@ Microsoft netstandard1.6;net451;netstandard2.0 Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput - 1.4.0 + 1.4.1 true Microsoft.Diagnostics.EventFlow.Outputs.HttpOutput Microsoft;Diagnostics;EventFlow;Outputs;HttpOutput https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true $(PackageTargetFallback);dnxcore50 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Microsoft.Diagnostics.EventFlow.Outputs.Oms.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Microsoft.Diagnostics.EventFlow.Outputs.Oms.csproj index 27fea223..62717f3a 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Microsoft.Diagnostics.EventFlow.Outputs.Oms.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Microsoft.Diagnostics.EventFlow.Outputs.Oms.csproj @@ -1,17 +1,17 @@  - Provides an output implementation that sends diagnostics data to Microsoft Operations Management Suite. + Provides an output implementation that sends diagnostics data Azure Monitor Logs Service. © Microsoft Corporation. All rights reserved. Microsoft netstandard1.6;net451;netstandard2.0 Microsoft.Diagnostics.EventFlow.Outputs.Oms - 1.5.0 + 1.6.0 true - Microsoft.Diagnostics.EventFlow.Outputs.Oms - Microsoft;Diagnostics;EventFlow;Outputs;Microsoft Operations Management + Microsoft.Diagnostics.EventFlow.Outputs.AzureMonitorLogs + Microsoft;Diagnostics;EventFlow;Outputs;Azure Monitor Logs;Log Analytics https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true $(PackageTargetFallback);dnxcore50 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/OmsOutput.cs b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/OmsOutput.cs index 0cb1c783..15a74412 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/OmsOutput.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/OmsOutput.cs @@ -3,11 +3,6 @@ // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ -using Microsoft.Diagnostics.EventFlow.Configuration; -using Microsoft.Diagnostics.EventFlow.Utilities; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Diagnostics; @@ -17,8 +12,15 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Newtonsoft.Json; using Validation; +using Microsoft.Diagnostics.EventFlow; +using Microsoft.Diagnostics.EventFlow.Configuration; +using Microsoft.Diagnostics.EventFlow.Utilities; + + namespace Microsoft.Diagnostics.EventFlow.Outputs { public class OmsOutput : IOutput @@ -152,7 +154,7 @@ public async Task SendEventsAsync(IReadOnlyCollection events, long tr catch { } string errorMessage = - $"{nameof(OmsOutput)}: OMS REST API returned an error. Code: {response.StatusCode} Description: {response.ReasonPhrase} {responseContent}"; + $"{nameof(OmsOutput)}: Azure Monitor Logs REST API returned an error. Code: {response.StatusCode} Description: {response.ReasonPhrase} {responseContent}"; this.healthReporter.ReportProblem(errorMessage); } } @@ -162,7 +164,7 @@ public async Task SendEventsAsync(IReadOnlyCollection events, long tr { ErrorHandlingPolicies.HandleOutputTaskError(e, () => { - string errorMessage = nameof(OmsOutput) + ": an error occurred while sending data to OMS: " + string errorMessage = nameof(OmsOutput) + ": an error occurred while sending data to Azure Monitor Logs service: " + Environment.NewLine + e.ToString(); this.healthReporter.ReportWarning(errorMessage, EventFlowContextIdentifiers.Output); }); @@ -185,7 +187,7 @@ protected virtual IReadOnlyDictionary PrepareEventData(IReadOnly if ((events != null) && (events.Count > 0)) { - result.Add(this.connectionData.LogTypeName, JsonConvert.SerializeObject(events)); + result.Add(this.connectionData.LogTypeName, JsonConvert.SerializeObject(events, EventFlowJsonUtilities.DefaultSerializerSettings)); } return result; diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Properties/AssemblyInfo.cs b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Properties/AssemblyInfo.cs index a5040a11..60290e99 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Properties/AssemblyInfo.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.Oms/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ // associated with an assembly. [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.Diagnostics.EventFlow.Outputs.OmsEvent")] +[assembly: AssemblyProduct("Microsoft.Diagnostics.EventFlow.Outputs.AzureMonitorLogs")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput.csproj b/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput.csproj index 173a1844..7e894988 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput.csproj @@ -6,12 +6,12 @@ Microsoft netstandard1.6;net451;netstandard2.0 Microsoft.Diagnostics.EventFlow.Outputs.StdOutput - 1.4.0 + 1.4.1 true Microsoft.Diagnostics.EventFlow.Outputs.StdOutput Microsoft;Diagnostics;EventFlow;Outputs https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true $(PackageTargetFallback);dnxcore50 1.6.1 diff --git a/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/StdOutput.cs b/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/StdOutput.cs index 782ea8ae..0e19c089 100644 --- a/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/StdOutput.cs +++ b/src/Microsoft.Diagnostics.EventFlow.Outputs.StdOutput/StdOutput.cs @@ -10,6 +10,8 @@ using Newtonsoft.Json; using Validation; +using Microsoft.Diagnostics.EventFlow; + namespace Microsoft.Diagnostics.EventFlow.Outputs { public class StdOutput : IOutput @@ -30,7 +32,7 @@ public Task SendEventsAsync(IReadOnlyCollection events, long transmis { foreach (EventData evt in events) { - string eventString = JsonConvert.SerializeObject(evt); + string eventString = JsonConvert.SerializeObject(evt, EventFlowJsonUtilities.DefaultSerializerSettings); string output = $"[{transmissionSequenceNumber}] {eventString}"; Console.WriteLine(output); diff --git a/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/Microsoft.Diagnostics.EventFlow.ServiceFabric.csproj b/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/Microsoft.Diagnostics.EventFlow.ServiceFabric.csproj index c80024a8..a6946153 100644 --- a/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/Microsoft.Diagnostics.EventFlow.ServiceFabric.csproj +++ b/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/Microsoft.Diagnostics.EventFlow.ServiceFabric.csproj @@ -3,7 +3,7 @@ Provides types that simplify the use of EventFlow library by Microsoft Service Fabric services. © Microsoft Corporation. All rights reserved. - 1.5.0 + 1.5.1 Microsoft netstandard2.0;net451;net471 x64 @@ -12,7 +12,7 @@ Microsoft.Diagnostics.EventFlow.ServiceFabric Microsoft;Diagnostics;EventFlow;Service Fabric https://github.com/Azure/diagnostics-eventflow - https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + MIT true 2.0 false diff --git a/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/ServiceFabricHealthReporter.cs b/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/ServiceFabricHealthReporter.cs index 5791512e..04a245ef 100644 --- a/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/ServiceFabricHealthReporter.cs +++ b/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/ServiceFabricHealthReporter.cs @@ -11,6 +11,8 @@ namespace Microsoft.Diagnostics.EventFlow.ServiceFabric { public class ServiceFabricHealthReporter : IHealthReporter { + private static TimeSpan DefaultHealthReportTtl = TimeSpan.FromMinutes(10); + private CodePackageActivationContext activationContext; private string entityIdentifier; @@ -44,6 +46,8 @@ private void ReportMessage(HealthState healthState, string description) { HealthInformation healthInformation = new HealthInformation(this.entityIdentifier, "Connectivity", healthState); healthInformation.Description = description; + healthInformation.RemoveWhenExpired = true; + healthInformation.TimeToLive = ServiceFabricHealthReporter.DefaultHealthReportTtl; try { diff --git a/test/Microsoft.Diagnostics.EventFlow.Core.Tests/DiagnosticsPipelineFactoryTests.cs b/test/Microsoft.Diagnostics.EventFlow.Core.Tests/DiagnosticsPipelineFactoryTests.cs index 343e625b..28d24611 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Core.Tests/DiagnosticsPipelineFactoryTests.cs +++ b/test/Microsoft.Diagnostics.EventFlow.Core.Tests/DiagnosticsPipelineFactoryTests.cs @@ -371,6 +371,15 @@ public void CanCreateAllStandardPipelineItems() ""workspaceId"": ""00000000-0000-0000-0000-000000000000"", ""workspaceKey"": ""Tm90IGEgd29ya3NwYWNlIGtleQ=="" }, + { + ""type"": ""AzureMonitorLogs"", + ""workspaceId"": ""00000000-0000-0000-0000-000000000000"", + ""workspaceKey"": ""Tm90IGEgd29ya3NwYWNlIGtleQ=="" + }, + { + ""type"": ""Http"", + ""serviceUri"": ""https://example.com/"" + }, { ""type"": ""EventHub"", ""connectionString"": ""Endpoint=sb://unused.servicebus.windows.net/;SharedAccessKeyName=send-only;SharedAccessKey=+lw95uDEcOLYE/zZFycZx3gxgomPgzfFmSdj+iBQiI8=;EntityPath=hub1"" @@ -424,7 +433,16 @@ public void CanCreateAllStandardPipelineItems() ""type"": ""OmsOutput"", ""workspaceId"": ""00000000-0000-0000-0000-000000000000"", ""workspaceKey"": ""Tm90IGEgd29ya3NwYWNlIGtleQ=="" - } + }, + { + ""type"": ""AzureMonitorLogs"", + ""workspaceId"": ""00000000-0000-0000-0000-000000000000"", + ""workspaceKey"": ""Tm90IGEgd29ya3NwYWNlIGtleQ=="" + }, + { + ""type"": ""Http"", + ""serviceUri"": ""https://example.com/"" + } ], ""schemaVersion"": ""2016-08-11"" @@ -460,7 +478,9 @@ public void CanCreateAllStandardPipelineItems() Assert.Collection(pipeline.Sinks, s => Assert.IsType(s.Output), s => Assert.IsType(s.Output), - s => Assert.IsType(s.Output) + s => Assert.IsType(s.Output), + s => Assert.IsType(s.Output), // Azure Monitor Logs output can be created using the old and the new name + s => Assert.IsType(s.Output) #if NET46 , s => Assert.IsType(s.Output) , s => Assert.IsType(s.Output) diff --git a/test/Microsoft.Diagnostics.EventFlow.Core.Tests/Microsoft.Diagnostics.EventFlow.Core.Tests.csproj b/test/Microsoft.Diagnostics.EventFlow.Core.Tests/Microsoft.Diagnostics.EventFlow.Core.Tests.csproj index 481c97e2..fe7adf85 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Core.Tests/Microsoft.Diagnostics.EventFlow.Core.Tests.csproj +++ b/test/Microsoft.Diagnostics.EventFlow.Core.Tests/Microsoft.Diagnostics.EventFlow.Core.Tests.csproj @@ -1,12 +1,10 @@  - netcoreapp1.0;net461;netcoreapp2.0;net471 + net461;netcoreapp2.0;net471 Microsoft.Diagnostics.EventFlow.Core.Tests true true - $(PackageTargetFallback);dotnet5.4;portable-net451+win8 - 1.1.0 $(NoWarn);NU1603 true true @@ -24,6 +22,7 @@ + @@ -37,11 +36,6 @@ - - - - - diff --git a/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Log4NetInputTests.cs b/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Log4NetInputTests.cs index e8e7ceb2..de53b79c 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Log4NetInputTests.cs +++ b/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Log4NetInputTests.cs @@ -11,12 +11,14 @@ using log4net; using log4net.Core; using log4net.Repository.Hierarchy; -using Microsoft.Diagnostics.EventFlow.Configuration; -using Microsoft.Diagnostics.EventFlow.TestHelpers; using Microsoft.Extensions.Configuration; using Moq; using Newtonsoft.Json; +using Microsoft.Diagnostics.EventFlow; +using Microsoft.Diagnostics.EventFlow.Configuration; +using Microsoft.Diagnostics.EventFlow.TestHelpers; + namespace Microsoft.Diagnostics.EventFlow.Inputs.Tests { public class Log4NetInputTests @@ -38,7 +40,7 @@ public void VerifyAllConfigOptionsMappedToConfigObject() using (var configFile = new TemporaryFile()) { - var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj); + var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj, EventFlowJsonUtilities.DefaultSerializerSettings); configFile.Write(pipelineConfig); var configBuilder = new ConfigurationBuilder(); diff --git a/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Microsoft.Diagnostics.EventFlow.Inputs.Tests.csproj b/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Microsoft.Diagnostics.EventFlow.Inputs.Tests.csproj index 6bf212e2..b0df8073 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Microsoft.Diagnostics.EventFlow.Inputs.Tests.csproj +++ b/test/Microsoft.Diagnostics.EventFlow.Inputs.Tests/Microsoft.Diagnostics.EventFlow.Inputs.Tests.csproj @@ -1,13 +1,11 @@  - netcoreapp1.0;netcoreapp2.0;net462;net471 + netcoreapp2.0;net462;net471 portable Microsoft.Diagnostics.EventFlow.Inputs.Tests true true - $(PackageTargetFallback);dotnet5.4;portable-net451+win8 - 1.1.0 $(NoWarn);NU1603 true true @@ -41,11 +39,7 @@ - - - - - + diff --git a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/ElasticSearchOutputTests.cs b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/ElasticSearchOutputTests.cs index 6bfe951e..f4477372 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/ElasticSearchOutputTests.cs +++ b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/ElasticSearchOutputTests.cs @@ -2,13 +2,16 @@ using System.Collections.Generic; using System.Linq; using Elasticsearch.Net; -using Microsoft.Diagnostics.EventFlow.Configuration; -using Microsoft.Diagnostics.EventFlow.TestHelpers; using Microsoft.Extensions.Configuration; using Moq; using Newtonsoft.Json; using Xunit; +using Microsoft.Diagnostics.EventFlow; +using Microsoft.Diagnostics.EventFlow.Configuration; +using Microsoft.Diagnostics.EventFlow.TestHelpers; + + namespace Microsoft.Diagnostics.EventFlow.Outputs.Tests { public class ElasticSearchOutputTests @@ -38,7 +41,7 @@ public void VerifyAllConfigOptionsMappedToConfigObject() using (var configFile = new TemporaryFile()) { - var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj); + var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj, EventFlowJsonUtilities.DefaultSerializerSettings); configFile.Write(pipelineConfig); var configBuilder = new ConfigurationBuilder(); diff --git a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/HttpOutputTests.cs b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/HttpOutputTests.cs index 4d004cb5..506e6753 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/HttpOutputTests.cs +++ b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/HttpOutputTests.cs @@ -4,13 +4,15 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.Diagnostics.EventFlow.Configuration; -using Microsoft.Diagnostics.EventFlow.TestHelpers; using Microsoft.Extensions.Configuration; using Moq; using Newtonsoft.Json; using Xunit; +using Microsoft.Diagnostics.EventFlow; +using Microsoft.Diagnostics.EventFlow.Configuration; +using Microsoft.Diagnostics.EventFlow.TestHelpers; + namespace Microsoft.Diagnostics.EventFlow.Outputs.Tests { public class HttpOutputTests @@ -40,7 +42,7 @@ public void VerifyAllConfigOptionsMappedToConfigObject() using (var configFile = new TemporaryFile()) { - var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj); + var pipelineConfig = JsonConvert.SerializeObject(pipelineConfigObj, EventFlowJsonUtilities.DefaultSerializerSettings); configFile.Write(pipelineConfig); var configBuilder = new ConfigurationBuilder(); diff --git a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/Microsoft.Diagnostics.EventFlow.Outputs.Tests.csproj b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/Microsoft.Diagnostics.EventFlow.Outputs.Tests.csproj index 41601c85..83daa77c 100644 --- a/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/Microsoft.Diagnostics.EventFlow.Outputs.Tests.csproj +++ b/test/Microsoft.Diagnostics.EventFlow.Outputs.Tests/Microsoft.Diagnostics.EventFlow.Outputs.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp1.0;net46;netcoreapp2.0 + net46;netcoreapp2.0 Microsoft.Diagnostics.EventFlow.Outputs.Tests true true