> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Metrics to a Surface

> Learn how to add metrics to a surface to make them easier to find or enforce them as required.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Add Metrics to a Surface"
  description="Learn how to add metrics to a surface to make them easier to find or enforce them as required."
  steps={[
{
  name: "Go to Surfaces",
  text: "Go to Confidence and select Surfaces on the left sidebar.",
},
{
  name: "Select a surface",
  text: "Click on a surface to open its detail page.",
},
{
  name: "Open Settings",
  text: "Click Settings to open the surface settings page.",
},
{
  name: "Add metric",
  text: "In the Metrics section, click Add metric and select the metrics to add.",
},
{
  name: "Mark required metrics",
  text: "After selecting metrics, choose which ones should be required for experiments on this surface. Required metrics are checked for regressions in all experiments.",
},
]}
/>

Add [metrics to a surface](../surfaces/surface-settings#metrics) to make them easier to find for experimenters experimenting on this surface, or enforce that all experiments on the surface check this metric for regressions by making it `required`.

## Add a Metric to a Surface

<Steps>
  <Step title="Go to Surfaces">
    Go to Confidence and select **Surfaces** on the left sidebar.
  </Step>

  <Step title="Select a surface">
    Click on a surface to open its detail page.
  </Step>

  <Step title="Open Settings">
    Click **Settings** to open the surface settings page.
  </Step>

  <Step title="Add metric">
    In the **Metrics** section, click **Add metric** and select the metrics to add.
  </Step>

  <Step title="Mark required metrics">
    After selecting metrics, choose which ones should be required for experiments on this surface. Required metrics are checked for regressions in all experiments.
  </Step>
</Steps>

## Related Resources

<CardGroup cols={2}>
  <Card title="Surface Settings Reference" href="/docs/surfaces/surface-settings">
    Deep dive into surface configuration
  </Card>

  <Card title="Create Metrics" href="/docs/how-to-guides/create-metric">
    Set up metrics for your surfaces
  </Card>

  <Card title="Create a Surface" href="/docs/how-to-guides/create-surface">
    Set up a new surface
  </Card>

  <Card title="Add Metrics to Surface API" href="/docs/api/how-to-guides/surfaces/add-metrics-to-surface">
    API reference for adding metrics
  </Card>
</CardGroup>
