Class MetricServiceV3
Simple client for the Metric Service V3.
Implements
Inherited Members
Namespace: Mangrove.Coordinator
Assembly: Mangrove.Coordinator.dll
Syntax
public sealed class MetricServiceV3 : MetricsPlanResolverBase, IMetricsPlanResolver
Remarks
For reference, see the code here in the repo: https://dev.azure.com/experimentation/Analysis%20and%20Experimentation/_git/AnE.Exp.Mdl .
- Controller code: private/MetricSetVersionService/Microsoft.MDL.MetricSetVersionService/VersionApi/Controllers/MainController.cs
- Client code: private/ReleaseManager/Deployment.v2/MetricSetDeployment/Util/MetricServiceClientV3.cs
Note: this class should not stay in the production Mangrove codebase long-term. It is here as a temporary hack, getting around the fact that Scorecard Pipeline deployments are manual and slow, while Blitz deployments are fast and fully automated. Once Blitz is creating valid Scope scripts and metric set Java code, this should be migrated to the Scorecard Pipeline repository (and, perhaps, as a dependency for integration testing in the closed source part of this repository) and Blitz should expect a local MetricsPlan artifact.
Constructors
View SourceMetricServiceV3(String, Func<ILogger, Task<String>>)
Declaration
public MetricServiceV3(string endpoint, Func<ILogger, Task<string>> tokenResolver)
Parameters
Type | Name | Description |
---|---|---|
String | endpoint | |
Func<ILogger, Task<String>> | tokenResolver |
MetricServiceV3(String, String, Task<String>, String, String, String, Boolean)
Declaration
public MetricServiceV3(string authority, string clientId, Task<string> clientSecret, string token, string resource, string serviceEndpoint, bool msalLogging = false)
Parameters
Type | Name | Description |
---|---|---|
String | authority | |
String | clientId | |
Task<String> | clientSecret | |
String | token | |
String | resource | |
String | serviceEndpoint | |
Boolean | msalLogging |
Methods
View SourceLatestVersion(String, String, ILogger)
Declaration
protected override Task<string> LatestVersion(string metricSetName, string workspaceId, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
String | metricSetName | |
String | workspaceId | |
ILogger | logger |
Returns
Type | Description |
---|---|
Task<String> |
Overrides
View SourceResolveWithMaterializedVersion(String, String, String, ILogger)
Declaration
protected override Task<MetricsPlan> ResolveWithMaterializedVersion(string metricSetName, string version, string workspaceId, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
String | metricSetName | |
String | version | |
String | workspaceId | |
ILogger | logger |
Returns
Type | Description |
---|---|
Task<MetricsPlan> |