Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BailunTrace
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wms
BailunTrace
Commits
4c8b5b44
Commit
4c8b5b44
authored
Apr 21, 2020
by
cairongzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级3.1
parent
2052f7ef
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
29 deletions
+31
-29
SimpleApi.csproj
samples/SimpleApi/SimpleApi.csproj
+1
-3
Startup.cs
samples/SimpleApi/Startup.cs
+7
-3
Bailun.ServiceFabric.Trace.csproj
...lun.ServiceFabric.Trace/Bailun.ServiceFabric.Trace.csproj
+11
-9
HostingDiagnosticProcessor.cs
...race/Diagnostics/AspNetCore/HostingDiagnosticProcessor.cs
+10
-12
WebHostBuilderExtensions.cs
...eFabric.Trace/Extensions/Host/WebHostBuilderExtensions.cs
+1
-0
ApplicationBuilderExtensions.cs
...eFabric.Trace/Middlewares/ApplicationBuilderExtensions.cs
+0
-1
Bailun.ServiceFabric.Trace.Test.csproj
...eFabric.Trace.Test/Bailun.ServiceFabric.Trace.Test.csproj
+1
-1
No files found.
samples/SimpleApi/SimpleApi.csproj
View file @
4c8b5b44
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp
2
.1</TargetFramework>
<TargetFramework>netcoreapp
3
.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
...
...
@@ -9,8 +9,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="WebApiClient.JIT" Version="1.1.3" />
</ItemGroup>
...
...
samples/SimpleApi/Startup.cs
View file @
4c8b5b44
...
...
@@ -34,14 +34,18 @@ namespace SimpleApi
opt
.
HttpHost
=
new
Uri
(
"http://localhost:5001/"
);
});
services
.
Add
Mvc
().
SetCompatibilityVersion
(
CompatibilityVersion
.
Version_2_1
);
services
.
Add
Controllers
(
);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public
void
Configure
(
IApplicationBuilder
app
,
IHostingEnvironment
env
)
public
void
Configure
(
IApplicationBuilder
app
)
{
app
.
UseBailunRequestLogging
();
app
.
UseMvc
();
app
.
UseRouting
();
app
.
UseEndpoints
(
endpoints
=>
{
endpoints
.
MapControllers
();
});
}
}
...
...
src/Bailun.ServiceFabric.Trace/Bailun.ServiceFabric.Trace.csproj
View file @
4c8b5b44
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net
standard2.0
</TargetFramework>
<TargetFramework>net
coreapp3.1
</TargetFramework>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Exceptionless" Version="4.3.2027" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="2.1.1" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Exceptionless" Version="4.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="SkyAPM.Agent.AspNetCore" Version="0.9.0" />
...
...
src/Bailun.ServiceFabric.Trace/Diagnostics/AspNetCore/HostingDiagnosticProcessor.cs
View file @
4c8b5b44
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http.Extensions
;
using
Microsoft.AspNetCore.Http.Internal
;
using
Microsoft.AspNetCore.Mvc.Abstractions
;
using
Newtonsoft.Json
;
using
Microsoft.AspNetCore.Http.Extensions
;
using
SkyApm
;
using
SkyApm.Common
;
using
SkyApm.Diagnostics
;
...
...
@@ -90,14 +88,14 @@ namespace Bailun.Diagnostics.AspNetCore
}
//[DiagnosticName("Microsoft.AspNetCore.Mvc.BeforeAction")]
public
void
BeforeAction
([
Property
]
ActionDescriptor
actionDescriptor
,
[
Property
]
HttpContext
httpContext
)
{
}
//[DiagnosticName("Microsoft.AspNetCore.Mvc.AfterAction")]
public
void
AfterAction
([
Property
]
ActionDescriptor
actionDescriptor
,
[
Property
]
HttpContext
httpContext
)
{
}
//
public void BeforeAction([Property] ActionDescriptor actionDescriptor, [Property] HttpContext httpContext)
//
{
//
}
//
//
[DiagnosticName("Microsoft.AspNetCore.Mvc.AfterAction")]
//
public void AfterAction([Property] ActionDescriptor actionDescriptor, [Property] HttpContext httpContext)
//
{
//
}
}
internal
static
class
StringExtension
...
...
@@ -108,7 +106,7 @@ namespace Bailun.Diagnostics.AspNetCore
if
(
request
.
ContentLength
==
null
||
!(
request
.
ContentLength
>
0
))
return
body
;
request
.
Enable
Rewind
();
request
.
Enable
Buffering
();
request
.
Body
.
Seek
(
0
,
SeekOrigin
.
Begin
);
var
buffer
=
new
byte
[
Convert
.
ToInt32
(
request
.
ContentLength
)];
...
...
src/Bailun.ServiceFabric.Trace/Extensions/Host/WebHostBuilderExtensions.cs
View file @
4c8b5b44
...
...
@@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection;
using
SkyApm
;
using
Bailun.Diagnostics.AspNetCore
;
using
Bailun.Diagnostics.HttpClient
;
using
Microsoft.Extensions.Hosting
;
namespace
Microsoft.AspNetCore.Hosting
{
...
...
src/Bailun.ServiceFabric.Trace/Middlewares/ApplicationBuilderExtensions.cs
View file @
4c8b5b44
...
...
@@ -6,7 +6,6 @@ using Serilog.AspNetCore;
using
System
;
using
System.IO
;
using
System.Text
;
using
Microsoft.AspNetCore.Http.Internal
;
namespace
Microsoft.AspNetCore.Builder
{
...
...
test/Bailun.ServiceFabric.Trace.Test/Bailun.ServiceFabric.Trace.Test.csproj
View file @
4c8b5b44
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp
2
.1</TargetFramework>
<TargetFramework>netcoreapp
3
.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment