Skip to content

Commit 655ceef

Browse files
committed
Merge branch '2.5.x' into 2.6.x
Closes gh-30996
2 parents 9f46cf8 + 2173350 commit 655ceef

File tree

2 files changed

+27
-3
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

+27
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -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

+24
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,30 @@ To export metrics to {micrometer-registry-docs}/datadog[Datadog], you must provi
133133
api-key: "YOUR_KEY"
134134
----
135135

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

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

0 commit comments

Comments
 (0)