title: Dynamically create Prometheus gauge names
body: <p>I am using <a href="https://github.com/siimon/prom-client" rel="nofollow noreferrer">prom-client</a> in my node app to send stats to our prometheus instance. I am firing off a set of requests to determine if the app is up or not. With that, I want to dynamically set the name of the gauge depending on what app is being pinged. </p>
  
  <pre><code>apps.map(app =&gt; {
    request(app.url, (error, response, body) =&gt; {
      let name = app.name
      const gauge = new client.Gauge({
        name: `${app.name}`,
        help: `${app.name}`,
        register,
      })
      if (error) {
        console.log(`${app.name} ERROR!`, error)
        gauge.set(0)
      }
      if (response &amp;&amp; response.statusCode == 200) {
        console.log(`${app.name} is up!`, response.statusCode)
        gauge.set(0)
      }
      gateway.pushAdd({ jobName: 'app_up_down', register })
    })
  })
  </code></pre>
  
  <p>Setting the gauge name to <code>${app.name}</code> is throwing an Invalid Name error. The only way I could get it to stop throwing that error was to hardcode the name which doesn't work for me. Does anyone know if there is a way to dynamically set this, or is this an issue with the package?</p>