From 4fbf95353fee56ed368cea8a366217b111c47b34 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Wed, 12 Oct 2022 19:42:04 +0200 Subject: [PATCH] Auto link in stability table (#1849) Signed-off-by: svrnm Signed-off-by: svrnm --- .../shortcodes/lang_instrumentation_index_head.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/lang_instrumentation_index_head.md b/layouts/shortcodes/lang_instrumentation_index_head.md index beafdf39d09d..7fa69b47a704 100644 --- a/layouts/shortcodes/lang_instrumentation_index_head.md +++ b/layouts/shortcodes/lang_instrumentation_index_head.md @@ -1,7 +1,18 @@ {{ $data := index $.Site.Data.instrumentation.languages (.Get 0) }} {{ $name := $data.name }} {{ $relUrl := printf "https://github.com/open-telemetry/opentelemetry-%s/releases" (.Get 0) -}} - +{{ $tracesStatus := $data.status.traces | humanize }} +{{ $metricsStatus := $data.status.metrics | humanize }} +{{ $logsStatus := $data.status.logs | humanize }} +{{ if in "Stable Experimental" $tracesStatus }} + {{ $tracesStatus = printf "[%s](/docs/reference/specification/versioning-and-stability/#%s)" $tracesStatus $data.status.traces }} +{{ end }} +{{ if in "Stable Experimental" $metricsStatus }} + {{ $metricsStatus = printf "[%s](/docs/reference/specification/versioning-and-stability/#%s)" $metricsStatus $data.status.metrics }} +{{ end }} +{{ if in "Stable Experimental" $logsStatus }} + {{ $logsStatus = printf "[%s](/docs/reference/specification/versioning-and-stability/#%s)" $logsStatus $data.status.logs }} +{{ end }} This is the OpenTelemetry {{ $name }} documentation. OpenTelemetry is an observability framework -- an API, SDK, and tools that are designed to aid in the generation and collection of application telemetry data such as metrics, @@ -15,7 +26,7 @@ as follows: | Traces | Metrics | Logs | | -------- | ------- | ------- | -| {{ $data.status.traces | humanize }} | {{ $data.status.metrics | humanize }} | {{ $data.status.logs | humanize }} | +| {{ $tracesStatus }} | {{ $metricsStatus }} | {{ $logsStatus }} | For releases, including the [latest release][], see [Releases][]. {{- .Inner }}