Skip to content

load system metrics - DOCSENG-123 #31205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.4

require (
github.com/DataDog/websites-modules v1.4.253 // indirect
github.com/DataDog/websites-sources v0.0.0-20250725130558-4b13439577aa // indirect
github.com/DataDog/websites-sources v0.0.0-20250821174838-1950c6e17096 // indirect
)

// replace github.com/DataDog/websites-modules => /Users/lisiane.turlure/guac/websites-modules
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/DataDog/websites-modules v1.4.253 h1:Sd+5ILFUVOyagh3oUMyc0onM7bykJy0asO9ObLgx4ms=
github.com/DataDog/websites-modules v1.4.253/go.mod h1:CcQxAmCXoiFr3hNw6Q+1si65C3uOP1gB+7aX4S3h+CQ=
github.com/DataDog/websites-sources v0.0.0-20250725130558-4b13439577aa h1:XWN3hFITXoC1B4pW5pwKYqlfuVCcyhZDAVAMs+1L7wo=
github.com/DataDog/websites-sources v0.0.0-20250725130558-4b13439577aa/go.mod h1:DlDYkYoR/nhKYRur0+2jmGGc7ydk8Q0ybWkS6oaLVuo=
github.com/DataDog/websites-sources v0.0.0-20250821174838-1950c6e17096 h1:2hC1uZObqOzw6N3kflWxYvysBov71qGB4bj4IhFkDBM=
github.com/DataDog/websites-sources v0.0.0-20250821174838-1950c6e17096/go.mod h1:DlDYkYoR/nhKYRur0+2jmGGc7ydk8Q0ybWkS6oaLVuo=
5 changes: 3 additions & 2 deletions layouts/shortcodes/get-metrics-from-git.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if $int_name -}}
<!-- Some edge cases the metadata is from a non-integration source, we get the JSON from websites-sources -->
<!-- The datafile in sources needs to follow the convention to match: appid_metadata.json -->
{{- $exceptions := slice "synthetics" "cloud-foundry" -}}
{{- $exceptions := slice "synthetics" "cloud-foundry" "system" -}}
{{- if in $exceptions $int_name -}}
{{- $data := index .Site.Data (print $int_name "_metadata") -}}
{{- if $data -}}
Expand Down Expand Up @@ -38,7 +38,7 @@
{{- end -}}
{{- else -}}

<!-- For integrations we get the metrics from the integration page -->
<!-- For Integrations -->
<!-- if the page is a draft we can skip -->
{{- if not .Page.Draft -}}
<!-- if non english page load from english integration -->
Expand All @@ -51,6 +51,7 @@
{{- if not $page -}}
{{ warnf "Integration page for '%s' not found in get-metrics-from-git shortcode." $int_name }}
{{- else -}}
<!-- We find and use the metrics from the integration page markdown -->
{{- $pattern := `(?s)### Metrics\n(.*?)(#{2,3}\s)` -}}
{{- $matches := findRE $pattern $page.RawContent 1 -}}
{{- if not $matches -}}
Expand Down
Loading