Skip to content

Commit

Permalink
docs: update cue files with how_it_works section
Browse files Browse the repository at this point in the history
  • Loading branch information
sainad2222 committed Jan 27, 2025
1 parent 71c6193 commit 0145622
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
18 changes: 18 additions & 0 deletions website/cue/reference/components/sinks/elasticsearch.cue
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@ components: sinks: elasticsearch: {
"""
}

query_params_structure: {
title: "Query params structure"
body: """
Query params can either be single key value pair or a key with multiple values
```yaml
sources:
source0:
query:
field: value
fruit:
- mango
- papaya
- kiwi
```
"""
}

aws_authentication: components._aws.how_it_works.aws_authentication
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ base: components: sources: http_client: configuration: {
required: false
type: object: {
examples: [{
field: ["value"]
field: "value"
fruit: ["mango", "papaya", "kiwi"]
}]
options: "*": {
Expand Down
20 changes: 20 additions & 0 deletions website/cue/reference/components/sources/http_client.cue
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,24 @@ components: sources: http_client: {
http_client_responses_total: components.sources.internal_metrics.output.metrics.http_client_responses_total
http_client_response_rtt_seconds: components.sources.internal_metrics.output.metrics.http_client_response_rtt_seconds
}

how_it_works: {
query_params_structure: {
title: "Query params structure"
body: """
Query params can either be single key value pair or a key with multiple values
```yaml
sources:
source0:
query:
field: value
fruit:
- mango
- papaya
- kiwi
```
"""
}
}
}
16 changes: 16 additions & 0 deletions website/cue/reference/components/sources/prometheus_scrape.cue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ components: sources: prometheus_scrape: {
but will only take the last value for each tag name specified.
"""
}

query_params_structure: {
title: "Query params structure"
body: """
In query params, key needs to be `match[]` with array of values
```yaml
sources:
source0:
query:
"match[]":
- '{job="somejob"}'
- '{__name__=~"job:.*"}'
```
"""
}
}

output: metrics: {
Expand Down

0 comments on commit 0145622

Please sign in to comment.