Skip to content

Commit 09db7e4

Browse files
deniswwilkinsona
authored andcommitted
Extend documentation on Datadog metrics
- Document that an application key must be set to publish metadata for the exported metrics. - Point out that using a non-US Datadog site (e.g., EU) requires changing the `uri` property. See gh-30879
1 parent 822aad9 commit 09db7e4

File tree

2 files changed

+26
-2
lines changed
  • spring-boot-project
    • spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/datadog
    • spring-boot-docs/src/docs/asciidoc/actuator

2 files changed

+26
-2
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/datadog/DatadogProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public class DatadogProperties extends StepRegistryProperties {
5353
private String hostTag = "instance";
5454

5555
/**
56-
* URI to ship metrics to. If you need to publish metrics to an internal proxy
57-
* en-route to Datadog, you can define the location of the proxy with this.
56+
* URI to ship metrics to. Set this if you need to publish metrics to a Datadog site
57+
* other than US, or to an internal proxy en-route to Datadog.
5858
*/
5959
private String uri = "https://api.datadoghq.com";
6060

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,30 @@ To export metrics to {micrometer-registry-docs}/datadog[Datadog], your API key m
132132
api-key: "YOUR_KEY"
133133
----
134134

135+
If you additionally provide an application key (optional), then metadata such as meter descriptions, types, and base units will also be exported:
136+
137+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
138+
----
139+
management:
140+
metrics:
141+
export:
142+
datadog:
143+
api-key: "YOUR_API_KEY"
144+
application-key: "YOUR_APPLICATION_KEY"
145+
----
146+
147+
By default, metrics are sent to the Datadog US https://docs.datadoghq.com/getting_started/site[site] (`https://api.datadoghq.com`).
148+
In case your Datadog project is hosted on one of the other sites, or you need to send metrics through a proxy, change the API base URL accordingly:
149+
150+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
151+
----
152+
management:
153+
metrics:
154+
export:
155+
datadog:
156+
uri: "https://api.datadoghq.eu"
157+
----
158+
135159
You can also change the interval at which metrics are sent to Datadog:
136160

137161
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]

0 commit comments

Comments
 (0)