diff --git a/website/cue/reference/components.cue b/website/cue/reference/components.cue index 11fbc0a3f34f9..a43b0f61f18e3 100644 --- a/website/cue/reference/components.cue +++ b/website/cue/reference/components.cue @@ -446,13 +446,13 @@ components: { #LogOutput: [Name=string]: { description: string - name: Name - fields: #Schema + name?: Name + fields?: #Schema } - #TraceOutput: { + #TraceOutput: [Name=string]: { description: string - fields: #Schema + fields?: #Schema } #MetricInput: { @@ -465,12 +465,12 @@ components: { } #MetricOutput: [Name=string]: { - description: string - relevant_when?: string - tags: #MetricTags - name: Name - type: #MetricType - default_namespace: string + description: string + relevant_when?: string + tags?: #MetricTags + name?: Name + type?: #MetricType + default_namespace?: string } #OutputData: { diff --git a/website/cue/reference/components/sources/datadog_agent.cue b/website/cue/reference/components/sources/datadog_agent.cue index f45e9d0ef856d..9dfb692b09158 100644 --- a/website/cue/reference/components/sources/datadog_agent.cue +++ b/website/cue/reference/components/sources/datadog_agent.cue @@ -153,7 +153,7 @@ components: sources: datadog_agent: { tags: _extra_tags } } - traces: { + traces: trace: { description: "A trace received through an HTTP POST request sent by a Datadog Trace Agent." fields: { spans: { diff --git a/website/cue/reference/components/sources/http_client.cue b/website/cue/reference/components/sources/http_client.cue index c7093f47835ef..fa14ba24280d0 100644 --- a/website/cue/reference/components/sources/http_client.cue +++ b/website/cue/reference/components/sources/http_client.cue @@ -124,7 +124,7 @@ components: sources: http_client: { tags: _extra_tags } } - traces: { + traces: trace: { description: "A trace received through an HTTP request." fields: { source_type: { diff --git a/website/cue/reference/components/transforms/remap.cue b/website/cue/reference/components/transforms/remap.cue index 42a77e898cf1b..b5564dab0b0a1 100644 --- a/website/cue/reference/components/transforms/remap.cue +++ b/website/cue/reference/components/transforms/remap.cue @@ -4,7 +4,7 @@ components: transforms: "remap": { title: "Remap" description: """ - Is the recommended transform for parsing, shaping, and transforming data in Vector. It implements the + This is the recommended transform for parsing, shaping, and transforming data in Vector. It implements the [Vector Remap Language](\(urls.vrl_reference)) (VRL), an expression-oriented language designed for processing observability data (logs and metrics) in a safe and performant manner. @@ -49,6 +49,18 @@ components: transforms: "remap": { traces: true } + output: { + logs: event: { + description: "The modified input `log` event." + } + metrics: event: { + description: "The modified input `metric` event." + } + traces: event: { + description: "The modified input `trace` event." + } + } + examples: [ for k, v in remap.examples if v.raises == _|_ { { diff --git a/website/layouts/docs/component.html b/website/layouts/docs/component.html index 9f5cdac0a327d..93f3e34d66095 100644 --- a/website/layouts/docs/component.html +++ b/website/layouts/docs/component.html @@ -86,9 +86,9 @@

+{{ if .word }} {{ $red := "text-red-700 bg-red-100 dark:text-white dark:bg-red-600" }} {{ $blue := "text-blue-800 bg-blue-100 dark:text-blue-100 dark:bg-blue-600" }} {{ $yellow := "text-yellow-800 bg-yellow-100 dark:text-black dark:bg-yellow-400" }} @@ -8,11 +10,13 @@ {{ $styles := dict "red" $red "blue" $blue "yellow" $yellow "gray" $gray "green" $green "indigo" $indigo "violet" $violet }} {{ $color := index $styles .color }} {{ with .href }}{{ end }} - - {{ if .prefix }} - {{ .prefix }}: {{- .word -}} - {{ else }} - {{ .word }} - {{ end }} - -{{ if .href }}{{ end }} \ No newline at end of file + + {{ if .prefix }} + {{ .prefix }}: {{- .word -}} + {{ else }} + {{ .word }} + {{ end }} + +{{ if .href }}{{ end }} +{{ end }} diff --git a/website/layouts/partials/data.html b/website/layouts/partials/data.html index 41268850ad469..3382324e3cb91 100644 --- a/website/layouts/partials/data.html +++ b/website/layouts/partials/data.html @@ -232,25 +232,37 @@ {{/* Source/transform/sink output */}} {{ with .component_output }}
+ {{ with .metrics }} - {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "output-metrics" "href" "#output-metrics") }} + {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "output-metrics" "href" "#output-metrics") }} + + + {{/* Heroicon: solid/question-mark-circle */}} + + + + + - - {{/* Heroicon: solid/question-mark-circle */}} - - - - - +
+ {{ template "telemetry" . }} +
+ {{ end }} + + {{ with .traces }} + + {{ partial "heading.html" (dict "text" "Traces" "level" 3 "id" "output-traces") }} +
{{ template "telemetry" . }}
{{ end }} + {{ with .logs }} {{ partial "heading.html" (dict "text" "Logs" "level" 3 "id" "output-logs" "href" "#output-logs") }} @@ -265,6 +277,7 @@ +
@@ -382,7 +395,8 @@ {{/* Source/transform/sink output */}} {{ with .component_telemetry }}
- {{ with .metrics }} + + {{ with .metrics }} {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "telemetry-metrics" "href" "#telemetry-metrics") }} @@ -410,6 +424,7 @@ {{ template "telemetry" . }}
{{ end }} +
{{ end }} @@ -1712,140 +1727,6 @@

{{ end }} -{{ define "logs_output" }} -{{ range $k, $v := . }} -{{ $title := $k | title }} -{{ $id := printf "%s-log-output" $k }} -
- - - {{ partial "heading.html" (dict "text" $title "level" 4 "id" $id) }} - - - - {{ with $v.description }} -
- {{ . | markdownify }} -
- {{ end }} - - {{ with $v.fields }} - {{ $id := printf "%s-fields" $k }} -
- {{ partial "heading.html" (dict "text" "Fields" "level" 5 "id" $id) }} -
- -
- - {{ range $k, $v := . }} -
- - - {{ $k }} - - - - {{ if $v.required }} - {{ partial "badge.html" (dict "word" "required" "color" "red") }} - {{ else }} - {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} - {{ end }} - - {{ range $k, $v := $v.type }} - {{ $isArray := eq $k "array" }} - {{ if $isArray }} - {{ range $k, $v := $v.items.type }} - {{ $name := printf "[%s]" $k }} - {{ partial "badge.html" (dict "word" $name "color" "gray") }} - {{ end }} - {{ else }} - {{ partial "badge.html" (dict "word" $k "color" "gray") }} - - {{ with $v.syntax }} - {{ partial "badge.html" (dict "word" . "color" "gray") }} - {{ end }} - {{ end }} - {{ end }} - - - - {{ with $v.description }} -
- {{ . | markdownify }} -
- {{ end }} - - {{ range $k, $v := $v.type }} - {{ with $v.examples }} -
- - Examples - - -
- {{ range . }} - {{ template "code" . }} - {{ end }} -
-
- {{ end }} - {{ end }} -
- {{ end }} -
- {{ end }} -
-{{ end }} -{{ end }} - -{{ define "telemetry" }} -{{ range $k, $v := . }} -
- - - {{ partial "heading.html" (dict "text" $k "level" 4) }} - - - {{ partial "badge.html" (dict "word" $v.type "color" "gray") }} - - - {{ with $v.description }} -
- {{ . | markdownify }} -
- {{ end }} - - {{ with $v.tags }} -
-
- {{ range $k, $v := . }} -
- - - {{ $k }} - - - - {{ if not $v.required }} - {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} - {{ end }} - - - - {{ with $v.description }} -
- {{ . | markdownify }} -
- {{ end }} -
- {{ end }} -
-
- {{ end }} -
-{{ end }} -{{ end }} - {{ define "vrl-function-legend" }} {{/* Heroicon: outline/map */}}
@@ -2244,4 +2125,4 @@

-{{ end }} \ No newline at end of file +{{ end }} diff --git a/website/layouts/partials/docs/component-under-hero.html b/website/layouts/partials/docs/component-under-hero.html index 2d0f8331747e0..bdf86bbe7c075 100644 --- a/website/layouts/partials/docs/component-under-hero.html +++ b/website/layouts/partials/docs/component-under-hero.html @@ -3,9 +3,11 @@ {{ $config := index (index site.Data.docs.components $type) $tag }} {{ $classes := $config.classes }} {{ $features := $config.features }} -{{ $output := $config.output }} {{ $alias := $config.alias }} +{{ $input := $config.input }} +{{ $output := $config.output }} +
{{ if eq $classes.development "beta" }} {{ partial "badge.html" (dict "prefix" "status" "word" "beta" "color" "red" "inline" true) }} @@ -49,23 +51,42 @@ {{ partial "badge.html" (dict "prefix" "state" "word" "stateful" "color" "indigo" "inline" true) }} {{ end }} + {{ with $alias }} + {{ partial "badge.html" (dict "prefix" "previously known as" "word" . "color" "yellow" "inline" true) }} + {{ end }} +
+ +
+ {{ if $input.logs }} + {{ partial "badge.html" (dict "prefix" "input" "word" "logs" "color" "blue" "inline" true) }} + {{ end }} + {{ if $input.metrics }} + {{ partial "badge.html" (dict "prefix" "input" "word" "metrics" "color" "blue" "inline" true) }} + {{ end }} + {{ if $input.traces }} + {{ partial "badge.html" (dict "prefix" "input" "word" "traces" "color" "blue" "inline" true) }} + {{ end }} +
+ +
{{ range $k, $v := $output }} {{ if eq $k "logs" }} - {{ partial "badge.html" (dict "prefix" "output" "word" "log" "color" "yellow" "inline" true) }} + {{ partial "badge.html" (dict "prefix" "output" "word" "logs" "color" "yellow" "inline" true) }} {{ end }} {{ if eq $k "metrics" }} {{ partial "badge.html" (dict "prefix" "output" "word" "metrics" "color" "yellow" "inline" true) }} {{ end }} - {{ end }} - {{ with $alias }} - {{ partial "badge.html" (dict "prefix" "previously known as" "word" . "color" "yellow" "inline" true) }} + {{ if eq $k "traces" }} + {{ partial "badge.html" (dict "prefix" "output" "word" "traces" "color" "yellow" "inline" true) }} + {{ end }} {{ end }}
+ {{ if .Params.deprecated }}
{{ partial "badge.html" (dict "prefix" "status" "word" "deprecated" "color" "red" "inline" true) }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/website/layouts/partials/heading.html b/website/layouts/partials/heading.html index 97c09710d83a9..84f361f360851 100644 --- a/website/layouts/partials/heading.html +++ b/website/layouts/partials/heading.html @@ -3,7 +3,10 @@ {{ $level := .level | default 2 }} {{ $iconSizes := dict "1" "7" "2" "6" "3" "5" "4" "4" "5" "3" "6" "3" }} {{ $n := index $iconSizes ($level | string) }} - +{{ $icon := or .icon false }} + {{ if .href }} {{ $text }} @@ -18,11 +21,11 @@ {{ end }} - {{ if ne .icon false }} + {{ if $icon }} {{ end }} - \ No newline at end of file + diff --git a/website/layouts/partials/logs_output.html b/website/layouts/partials/logs_output.html new file mode 100644 index 0000000000000..88301ef9b5c13 --- /dev/null +++ b/website/layouts/partials/logs_output.html @@ -0,0 +1,85 @@ +{{ define "logs_output" }} +{{ range $k, $v := . }} +{{ $title := $k | title }} +{{ $id := printf "%s-log-output" $k }} +
+ + + {{ partial "heading.html" (dict "text" $title "level" 4 "id" $id) }} + + + + {{ with $v.description }} +
+ {{ . | markdownify }} +
+ {{ end }} + + {{ with $v.fields }} + {{ $id := printf "%s-fields" $k }} +
+ {{ partial "heading.html" (dict "text" "Fields" "level" 5 "id" $id) }} +
+ +
+ + {{ range $k, $v := . }} +
+ + + {{ $k }} + + + + {{ if $v.required }} + {{ partial "badge.html" (dict "word" "required" "color" "red") }} + {{ else }} + {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} + {{ end }} + + {{ range $k, $v := $v.type }} + {{ $isArray := eq $k "array" }} + {{ if $isArray }} + {{ range $k, $v := $v.items.type }} + {{ $name := printf "[%s]" $k }} + {{ partial "badge.html" (dict "word" $name "color" "gray") }} + {{ end }} + {{ else }} + {{ partial "badge.html" (dict "word" $k "color" "gray") }} + + {{ with $v.syntax }} + {{ partial "badge.html" (dict "word" . "color" "gray") }} + {{ end }} + {{ end }} + {{ end }} + + + + {{ with $v.description }} +
+ {{ . | markdownify }} +
+ {{ end }} + + {{ range $k, $v := $v.type }} + {{ with $v.examples }} +
+ + Examples + + +
+ {{ range . }} + {{ template "code" . }} + {{ end }} +
+
+ {{ end }} + {{ end }} +
+ {{ end }} +
+ {{ end }} +
+{{ end }} +{{ end }} diff --git a/website/layouts/partials/telemetry.html b/website/layouts/partials/telemetry.html new file mode 100644 index 0000000000000..74940d29ecedd --- /dev/null +++ b/website/layouts/partials/telemetry.html @@ -0,0 +1,49 @@ +{{ define "telemetry" }} +{{ range $k, $v := . }} +
+ + + {{ partial "heading.html" (dict "text" $k "level" 4) }} + + + {{ with $v.type }} + {{ partial "badge.html" (dict "word" $v.type "color" "gray") }} + {{ end }} + + + {{ with $v.description }} +
+ {{ . | markdownify }} +
+ {{ end }} + + {{ with $v.tags }} +
+
+ {{ range $k, $v := . }} +
+ + + {{ $k }} + + + + {{ if not $v.required }} + {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} + {{ end }} + + + + {{ with $v.description }} +
+ {{ . | markdownify }} +
+ {{ end }} +
+ {{ end }} +
+
+ {{ end }} +
+{{ end }} +{{ end }}