Microsoft Azure Service Profiler

Frequently Asked Questions


Q: How to trigger profiling when the machine is under certain situations, e.g. "High CPU"?

Currently, we support defining some conditions using PerfCounter (except Azure Web App) for triggering detail trace collection. When the condition meets, a detail trace profiling will be started when the agent is entering the next profiling time cycle (every 2 minutes). The following is an example Settings file which will trigger profiling when the machine is under high CPU load:

        {
          "DataCubeName": "<Your data cube name>",
          "General": {
            "ProvideUsageTelemetryData": true
          },
          "DetailedMonitoring": {
            "MonitorSamplingRate": 0.05
          },
          "ActivityMonitoring": {
            "EtwMetrics": [
              {
                /* AspNet RequestStart/Stop duration is the default metric. */
                "Provider": {
                  "ProviderName": "Microsoft-Windows-ASPNET",
                  "ProviderKeywords": 72057594037927935, // 0x00FFFFFFFFFFFFFF
                  "ProviderLevel": "Informational"
                },
                "Metrics": [
                  {
                    "Event": "Request/Start",
                    "EventStop": "Request/Stop",
                    "Name": "FullUrl"
                  }
                ]
              }
            ],
            "PerfTags": {
              "SampleIntervalInSeconds": 5,
              "SamplesToConsider": 6,
              "Triggers": [
                {
                  "Name": "High CPU",
                  "Description": "High CPU",
                  "PerfCounter": "Processor Information\\% Processor Time\\_Total",
                  "Operator": ">",
                  "Metric": 60,
                  "ShouldTriggerProfiling": true
                }
              ]
            }
          }
        }

The following part in the previous settings defines the 'PerfCounter' which will be monitored for triggering profiling (Note that "ShouldTriggerProfiling" is set to true. You can set it 'false' if you just want it to add tags to collected samples.):

            "PerfTags": {
              "SampleIntervalInSeconds": 5,
              "SamplesToConsider": 6,
              "Triggers": [
                {
                  "Name": "High CPU",
                  "Description": "High CPU",
                  "PerfCounter": "Processor Information\\% Processor Time\\_Total",
                  "Operator": ">",
                  "Metric": 60,
                  "ShouldTriggerProfiling": true
                }
              ]
            }

Some other example triggers:

Give feedback