public sealed class DataprocMetricConfig.Types.Metric : IMessage<DataprocMetricConfig.Types.Metric>, IEquatable<DataprocMetricConfig.Types.Metric>, IDeepCloneable<DataprocMetricConfig.Types.Metric>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Dataproc v1 API class DataprocMetricConfig.Types.Metric.
public RepeatedField<string> MetricOverrides { get; }
Optional. Specify one or more Custom metrics
to collect for the metric course (for the SPARK metric source (any
Spark metric can be
specified).
Provide metrics in the following format:
<code><var>METRIC_SOURCE</var>:<var>INSTANCE</var>:<var>GROUP</var>:<var>METRIC</var></code>
Use camelcase as appropriate.
Only the specified overridden metrics are collected for the
metric source. For example, if one or more spark:executive metrics
are listed as metric overrides, other SPARK metrics are not
collected. The collection of the metrics for other enabled custom
metric sources is unaffected. For example, if both SPARK andd YARN
metric sources are enabled, and overrides are provided for Spark
metrics only, all YARN metrics are collected.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eDataprocMetricConfig.Types.Metric\u003c/code\u003e class within the Google Cloud Dataproc v1 API, detailing its properties, constructors, and inherited members.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is for version 5.17.0, and there are documented versions all the way down to 3.1.0, allowing developers to view changes and details across a range of software versions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDataprocMetricConfig.Types.Metric\u003c/code\u003e is a class that represents a Dataproc custom metric and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows for specifying \u003ccode\u003eMetricOverrides\u003c/code\u003e, which are custom metrics to collect for a given metric source, such as Spark, and also includes a \u003ccode\u003eMetricSource\u003c/code\u003e property that is required and indicates the origin of the metrics.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers two constructors: a default one \u003ccode\u003eMetric()\u003c/code\u003e and another one \u003ccode\u003eMetric(DataprocMetricConfig.Types.Metric other)\u003c/code\u003e to create a new \u003ccode\u003eMetric\u003c/code\u003e based on another one.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Dataproc v1 API - Class DataprocMetricConfig.Types.Metric (5.20.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.20.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.19.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.19.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.18.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.18.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.17.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.17.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.16.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.16.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.15.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.15.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.14.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.14.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.13.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.13.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.12.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.12.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.11.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.11.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.10.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.10.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.9.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.9.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.8.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.8.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.7.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.7.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.6.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.6.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.5.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.5.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.4.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.4.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.3.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.3.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.2.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.1.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/5.0.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/4.0.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.4.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.3.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.2.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/3.1.0/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric) \n\n public sealed class DataprocMetricConfig.Types.Metric : IMessage\u003cDataprocMetricConfig.Types.Metric\u003e, IEquatable\u003cDataprocMetricConfig.Types.Metric\u003e, IDeepCloneable\u003cDataprocMetricConfig.Types.Metric\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Dataproc v1 API class DataprocMetricConfig.Types.Metric.\n\nA Dataproc custom metric. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DataprocMetricConfig.Types.Metric \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DataprocMetricConfig](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig)[Types](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types)[Metric](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DataprocMetricConfig](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig)[Types](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types)[Metric](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DataprocMetricConfig](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig)[Types](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types)[Metric](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DataprocMetricConfig.Types.Metric), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dataproc.V1](/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Dataproc.V1.dll\n\nConstructors\n------------\n\n### Metric()\n\n public Metric()\n\n### Metric(Metric)\n\n public Metric(DataprocMetricConfig.Types.Metric other)\n\nProperties\n----------\n\n### MetricOverrides\n\n public RepeatedField\u003cstring\u003e MetricOverrides { get; }\n\nOptional. Specify one or more [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nto collect for the metric course (for the `SPARK` metric source (any\n[Spark metric](https://spark.apache.org/docs/latest/monitoring.html#metrics) can be\nspecified).\n\nProvide metrics in the following format:\n\\\u003ccode\\\u003e\\\u003cvar\\\u003eMETRIC_SOURCE\\\u003c/var\\\u003e:\\\u003cvar\\\u003eINSTANCE\\\u003c/var\\\u003e:\\\u003cvar\\\u003eGROUP\\\u003c/var\\\u003e:\\\u003cvar\\\u003eMETRIC\\\u003c/var\\\u003e\\\u003c/code\\\u003e\nUse camelcase as appropriate.\n\nExamples: \n\n yarn:ResourceManager:QueueMetrics:AppsCompleted\n spark:driver:DAGScheduler:job.allJobs\n sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed\n hiveserver2:JVM:Memory:NonHeapMemoryUsage.used\n\nNotes:\n\n- Only the specified overridden metrics are collected for the metric source. For example, if one or more `spark:executive` metrics are listed as metric overrides, other `SPARK` metrics are not collected. The collection of the metrics for other enabled custom metric sources is unaffected. For example, if both `SPARK` andd `YARN` metric sources are enabled, and overrides are provided for Spark metrics only, all YARN metrics are collected.\n\n### MetricSource\n\n public DataprocMetricConfig.Types.MetricSource MetricSource { get; set; }\n\nRequired. A standard set of metrics is collected unless `metricOverrides`\nare specified for the metric source (see [Custom metrics](https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics)\nfor more information)."]]