Skip to content

Commit

Permalink
[infra] Create & use a single signal-status shortcode (#4674)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Jun 13, 2024
1 parent 4b1f5e3 commit 3446c7c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 32 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/concepts/signals/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/concepts/signals/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions layouts/shortcodes/logs-support-table.md

This file was deleted.

15 changes: 0 additions & 15 deletions layouts/shortcodes/metrics-support-table.md

This file was deleted.

16 changes: 16 additions & 0 deletions layouts/shortcodes/signal-support-table.md
Original file line number Diff line number Diff line change
@@ -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 }} |

0 comments on commit 3446c7c

Please sign in to comment.