Package codes.grow.packages.datadoglogs
Class DatadogSites
java.lang.Object
codes.grow.packages.datadoglogs.DatadogSites
Datadog sites and the host resolver (API.md section 1).
Every site has two hosts: the logs intake https://http-intake.logs.<site> and the API
https://api.<site>. The site is the API site, never the UI host (
app.datadoghq.com).
DatadogSites.resolve("datadoghq.eu").intakeUrl(); // "https://http-intake.logs.datadoghq.eu"
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe two base URLs of a Datadog site. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault Datadog site (US1).Every site accepted bysite/DD_SITE(the official OpenAPI servers enum). -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns whether the site (afternormalize(java.lang.String)) is a known Datadog site.static StringLower-cases and trims a site name;nullor blank givesDEFAULT_SITE.static DatadogSites.SiteUrlsResolves a site to its intake and API base URLs.
-
Field Details
-
DEFAULT_SITE
Default Datadog site (US1).- See Also:
-
SITES
Every site accepted bysite/DD_SITE(the official OpenAPI servers enum).
-
-
Method Details
-
normalize
Lower-cases and trims a site name;nullor blank givesDEFAULT_SITE.- Parameters:
site- site name, may be null- Returns:
- the normalized name
-
isKnown
Returns whether the site (afternormalize(java.lang.String)) is a known Datadog site.- Parameters:
site- site name- Returns:
- true for a site in
SITES
-
resolve
Resolves a site to its intake and API base URLs.- Parameters:
site- site name such asdatadoghq.eu; null or blank meansDEFAULT_SITE- Returns:
- the base URLs
- Throws:
ConfigException- for an unknown site
-