-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add new Metrics types * Cleanup * remove current metrics * Fix usings * Fix build * Cleanup * Add Metrics * Fix bugs * Cleanup * Cleanup * Cleanup fxcop * Update edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.CloudProxy/CloudProxy.cs Co-Authored-By: Mike Yagley <myagley@gmail.com> * Update edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs Co-Authored-By: Mike Yagley <myagley@gmail.com> * Update edge-util/src/Microsoft.Azure.Devices.Edge.Util/metrics/IEdgeMetrics.cs Co-Authored-By: Mike Yagley <myagley@gmail.com> * Update edge-util/src/Microsoft.Azure.Devices.Edge.Util/metrics/MetricsConstants.cs Co-Authored-By: Mike Yagley <myagley@gmail.com> * Convert metrics duration to seconds
- Loading branch information
1 parent
3adf3f5
commit f93c6f3
Showing
56 changed files
with
1,266 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/MessageHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Hub.Core | ||
{ | ||
public static class MessageHelper | ||
{ | ||
public static string GetSenderId(this IMessage message) | ||
{ | ||
if (message.SystemProperties.TryGetValue(SystemProperties.ConnectionDeviceId, out string deviceId)) | ||
{ | ||
return message.SystemProperties.TryGetValue(SystemProperties.ConnectionModuleId, out string moduleId) | ||
? $"{deviceId}/{moduleId}" | ||
: deviceId; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
} | ||
} |
Oops, something went wrong.