From 3446c7ce49a17975b012c302bdd1c89d4902267c Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 13 Jun 2024 08:00:51 -0400 Subject: [PATCH] [infra] Create & use a single signal-status shortcode (#4674) --- content/en/docs/concepts/signals/logs.md | 2 +- content/en/docs/concepts/signals/metrics.md | 2 +- layouts/shortcodes/logs-support-table.md | 15 --------------- layouts/shortcodes/metrics-support-table.md | 15 --------------- layouts/shortcodes/signal-support-table.md | 16 ++++++++++++++++ 5 files changed, 18 insertions(+), 32 deletions(-) delete mode 100644 layouts/shortcodes/logs-support-table.md delete mode 100644 layouts/shortcodes/metrics-support-table.md create mode 100644 layouts/shortcodes/signal-support-table.md diff --git a/content/en/docs/concepts/signals/logs.md b/content/en/docs/concepts/signals/logs.md index c044175aa33d..e186218d0c62 100644 --- a/content/en/docs/concepts/signals/logs.md +++ b/content/en/docs/concepts/signals/logs.md @@ -95,7 +95,7 @@ Logs are a [stable](/docs/specs/otel/versioning-and-stability/#stable) signal in the OpenTelemetry specification. For the individual language specific implementations of the Logs API & SDK, the status is as follows: -{{% logs-support-table %}} +{{% signal-support-table "logs" %}} ## Specification diff --git a/content/en/docs/concepts/signals/metrics.md b/content/en/docs/concepts/signals/metrics.md index 4dc888a0f497..8e64ae9d86a7 100644 --- a/content/en/docs/concepts/signals/metrics.md +++ b/content/en/docs/concepts/signals/metrics.md @@ -114,7 +114,7 @@ Metrics are a [stable](/docs/specs/otel/versioning-and-stability/#stable) signal in the OpenTelemetry specification. For the individual language specific implementations of the Metrics API & SDK, the status is as follows: -{{% metrics-support-table " " %}} +{{% signal-support-table "metrics" %}} ## Specification diff --git a/layouts/shortcodes/logs-support-table.md b/layouts/shortcodes/logs-support-table.md deleted file mode 100644 index c8233ec74f82..000000000000 --- a/layouts/shortcodes/logs-support-table.md +++ /dev/null @@ -1,15 +0,0 @@ -{{ $data := $.Site.Data.instrumentation }} - -Language | Logs | -| --- | --- | -| [C++](/docs/languages/cpp/) | {{ $data.cpp.status.logs | humanize }} | -| [C#/.NET](/docs/languages/net/) | {{ $data.dotnet.status.logs | humanize }} | -| [Erlang/Elixir](/docs/languages/erlang/) | {{ $data.erlang.status.logs | humanize }} | -| [Go](/docs/languages/go/) | {{ $data.go.status.logs | humanize }} | -| [Java](/docs/languages/java/) | {{ $data.java.status.logs | humanize }} | -| [JavaScript](/docs/languages/js/) | {{ $data.js.status.logs | humanize }} | -| [PHP](/docs/languages/php/) | {{ $data.php.status.logs | humanize }} | -| [Python](/docs/languages/python/) | {{$data.python.status.logs | humanize }} | -| [Ruby](/docs/languages/ruby/) | {{ $data.ruby.status.logs | humanize }} | -| [Rust](/docs/languages/rust/) | {{ $data.rust.status.logs | humanize }} | -| [Swift](/docs/languages/swift/) | {{ $data.swift.status.logs | humanize }} | diff --git a/layouts/shortcodes/metrics-support-table.md b/layouts/shortcodes/metrics-support-table.md deleted file mode 100644 index a02f8acce7d2..000000000000 --- a/layouts/shortcodes/metrics-support-table.md +++ /dev/null @@ -1,15 +0,0 @@ -{{ $data := $.Site.Data.instrumentation }} - -Language | Metrics | -| --- | --- | -| [C++](/docs/languages/cpp/) | {{ $data.cpp.status.metrics | humanize }} | -| [C#/.NET](/docs/languages/net/) | {{ $data.dotnet.status.metrics | humanize }} | -| [Erlang/Elixir](/docs/languages/erlang/) | {{ $data.erlang.status.metrics | humanize }} | -| [Go](/docs/languages/go/) | {{ $data.go.status.metrics | humanize }} | -| [Java](/docs/languages/java/) | {{ $data.java.status.metrics | humanize }} | -| [JavaScript](/docs/languages/js/) | {{ $data.js.status.metrics | humanize }} | -| [PHP](/docs/languages/php/) | {{ $data.php.status.metrics | humanize }} | -| [Python](/docs/languages/python/) | {{$data.python.status.metrics | humanize }} | -| [Ruby](/docs/languages/ruby/) | {{ $data.ruby.status.metrics | humanize }} | -| [Rust](/docs/languages/rust/) | {{ $data.rust.status.metrics | humanize }} | -| [Swift](/docs/languages/swift/) | {{ $data.swift.status.metrics | humanize }} | diff --git a/layouts/shortcodes/signal-support-table.md b/layouts/shortcodes/signal-support-table.md new file mode 100644 index 000000000000..3e86d69f75e7 --- /dev/null +++ b/layouts/shortcodes/signal-support-table.md @@ -0,0 +1,16 @@ +{{ $data := $.Site.Data.instrumentation }} +{{ $signal := .Get 0 -}} + +Language | {{ humanize $signal }} | +| --- | --- | +| [C++](/docs/languages/cpp/) | {{ index $data.cpp.status $signal | humanize }} | +| [C#/.NET](/docs/languages/net/) | {{ index $data.dotnet.status $signal | humanize }} | +| [Erlang/Elixir](/docs/languages/erlang/) | {{ index $data.erlang.status $signal | humanize }} | +| [Go](/docs/languages/go/) | {{ index $data.go.status $signal | humanize }} | +| [Java](/docs/languages/java/) | {{ index $data.java.status $signal | humanize }} | +| [JavaScript](/docs/languages/js/) | {{ index $data.js.status $signal | humanize }} | +| [PHP](/docs/languages/php/) | {{ index $data.php.status $signal | humanize }} | +| [Python](/docs/languages/python/) | {{index $data.python.status $signal | humanize }} | +| [Ruby](/docs/languages/ruby/) | {{ index $data.ruby.status $signal | humanize }} | +| [Rust](/docs/languages/rust/) | {{ index $data.rust.status $signal | humanize }} | +| [Swift](/docs/languages/swift/) | {{ index $data.swift.status $signal | humanize }} |