Added key-based authentication for posting to metrics