Zero or more labeled fields which identify the part of the job this metric is associated with, such as the name of a step or collection. For example, built-in counters associated with steps will have context['step'] =
getOrigin
Origin (namespace) of metric name. May be blank for user-define metrics;
will be "dataflow" for metrics defined by the Dataflow service or SDK.
Returns
Type
Description
string
setOrigin
Origin (namespace) of metric name. May be blank for user-define metrics;
will be "dataflow" for metrics defined by the Dataflow service or SDK.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getName
Worker-defined metric name.
Returns
Type
Description
string
setName
Worker-defined metric name.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getContext
Zero or more labeled fields which identify the part of the job this
metric is associated with, such as the name of a step or collection.
For example, built-in counters associated with steps will have
context['step'] =
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud Dataflow V1beta3 Client - Class MetricStructuredName (0.8.2)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.2 (latest)](/php/docs/reference/cloud-dataflow/latest/V1beta3.MetricStructuredName)\n- [0.8.1](/php/docs/reference/cloud-dataflow/0.8.1/V1beta3.MetricStructuredName)\n- [0.7.1](/php/docs/reference/cloud-dataflow/0.7.1/V1beta3.MetricStructuredName)\n- [0.6.6](/php/docs/reference/cloud-dataflow/0.6.6/V1beta3.MetricStructuredName)\n- [0.5.1](/php/docs/reference/cloud-dataflow/0.5.1/V1beta3.MetricStructuredName)\n- [0.4.1](/php/docs/reference/cloud-dataflow/0.4.1/V1beta3.MetricStructuredName)\n- [0.3.10](/php/docs/reference/cloud-dataflow/0.3.10/V1beta3.MetricStructuredName) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud Dataflow V1beta3 Client class MetricStructuredName.\n\nIdentifies a metric, by describing the source which generated the\nmetric.\n\nGenerated from protobuf message `google.dataflow.v1beta3.MetricStructuredName`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dataflow \\\\ V1beta3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getOrigin\n\nOrigin (namespace) of metric name. May be blank for user-define metrics;\nwill be \"dataflow\" for metrics defined by the Dataflow service or SDK.\n\n### setOrigin\n\nOrigin (namespace) of metric name. May be blank for user-define metrics;\nwill be \"dataflow\" for metrics defined by the Dataflow service or SDK.\n\n### getName\n\nWorker-defined metric name.\n\n### setName\n\nWorker-defined metric name.\n\n### getContext\n\nZero or more labeled fields which identify the part of the job this\nmetric is associated with, such as the name of a step or collection.\n\nFor example, built-in counters associated with steps will have\ncontext\\['step'\\] =\n\n\n### setContext\n\nZero or more labeled fields which identify the part of the job this\nmetric is associated with, such as the name of a step or collection.\n\nFor example, built-in counters associated with steps will have\ncontext\\['step'\\] ="]]