Q: What are the specific goals of developer relations?
There's no simple answer here, but I like to think of developer advocacy/evangelism/relations/etc as an extension of one (or more) of your company's core functions: product, sales, marketing and support. When I was a developer evangelist at Twilio, my team supported the Marketing org, so the team goals aligned with Marketing goals (driving signups).
Often you'll encounter a team of "Developer Advocates". The Google Chrome org has a team of Developer Advocates for example. These folks tend to align more with the Product organization, and their goals/metrics likewise align with the broader goals/metrics of the Product org.
Q: How do you measure it?
You can use the baseline metrics associated with your functional groups (i.e. top of funnel signups for Marketing) and then layer on metrics that capture the impact that the team is having in isolation from the overall organization. Example: developers who signed-up for your product because an evangelist