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
664bb4aa
Commit
664bb4aa
authored
Apr 11, 2020
by
huangzhihong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix AspnetCore 路由忽略上报
parent
cb271e4c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
skyapm.Development.json
samples/SimpleConsole/skyapm.Development.json
+30
-0
HostingDiagnosticProcessor.cs
...race/Diagnostics/AspNetCore/HostingDiagnosticProcessor.cs
+7
-1
TraceFilterTest.cs
test/Bailun.ServiceFabric.Trace.Test/TraceFilterTest.cs
+29
-0
No files found.
samples/SimpleConsole/skyapm.Development.json
0 → 100644
View file @
664bb4aa
{
"SkyWalking"
:
{
"ServiceName"
:
"simpleconsole"
,
"Namespace"
:
""
,
"HeaderVersions"
:
[
"sw6"
],
"Sampling"
:
{
"SamplePer3Secs"
:
-1
,
"Percentage"
:
-1.0
},
"Logging"
:
{
"Level"
:
"Information"
,
"FilePath"
:
"logs
\\
skyapm-{Date}.log"
},
"Transport"
:
{
"Interval"
:
3000
,
"ProtocolVersion"
:
"v6"
,
"QueueSize"
:
30000
,
"BatchSize"
:
3000
,
"gRPC"
:
{
"Servers"
:
"118.24.155.252:11800"
,
"Timeout"
:
10000
,
"ConnectTimeout"
:
10000
,
"ReportTimeout"
:
600000
}
}
}
}
\ No newline at end of file
src/Bailun.ServiceFabric.Trace/Diagnostics/AspNetCore/HostingDiagnosticProcessor.cs
View file @
664bb4aa
using
Microsoft.AspNetCore.Http
;
using
Bailun.ServiceFabric.Trace
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http.Extensions
;
using
Microsoft.AspNetCore.Http.Extensions
;
using
Microsoft.AspNetCore.Http.Internal
;
using
Microsoft.AspNetCore.Http.Internal
;
using
Microsoft.AspNetCore.Mvc.Abstractions
;
using
Microsoft.AspNetCore.Mvc.Abstractions
;
...
@@ -32,6 +33,11 @@ namespace Bailun.Diagnostics.AspNetCore
...
@@ -32,6 +33,11 @@ namespace Bailun.Diagnostics.AspNetCore
[
DiagnosticName
(
"Microsoft.AspNetCore.Hosting.BeginRequest"
)]
[
DiagnosticName
(
"Microsoft.AspNetCore.Hosting.BeginRequest"
)]
public
void
BeginRequest
([
Property
]
HttpContext
httpContext
)
public
void
BeginRequest
([
Property
]
HttpContext
httpContext
)
{
{
if
(
TracePathFilter
.
IsIgnore
(
httpContext
.
Request
.
Path
.
ToString
()))
{
return
;
}
var
requestBody
=
httpContext
.
Request
.
GetBodyString
();
var
requestBody
=
httpContext
.
Request
.
GetBodyString
();
_segmentContext
=
_tracingContext
.
CreateEntrySegmentContext
(
httpContext
.
Request
.
Path
,
_segmentContext
=
_tracingContext
.
CreateEntrySegmentContext
(
httpContext
.
Request
.
Path
,
...
...
test/Bailun.ServiceFabric.Trace.Test/TraceFilterTest.cs
0 → 100644
View file @
664bb4aa
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Xunit
;
namespace
Bailun.ServiceFabric.Trace.Test
{
public
class
TraceFilterTest
{
public
TraceFilterTest
()
{
}
[
Fact
]
public
void
Filter_ConsulDNS_Test
()
{
Assert
.
True
(
TracePathFilter
.
IsIgnore
(
"/v1/kv/Publish/Amazon/Common/?recurse=true&index=3875080"
));
}
[
Fact
]
public
void
Filter_Healthy_Test
()
{
Assert
.
True
(
TracePathFilter
.
IsIgnore
(
"/status"
));
Assert
.
True
(!
TracePathFilter
.
IsIgnore
(
"/statusa"
));
}
}
}
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