def get(<EOL>self, app_id, metric_id, timespan=None, interval=None, aggregation=None, segment=None, top=None, orderby=None, filter=None, custom_headers=None, raw=False, **operation_config):
<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", app_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", metric_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if timespan is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timespan, '<STR_LIT:str>')<EOL><DEDENT>if interval is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", interval, '<STR_LIT>')<EOL><DEDENT>if aggregation is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", aggregation, '<STR_LIT>', div='<STR_LIT:U+002C>', min_items=<NUM_LIT:1>)<EOL><DEDENT>if segment is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", segment, '<STR_LIT>', div='<STR_LIT:U+002C>', min_items=<NUM_LIT:1>)<EOL><DEDENT>if top is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", top, '<STR_LIT:int>')<EOL><DEDENT>if orderby is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", orderby, '<STR_LIT:str>')<EOL><DEDENT>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>
Retrieve metric data.

        Gets metric values for a single metric.

        :param app_id: ID of the application. This is Application ID from the
         API Access settings blade in the Azure portal.
        :type app_id: str
        :param metric_id: ID of the metric. This is either a standard AI
         metric, or an application-specific custom metric. Possible values
         include: 'requests/count', 'requests/duration', 'requests/failed',
         'users/count', 'users/authenticated', 'pageViews/count',
         'pageViews/duration', 'client/processingDuration',
         'client/receiveDuration', 'client/networkDuration',
         'client/sendDuration', 'client/totalDuration', 'dependencies/count',
         'dependencies/failed', 'dependencies/duration', 'exceptions/count',
         'exceptions/browser', 'exceptions/server', 'sessions/count',
         'performanceCounters/requestExecutionTime',
         'performanceCounters/requestsPerSecond',
         'performanceCounters/requestsInQueue',
         'performanceCounters/memoryAvailableBytes',
         'performanceCounters/exceptionsPerSecond',
         'performanceCounters/processCpuPercentage',
         'performanceCounters/processIOBytesPerSecond',
         'performanceCounters/processPrivateBytes',
         'performanceCounters/processorCpuPercentage',
         'availabilityResults/availabilityPercentage',
         'availabilityResults/duration', 'billing/telemetryCount',
         'customEvents/count'
        :type metric_id: str or ~azure.applicationinsights.models.MetricId
        :param timespan: The timespan over which to retrieve metric values.
         This is an ISO8601 time period value. If timespan is omitted, a
         default time range of `PT12H` ("last 12 hours") is used. The actual
         timespan that is queried may be adjusted by the server based. In all
         cases, the actual time span used for the query is included in the
         response.
        :type timespan: str
        :param interval: The time interval to use when retrieving metric
         values. This is an ISO8601 duration. If interval is omitted, the
         metric value is aggregated across the entire timespan. If interval is
         supplied, the server may adjust the interval to a more appropriate
         size based on the timespan used for the query. In all cases, the
         actual interval used for the query is included in the response.
        :type interval: timedelta
        :param aggregation: The aggregation to use when computing the metric
         values. To retrieve more than one aggregation at a time, separate them
         with a comma. If no aggregation is specified, then the default
         aggregation for the metric is used.
        :type aggregation: list[str or
         ~azure.applicationinsights.models.MetricsAggregation]
        :param segment: The name of the dimension to segment the metric values
         by. This dimension must be applicable to the metric you are
         retrieving. To segment by more than one dimension at a time, separate
         them with a comma (,). In this case, the metric data will be segmented
         in the order the dimensions are listed in the parameter.
        :type segment: list[str or
         ~azure.applicationinsights.models.MetricsSegment]
        :param top: The number of segments to return.  This value is only
         valid when segment is specified.
        :type top: int
        :param orderby: The aggregation function and direction to sort the
         segments by.  This value is only valid when segment is specified.
        :type orderby: str
        :param filter: An expression used to filter the results.  This value
         should be a valid OData filter expression where the keys of each
         clause should be applicable dimensions for the metric you are
         retrieving.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: MetricsResult or ClientRawResponse if raw=true
        :rtype: ~azure.applicationinsights.models.MetricsResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<azure.applicationinsights.models.ErrorResponseException>`