Skip to content

Commit

Permalink
Merge branch master into iiot
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwang0 committed Jan 4, 2021
2 parents 7454b4c + 5bbb381 commit 6977060
Show file tree
Hide file tree
Showing 48 changed files with 781 additions and 520 deletions.
40 changes: 21 additions & 19 deletions doc/BuiltInMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,27 @@ instance_number | A Guid representing the current runtime. On restart, all metri
### EdgeHub
| Name | Dimensions | Description | Type |
|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| `edgehub_gettwin_total` | `source` (Operation source)<br> `id` (Module ID) | Total number of GetTwin calls | counter |
| `edgehub_messages_received_total` | `route_output` (Output that sent the message)<br> `id` (Module ID) | Total number of messages received from clients | counter |
| `edgehub_messages_sent_total` | `from` (Message source)<br> `to` (Message destination)<br>`from_route_output` (Output that sent the message)<br> `to_route_input` (Message destination input [empty when "to" is $upstream])<br> `priority` (message priority to destination) | Total number of messages sent to clients or upstream | counter |
| `edgehub_reported_properties_total` | `target`(Update target)<br> `id` (Module ID) | Total reported property updates calls | counter |
| `edgehub_message_size_bytes` | `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 message size from clients. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_gettwin_duration_seconds` | `source` (Operation source)<br> `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken for get twin operations. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_gettwin_total` | `source` (Operation source)<br> `id` (Module ID) | Total number of GetTwin calls | counter |
| `edgehub_messages_received_total` | `route_output` (Output that sent the message)<br> `id` (Module ID) | Total number of messages received from clients | counter |
| `edgehub_messages_sent_total` | `from` (Message source)<br> `to` (Message destination)<br>`from_route_output` (Output that sent the message)<br> `to_route_input` (Message destination input [empty when "to" is $upstream])<br> `priority` (message priority to destination) | Total number of messages sent to clients or upstream | counter |
| `edgehub_reported_properties_total` | `target`(Update target)<br> `id` (Module ID) | Total reported property updates calls | counter |
| `edgehub_message_size_bytes` | `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 message size from clients. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_gettwin_duration_seconds` | `source` (Operation source)<br> `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken for get twin operations. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_message_send_duration_seconds` | `from` (Message source)<br> `to` (Message destination)<br>`from_route_output` (Output that sent the message)<br> `to_route_input` (Message destination input [empty when "to" is $upstream])<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to send a message. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_message_process_duration_seconds` | `from` (Message source)<br> `to` (Message destination)<br> `priority` (Message priority) <br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to process a message from the queue. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_reported_properties_update_duration_seconds` | `target` (Operation target)<br> `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to update reported properties. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_direct_method_duration_seconds` | `from` (Caller)<br> `to` (Reciever)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to resolve a direct message. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_direct_methods_total` | `from` (Message source)<br> `to` (Message destination) | Total number of direct messages sent | counter |
| `edgehub_queue_length` | `endpoint` (Message source)<br> `priority` (queue priority) | Current length of edgeHub's queue for a given priority | gauge |
| `edgehub_messages_dropped_total` | `reason` (no_route, ttl_expiry)<br> `from` (Message source)<br> `from_route_output` (Output that sent the message)<br> | Total number of messages removed because of reason | counter |
| `edgehub_messages_unack_total` | `reason` (storage_failure)<br> `from` (Message source)<br> `from_route_output` (Output that sent the message)<br> | Total number of messages unack because storage failure | counter |
| `edgehub_offline_count_total` | `id` (Module ID)<br> | Total number of times edgeHub went offline | counter |
| `edgehub_offline_duration_seconds` | `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time edge hub was offline. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_operation_retry_total` | `id` (Module ID)<br>`operation` (Operation name) | Total number of times edgeHub operations were retried | counter |
| `edgehub_client_connect_failed_total` | `id` (Module ID)<br> `reason` (not authenticated)<br> | Total number of times clients failed to connect to edgeHub | counter |

| `edgehub_message_process_duration_seconds` | `from` (Message source)<br> `to` (Message destination)<br> `priority` (Message priority) <br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to process a message from the queue. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_reported_properties_update_duration_seconds` | `target` (Operation target)<br> `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99] | P50, P90, P95, P99, P99.9 and P99.99 time taken to update reported properties. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_direct_method_duration_seconds` | `from` (Caller)<br> `to` (Reciever)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time taken to resolve a direct message. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_direct_methods_total` | `from` (Message source)<br> `to` (Message destination) | Total number of direct messages sent | counter |
| `edgehub_queue_length` | `endpoint` (Message source)<br> `priority` (queue priority) | Current length of edgeHub's queue for a given priority | gauge |
| `edgehub_messages_dropped_total` | `reason` (no_route, ttl_expiry)<br> `from` (Message source)<br> `from_route_output` (Output that sent the message)<br> | Total number of messages removed because of reason | counter |
| `edgehub_messages_unack_total` | `reason` (storage_failure)<br> `from` (Message source)<br> `from_route_output` (Output that sent the message)<br> | Total number of messages unack because storage failure | counter |
| `edgehub_offline_count_total` | `id` (Module ID)<br> | Total number of times edgeHub went offline | counter |
| `edgehub_offline_duration_seconds` | `id` (Module ID)<br> `quantile`(Percentile [50, 90, 95, 99, 99.9, 99.99]) | P50, P90, P95, P99, P99.9 and P99.99 time edge hub was offline. Values may be reported as `NaN` if no new measurements are reported for a certain period of time (currently 10 minutes). As this is `summary` type, corresponding `_count` and `_sum` counters will be emitted. | summary |
| `edgehub_operation_retry_total` | `id` (Module ID)<br>`operation` (Operation name) | Total number of times edgeHub operations were retried | counter |
| `edgehub_client_connect_failed_total` | `id` (Device/Module ID)<br> `reason` (not authenticated)<br> | Total number of times each client failed to connect to edgeHub | counter |
| `edgehub_connected_clients` | | Current number of clients connected to edgeHub | gauge |
| `edgehub_client_connect_success_total` | `id` (Device/Module ID)<br> | Total number of times each client successfully connected to edgeHub | counter |
| `edgehub_client_disconnect_total` | `id` (Device/Module ID)<br> | Total number of times each client disconnected from edgeHub | counter |


### EdgeAgent
Expand Down Expand Up @@ -84,4 +86,4 @@ For mapping to host, the port will need to be exposed from Edge Hub's `createOpt
}
<Other options, if any>
}
```
```
2 changes: 1 addition & 1 deletion doc/[Old]Metrics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# **!!! IMPORTANT NOTE !!! The metrics described here are deprecated and will be removed in subsequent releases. They are superseded by [edge metrics V2](BuiltInMetrics.md).**
# **!!! IMPORTANT NOTE !!! The metrics described here were removed in release 1.1.0. They are superseded by [edge metrics V2](BuiltInMetrics.md).**

## Metrics in EdgeHub

Expand Down
3 changes: 0 additions & 3 deletions e2e_deployment_files/connectivity_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
"createOptions": "{\"ExposedPorts\": {\"9600/tcp\": {}}, \"HostConfig\": {\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}],\"9600/tcp\": [{\"HostPort\": \"9601\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"experimentalfeatures__enabled": {
"value": "true"
},
Expand Down
3 changes: 0 additions & 3 deletions e2e_deployment_files/edgehub_restart_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
"createOptions": "{\"ExposedPorts\": {\"9600/tcp\": {}}, \"HostConfig\": {\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}],\"9600/tcp\": [{\"HostPort\": \"9601\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"experimentalfeatures__enabled": {
"value": "true"
},
Expand Down
3 changes: 0 additions & 3 deletions e2e_deployment_files/long_haul_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
"createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"615m\",\"max-file\":\"2\"}},\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"NestedEdgeEnabled": {
"value": "false"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
"createOptions": "{\"ExposedPorts\": {\"9600/tcp\": {}}, \"HostConfig\": {\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}],\"9600/tcp\": [{\"HostPort\": \"9601\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"experimentalfeatures__enabled": {
"value": "true"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
"createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"615m\",\"max-file\":\"2\"}},\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"NestedEdgeEnabled": {
"value": "true"
},
Expand Down
3 changes: 0 additions & 3 deletions e2e_deployment_files/stress_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
"createOptions": "{\"HostConfig\": {\"PortBindings\": {\"8883/tcp\": [{\"HostPort\": \"8883\"}],\"5671/tcp\": [{\"HostPort\": \"5671\"}]}}}"
},
"env": {
"CollectMetrics": {
"value": "true"
},
"amqpSettings__enabled": {
"value": "<amqpSettings__enabled>"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models
{
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

public class DeviceMapping
{
[JsonProperty("PathOnHost", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string PathOnHost { get; set; }

[JsonProperty("PathInContainer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string PathInContainer { get; set; }

[JsonProperty("CgroupPermissions", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string CgroupPermissions { get; set; }

[JsonExtensionData]
public IDictionary<string, JToken> OtherProperties { get; set; }
}
}
Loading

0 comments on commit 6977060

Please sign in to comment.