-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding host information to messages #196
Conversation
Added new message to send when endpoint starts with Host information
… the startup message to RegisterEndpointStartup
the plugin is installed
@johnsimons what do U think so far? |
What's left to do here @johnsimons ? |
No idea, haven't reviewed it yet. On Wednesday, 19 February 2014, Andreas Öhlund notifications@github.com
|
@johnsimons lets get this one going, lets pair up tomorrow night? |
{ | ||
public void MutateIncoming(TransportMessage transportMessage) | ||
{ | ||
if (transportMessage.Headers.ContainsKey(Headers.HostId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Headers.HostId
doesn't exist in pre v4.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll fix it
On Tue, Feb 25, 2014 at 7:47 AM, John Simons notifications@git.luolix.topwrote:
In
src/ServiceControl.Plugin.Heartbeat/EnrichPreV44MessagesWithHostDetailsMutator.cs:@@ -0,0 +1,46 @@
+namespace ServiceControl.Plugin.Heartbeat
+{
- using EndpointPlugin.Operations.ServiceControlBackend;
- using NServiceBus;
- using NServiceBus.MessageMutator;
- class EnrichPreV44MessagesWithHostDetailsMutator:IMutateIncomingTransportMessages,INeedInitialization
- {
public void MutateIncoming(TransportMessage transportMessage)
{
if (transportMessage.Headers.ContainsKey(Headers.HostId))
Headers.HostId doesn't exist in pre v4.4
Reply to this email directly or view it on GitHubhttps://github.com//pull/196/files#r10025960
.
Description(m => string.Format("Endpoint '{0}' started at: {1} Host: {2}", m.Endpoint, m.StartedAt,m.HostDisplayName)); | ||
|
||
RelatesToEndpoint(m => m.Endpoint); | ||
RelatesToHost(m => m.HostId.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be the hostdisplayname?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we need both, since the plan is to later link to a "hostdetails"
using that id as key. Since we have the HostDisplayName in the description
I think we're good?
On Wed, Feb 26, 2014 at 11:03 AM, John Simons notifications@git.luolix.topwrote:
In src/ServiceControl/EventLog/Definitions/EndpointStartedDefinition.cs:
@@ -0,0 +1,17 @@
+namespace ServiceControl.EventLog.Definitions
+{
- using Contracts.HeartbeatMonitoring;
- public class EndpointStartedDefinition : EventLogMappingDefinition
- {
public EndpointStartedDefinition()
{
Description(m => string.Format("Endpoint '{0}' started at: {1} Host: {2}", m.Endpoint, m.StartedAt,m.HostDisplayName));
RelatesToEndpoint(m => m.Endpoint);
RelatesToHost(m => m.HostId.ToString());
Should this be the hostdisplayname?
Reply to this email directly or view it on GitHubhttps://github.com//pull/196/files#r10073849
.
Adding host information to messages
Adding host information to messages
HostInformation
sent from Heartbeat pluginHostInformation
message....