title: Configuring New relic in Spring boot with insight key
body: <p>In my springboot application, I have put following in my application.properties:</p>
  <blockquote>
  <p>management.metrics.export.newrelic.api-key=MY_INSIGHT_KEY</p>
  <p>management.metrics.export.newrelic.account-id=MY_NEWRELIC_ACCOUNT_ID</p>
  </blockquote>
  <p>And in pom file, I have inserted micrometer-newrelic dependency as:</p>
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;io.micrometer&lt;/groupId&gt;
          &lt;artifactId&gt;micrometer-registry-new-relic&lt;/artifactId&gt;
          &lt;version&gt;${micrometer.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>But I don't see any metrics at insight <a href="https://insights.newrelic.com" rel="nofollow noreferrer">site</a>.</p>
  <p>What am I missing in configuration?</p>
  <p>Edit:</p>
  <p><a href="https://micrometer.io/docs/registry/new-relic" rel="nofollow noreferrer">This link</a> documents configuring micrometer for new relic in spring boot 2.</p>
  <p>It asks to implement NewRelicConfig interface and create NewRelicMeterRegistry with it.</p>
  <p>But where do I need to place this code in springboot 2 application.</p>