Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
af1b1ec6
Commit
af1b1ec6
authored
Apr 11, 2018
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor diagnostics
parent
9d0a453a
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
178 additions
and
159 deletions
+178
-159
DiagnosticListenerExtensions.cs
...otNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs
+61
-83
EventData.Broker.Consume.cs
src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs
+9
-6
EventData.Broker.ConsumeEnd.cs
...DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs
+10
-6
EventData.Broker.ConsumeError.cs
...tNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs
+11
-7
EventData.Broker.Publish.cs
src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs
+9
-6
EventData.Broker.PublishEnd.cs
...DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs
+10
-6
EventData.Broker.PublishError.cs
...tNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs
+11
-7
EventData.Broker.cs
src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs
+16
-10
EventData.SubscriberInvoke.cs
src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs
+17
-14
EventData.SubscriberInvokeEnd.cs
...tNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs
+7
-4
EventData.SubscriberInvokeError.cs
...etCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs
+7
-4
EventData.cs
src/DotNetCore.CAP/Diagnostics/EventData.cs
+5
-2
IErrorEventData.cs
src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs
+5
-4
No files found.
src/DotNetCore.CAP/Diagnostics/DiagnosticListenerExtensions.cs
View file @
af1b1ec6
This diff is collapsed.
Click to expand it.
src/DotNetCore.CAP/Diagnostics/EventData.Broker.Consume.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerConsumeEventData
:
BrokerEventData
public
class
BrokerConsumeEventData
:
BrokerEventData
{
{
public
DateTimeOffset
StartTime
{
get
;
}
public
BrokerConsumeEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
public
BrokerConsumeEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
)
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
)
{
{
StartTime
=
startTime
;
StartTime
=
startTime
;
}
}
public
DateTimeOffset
StartTime
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeEnd.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerConsumeEndEventData
:
BrokerConsumeEventData
public
class
BrokerConsumeEndEventData
:
BrokerConsumeEventData
{
{
public
TimeSpan
Duration
{
get
;
}
public
BrokerConsumeEndEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
string
brokerTopicName
,
public
BrokerConsumeEndEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
string
brokerTopicBody
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
,
startTime
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
,
startTime
)
{
{
Duration
=
duration
;
Duration
=
duration
;
}
}
public
TimeSpan
Duration
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.ConsumeError.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerConsumeErrorEventData
:
BrokerConsumeEndEventData
,
IErrorEventData
public
class
BrokerConsumeErrorEventData
:
BrokerConsumeEndEventData
,
IErrorEventData
{
{
public
Exception
Exception
{
get
;
}
public
BrokerConsumeErrorEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
string
brokerTopicName
,
string
brokerTopicBody
,
Exception
exception
,
DateTimeOffset
startTime
,
public
BrokerConsumeErrorEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
TimeSpan
duration
)
string
brokerTopicName
,
string
brokerTopicBody
,
Exception
exception
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
,
startTime
,
duration
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
,
startTime
,
duration
)
{
{
Exception
=
exception
;
Exception
=
exception
;
}
}
public
Exception
Exception
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.Publish.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerPublishEventData
:
BrokerEventData
public
class
BrokerPublishEventData
:
BrokerEventData
{
{
public
DateTimeOffset
StartTime
{
get
;
}
public
BrokerPublishEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
public
BrokerPublishEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
)
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
)
{
{
StartTime
=
startTime
;
StartTime
=
startTime
;
}
}
public
DateTimeOffset
StartTime
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishEnd.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerPublishEndEventData
:
BrokerPublishEventData
public
class
BrokerPublishEndEventData
:
BrokerPublishEventData
{
{
public
TimeSpan
Duration
{
get
;
}
public
BrokerPublishEndEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
string
brokerTopicName
,
public
BrokerPublishEndEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
string
brokerTopicName
,
string
brokerTopicBody
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
string
brokerTopicBody
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
,
startTime
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
,
startTime
)
{
{
Duration
=
duration
;
Duration
=
duration
;
}
}
public
TimeSpan
Duration
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.PublishError.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerPublishErrorEventData
:
BrokerPublishEndEventData
,
IErrorEventData
public
class
BrokerPublishErrorEventData
:
BrokerPublishEndEventData
,
IErrorEventData
{
{
public
Exception
Exception
{
get
;
}
public
BrokerPublishErrorEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
string
brokerTopicName
,
string
brokerTopicBody
,
Exception
exception
,
DateTimeOffset
startTime
,
public
BrokerPublishErrorEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
TimeSpan
duration
)
string
brokerTopicName
,
string
brokerTopicBody
,
Exception
exception
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
brokerAddress
,
brokerTopicName
,
brokerTopicBody
,
startTime
,
duration
)
:
base
(
operationId
,
operation
,
groupName
,
brokerTopicName
,
brokerTopicBody
,
startTime
,
duration
)
{
{
Exception
=
exception
;
Exception
=
exception
;
}
}
public
Exception
Exception
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.Broker.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
BrokerEventData
:
EventData
public
class
BrokerEventData
:
EventData
{
{
public
string
GroupName
{
get
;
set
;
}
public
BrokerEventData
(
Guid
operationId
,
string
operation
,
string
brokerAddress
,
public
string
BrokerTopicBody
{
get
;
set
;
}
public
string
BrokerTopicName
{
get
;
set
;
}
public
BrokerEventData
(
Guid
operationId
,
string
operation
,
string
groupName
,
string
brokerTopicName
,
string
brokerTopicBody
)
string
brokerTopicName
,
string
brokerTopicBody
)
:
base
(
operationId
,
operation
)
:
base
(
operationId
,
operation
)
{
{
GroupName
=
groupName
;
Headers
=
new
TracingHeaders
();
BrokerAddress
=
brokerAddress
;
BrokerTopicName
=
brokerTopicName
;
BrokerTopicName
=
brokerTopicName
;
BrokerTopicBody
=
brokerTopicBody
;
BrokerTopicBody
=
brokerTopicBody
;
}
}
public
TracingHeaders
Headers
{
get
;
set
;
}
public
string
BrokerAddress
{
get
;
set
;
}
public
string
BrokerTopicBody
{
get
;
set
;
}
public
string
BrokerTopicName
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvoke.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
SubscriberInvokeEventData
:
EventData
public
class
SubscriberInvokeEventData
:
EventData
{
{
public
DateTimeOffset
StartTime
{
get
;
}
public
string
MethodName
{
get
;
set
;
}
public
string
SubscribeName
{
get
;
set
;
}
public
string
SubscribeGroup
{
get
;
set
;
}
public
string
ParameterValues
{
get
;
set
;
}
public
SubscriberInvokeEventData
(
Guid
operationId
,
public
SubscriberInvokeEventData
(
Guid
operationId
,
string
operation
,
string
operation
,
string
methodName
,
string
methodName
,
...
@@ -29,5 +22,15 @@ namespace DotNetCore.CAP.Diagnostics
...
@@ -29,5 +22,15 @@ namespace DotNetCore.CAP.Diagnostics
ParameterValues
=
parameterValues
;
ParameterValues
=
parameterValues
;
StartTime
=
startTime
;
StartTime
=
startTime
;
}
}
public
DateTimeOffset
StartTime
{
get
;
}
public
string
MethodName
{
get
;
set
;
}
public
string
SubscribeName
{
get
;
set
;
}
public
string
SubscribeGroup
{
get
;
set
;
}
public
string
ParameterValues
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeEnd.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
SubscriberInvokeEndEventData
:
SubscriberInvokeEventData
public
class
SubscriberInvokeEndEventData
:
SubscriberInvokeEventData
{
{
public
TimeSpan
Duration
{
get
;
}
public
SubscriberInvokeEndEventData
(
Guid
operationId
,
string
operation
,
public
SubscriberInvokeEndEventData
(
Guid
operationId
,
string
operation
,
string
methodName
,
string
subscribeName
,
string
subscribeGroup
,
string
methodName
,
string
subscribeName
,
string
subscribeGroup
,
string
parameterValues
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
string
parameterValues
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
...
@@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics
...
@@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics
{
{
Duration
=
duration
;
Duration
=
duration
;
}
}
public
TimeSpan
Duration
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.SubscriberInvokeError.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
public
class
SubscriberInvokeErrorEventData
:
SubscriberInvokeEndEventData
,
IErrorEventData
public
class
SubscriberInvokeErrorEventData
:
SubscriberInvokeEndEventData
,
IErrorEventData
{
{
public
Exception
Exception
{
get
;
}
public
SubscriberInvokeErrorEventData
(
Guid
operationId
,
string
operation
,
string
methodName
,
public
SubscriberInvokeErrorEventData
(
Guid
operationId
,
string
operation
,
string
methodName
,
string
subscribeName
,
string
subscribeGroup
,
string
parameterValues
,
Exception
exception
,
string
subscribeName
,
string
subscribeGroup
,
string
parameterValues
,
Exception
exception
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
methodName
,
subscribeName
,
DateTimeOffset
startTime
,
TimeSpan
duration
)
:
base
(
operationId
,
operation
,
methodName
,
subscribeName
,
...
@@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics
...
@@ -13,5 +14,7 @@ namespace DotNetCore.CAP.Diagnostics
{
{
Exception
=
exception
;
Exception
=
exception
;
}
}
public
Exception
Exception
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Diagnostics/EventData.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
...
...
src/DotNetCore.CAP/Diagnostics/IErrorEventData.cs
View file @
af1b1ec6
using
System
;
// Copyright (c) .NET Core Community. All rights reserved.
using
System.Collections.Generic
;
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System.Text
;
using
System
;
namespace
DotNetCore.CAP.Diagnostics
namespace
DotNetCore.CAP.Diagnostics
{
{
...
...
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