Skip to content
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
20 changes: 10 additions & 10 deletions website/cue/reference/components.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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
Comment on lines +468 to +473
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can think about improving this at a second phase.

}

#OutputData: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion website/cue/reference/components/sources/http_client.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
14 changes: 13 additions & 1 deletion website/cue/reference/components/transforms/remap.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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 == _|_ {
{
Expand Down
6 changes: 3 additions & 3 deletions website/layouts/docs/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ <h1 class="dark:text-gray-50 font-secondary font-extrabold text-4xl lg:text-5xl
{{ partial "data.html" (dict "component_outputs" . ) }}
{{ end }}

{{/* Component log/metric output */}}
{{/* Component log/metric/trace output */}}
{{ with $config.output }}
{{ partial "heading.html" (dict "text" "Output Data" "level" 2) }}
{{ partial "heading.html" (dict "text" "Output Types" "level" 2) }}
{{ partial "data.html" (dict "component_output" . ) }}
{{ end }}

Expand Down Expand Up @@ -173,4 +173,4 @@ <h1 class="dark:text-gray-50 font-secondary font-extrabold text-4xl lg:text-5xl

{{ define "subfooter" }}
{{ partial "docs/mobile-nav.html" . }}
{{ end }}
{{ end }}
20 changes: 12 additions & 8 deletions website/layouts/partials/badge.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- Do not render an empty box if a `word` is missing -->
{{ 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" }}
Expand All @@ -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 }}<a href="{{ . }}">{{ end }}
<span{{ with .show }} x-show="{{ . }}"{{ end }} class="{{ if .inline }}inline-{{ end }}flex items-center py-1 font-medium{{ if .large }} text-sm px-3{{ else }} text-xs px-2{{ end }} {{ if .rounded }} rounded-full{{ else }} rounded{{ end }} {{ $color }}">
{{ if .prefix }}
{{ .prefix }}:&nbsp;<span class="font-bold">{{- .word -}}</span>
{{ else }}
{{ .word }}
{{ end }}
</span>
{{ if .href }}</a>{{ end }}
<span {{ with .show }} x-show="{{ . }}" {{ end }}
class="{{ if .inline }}inline-{{ end }}flex items-center py-1 font-medium{{ if .large }} text-sm px-3{{ else }} text-xs px-2{{ end }} {{ if .rounded }} rounded-full{{ else }} rounded{{ end }} {{ $color }}">
{{ if .prefix }}
{{ .prefix }}:&nbsp;<span class="font-bold">{{- .word -}}</span>
{{ else }}
{{ .word }}
{{ end }}
</span>
{{ if .href }}</a>{{ end }}
{{ end }}
173 changes: 27 additions & 146 deletions website/layouts/partials/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,25 +232,37 @@
{{/* Source/transform/sink output */}}
{{ with .component_output }}
<div class="py-3 px-5">

{{ with .metrics }}
<span class="flex items-center justify-between">
{{ 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") }}

<a href="/docs/about/under-the-hood/architecture/data-model/metric">
{{/* Heroicon: solid/question-mark-circle */}}
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"
clip-rule="evenodd"/>
</svg>
</a>
</span>

<a href="/docs/about/under-the-hood/architecture/data-model/metric">
{{/* Heroicon: solid/question-mark-circle */}}
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"
clip-rule="evenodd" />
</svg>
</a>
</span>
<div class="mt-3 border rounded divide-y dark:border-gray-700 dark:divide-gray-700">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't remember deleting this but it renders the "?" href just fine.

{{ template "telemetry" . }}
</div>
{{ end }}

{{ with .traces }}
<span class="flex items-center justify-between">
{{ partial "heading.html" (dict "text" "Traces" "level" 3 "id" "output-traces") }}
</span>

<div class="mt-3 border rounded divide-y dark:border-gray-700 dark:divide-gray-700">
{{ template "telemetry" . }}
</div>
{{ end }}


{{ with .logs }}
<span class="flex items-center justify-between">
{{ partial "heading.html" (dict "text" "Logs" "level" 3 "id" "output-logs" "href" "#output-logs") }}
Expand All @@ -265,6 +277,7 @@
</a>
</span>


<div
class="mt-3 border-2 rounded-md border-yellow-400 flex flex-col space-y-1.5 py-2 px-3">
<span>
Expand Down Expand Up @@ -382,7 +395,8 @@
{{/* Source/transform/sink output */}}
{{ with .component_telemetry }}
<div class="py-4 px-6">
{{ with .metrics }}

{{ with .metrics }}
<span class="flex items-center justify-between">
{{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "telemetry-metrics" "href" "#telemetry-metrics")
}}
Expand Down Expand Up @@ -410,6 +424,7 @@
{{ template "telemetry" . }}
</div>
{{ end }}

</div>
{{ end }}

Expand Down Expand Up @@ -1712,140 +1727,6 @@ <h3 id="{{ $code }}">
</div>
{{ end }}

{{ define "logs_output" }}
{{ range $k, $v := . }}
{{ $title := $k | title }}
{{ $id := printf "%s-log-output" $k }}
<div class="py-3 px-5">
<span class="flex justify-between items-center">
<span class="text-lg">
{{ partial "heading.html" (dict "text" $title "level" 4 "id" $id) }}
</span>
</span>

{{ with $v.description }}
<div class="mt-3 prose dark:prose-dark">
{{ . | markdownify }}
</div>
{{ end }}

{{ with $v.fields }}
{{ $id := printf "%s-fields" $k }}
<div class="mt-4 font-semibold">
{{ partial "heading.html" (dict "text" "Fields" "level" 5 "id" $id) }}
</div>

<div class="mt-2 flex flex-col divide-y dark:divide-gray-700 border rounded dark:border-gray-700">

{{ range $k, $v := . }}
<div class="py-2.5 px-3.5">
<span class="flex justify-between items-center">
<span class="font-mono font-semibold">
{{ $k }}
</span>

<span class="flex space-x-1">
{{ 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 }}
</span>
</span>

{{ with $v.description }}
<div class="mt-2 prose dark:prose-dark">
{{ . | markdownify }}
</div>
{{ end }}

{{ range $k, $v := $v.type }}
{{ with $v.examples }}
<div class="mt-2">
<span>
Examples
</span>

<div class="mt-1.5 flex flex-col space-y-1 text-sm">
{{ range . }}
{{ template "code" . }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}

{{ define "telemetry" }}
{{ range $k, $v := . }}
<div class="py-3 px-5">
<span class="flex justify-between items-center">
<span class="font-mono font-bold text-dark dark:text-gray-200">
{{ partial "heading.html" (dict "text" $k "level" 4) }}
</span>

{{ partial "badge.html" (dict "word" $v.type "color" "gray") }}
</span>

{{ with $v.description }}
<div class="my-3 prose dark:prose-dark max-w-none">
{{ . | markdownify }}
</div>
{{ end }}

{{ with $v.tags }}
<div class="mt-3 border rounded dark:border-gray-700">
<div class="flex flex-col divide-y dark:divide-gray-700">
{{ range $k, $v := . }}
<div class="py-2.5 px-4">
<span class="flex justify-between items-center">
<span class="font-mono font-semibold">
{{ $k }}
</span>

<span>
{{ if not $v.required }}
{{ partial "badge.html" (dict "word" "optional" "color" "blue") }}
{{ end }}
</span>
</span>

{{ with $v.description }}
<div class="prose dark:prose-dark">
{{ . | markdownify }}
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}

{{ define "vrl-function-legend" }}
{{/* Heroicon: outline/map */}}
<div class="flex items-center space-x-2">
Expand Down Expand Up @@ -2244,4 +2125,4 @@ <h3 id="{{ $code }}">
</div>
</div>
</div>
{{ end }}
{{ end }}
Loading
Loading