Site variable not accepted
nitrag opened this issue · 2 comments
Environment variable:
DD_SITE=datadoghq.com
Produces error:
The variable site in the server URL has invalid value datadoghq.com.
Version: com.datadoghq:datadog-api-client:1.0.0
Java/Spring Application
Per the documentation: https://docs.datadoghq.com/api/latest/metrics/
Not specifying the site, and I assume leaving the library to default, results in:
com.datadog.api.v1.client.ApiException: {"status":"error","code":403,"errors":["Forbidden"],"statuspage":"http://status.datadoghq.com","twitter":"http://twitter.com/datadogops","email":"support@datadoghq.com"}
Hi,
If you use the US site you don't need to specify the site, though it should work. Can you try with quotes DD_SITE="datadoghq.com"
? You do need to specify an API key to be able to use the API too.
Oh bummer, this is some kind of quirk with environment files and Spring/gradle. It imports with the quotes included and the 403's were because the API Key had quotes. If the response was a proper 401 Unauthorized I would have looked there. Thanks.