Skip to content

Commit

Permalink
Merge branch '2.6.x' into 2.7.x
Browse files Browse the repository at this point in the history
Closes gh-30997
  • Loading branch information
wilkinsona committed May 12, 2022
2 parents 09b9a1f + 655ceef commit 2669f8c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,8 +53,8 @@ public class DatadogProperties extends StepRegistryProperties {
private String hostTag = "instance";

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

Expand Down
Expand Up @@ -127,6 +127,30 @@ To export metrics to {micrometer-registry-docs}/datadog[Datadog], you must provi
api-key: "YOUR_KEY"
----

If you additionally provide an application key (optional), then metadata such as meter descriptions, types, and base units will also be exported:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
management:
metrics:
export:
datadog:
api-key: "YOUR_API_KEY"
application-key: "YOUR_APPLICATION_KEY"
----

By default, metrics are sent to the Datadog US https://docs.datadoghq.com/getting_started/site[site] (`https://api.datadoghq.com`).
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:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
management:
metrics:
export:
datadog:
uri: "https://api.datadoghq.eu"
----

You can also change the interval at which metrics are sent to Datadog:

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

0 comments on commit 2669f8c

Please sign in to comment.