Exemplo n.º 1
0
 public Metric10DWrapper(
     string mdmAccountName,
     string mdmNamespace,
     string metricName,
     string dimension1Name,
     string dimension2Name,
     string dimension3Name,
     string dimension4Name,
     string dimension5Name,
     string dimension6Name,
     string dimension7Name,
     string dimension8Name,
     string dimension9Name,
     string dimension10Name)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         this.metric = MeasureMetric10D.Create(
             mdmAccountName,
             mdmNamespace,
             metricName,
             dimension1Name,
             dimension2Name,
             dimension3Name,
             dimension4Name,
             dimension5Name,
             dimension6Name,
             dimension7Name,
             dimension8Name,
             dimension9Name,
             dimension10Name,
             addDefaultDimension: true);
     }
 }
Exemplo n.º 2
0
        private MeasureMetric10D CreateMetric(IAdxMetric metric)
        {
            ErrorContext     errorContext = new ErrorContext();
            MeasureMetric10D instance     = MeasureMetric10D.Create(
                this._mdmAccountName,
                this._mdmNamespace,
                metric.MetricName,
                MdmDimensionNames.Geo,
                MdmDimensionNames.Tenant,
                MdmDimensionNames.Role,
                MdmDimensionNames.RoleInstance,
                MdmDimensionNames.Org,
                MdmDimensionNames.PortalType,
                MdmDimensionNames.PortalId,
                MdmDimensionNames.PortalApp,
                MdmDimensionNames.PortalUrl,
                MdmDimensionNames.PortalVersion,
                ref errorContext);

            if (errorContext.ErrorCode != 0)
            {
                MetricsReportingEvents.Instance.MetricReportingFailed(metric.MetricName, "CreateMetric failed: " + errorContext.ErrorMessage);
            }

            return(instance);
        }