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
3 changes: 3 additions & 0 deletions .schemagen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ mappings:
go.opentelemetry.io/collector/component:
ID:
schemaType: string
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator:
Config:
schemaType: ""
golang.org/x/time/rate:
Limit:
schemaType: number
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ generate-gh-issue-templates:
SCHEMA_DIRS := $(shell find $(CURDIR) -path "*testdata*" -prune -o -name "config.schema.yaml" -exec dirname {} \; | sort -u)

.PHONY: generate-schemas
generate-schemas:
generate-schemas: $(SCHEMAGEN)
@$(foreach dir,$(SCHEMA_DIRS), $(SCHEMAGEN) $(dir) -o $(dir);)

.PHONY: checks
Expand Down
20 changes: 20 additions & 0 deletions internal/coreinternal/consumerretry/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$defs:
config:
description: Config defines configuration for retrying batches in case of receiving a retryable error from a downstream consumer. If the retryable error doesn't provide a delay, exponential backoff is applied.
type: object
properties:
enabled:
description: Enabled indicates whether to not retry sending logs in case of receiving a retryable error from a downstream consumer. Default is false.
type: boolean
initial_interval:
description: InitialInterval the time to wait after the first failure before retrying. Default value is 1 second.
type: string
format: duration
max_elapsed_time:
description: MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a logs batch to a downstream consumer. Once this value is reached, the data is discarded. It never stops if MaxElapsedTime == 0. Default value is 5 minutes.
type: string
format: duration
max_interval:
description: MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between consecutive retries will always be `MaxInterval`. Default value is 30 seconds.
type: string
format: duration
15 changes: 15 additions & 0 deletions pkg/stanza/adapter/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$defs:
base_config:
description: BaseConfig is the common configuration of a stanza-based receiver
type: object
properties:
operators:
type: array
items:
x-customType: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator.Config
retry_on_failure:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry.config
storage:
x-pointer: true
type: string
x-customType: go.opentelemetry.io/collector/component.ID
4 changes: 4 additions & 0 deletions pkg/stanza/entry/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$defs:
severity:
description: Severity indicates the seriousness of a log entry
type: integer
16 changes: 16 additions & 0 deletions pkg/stanza/fileconsumer/attrs/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$defs:
resolver:
type: object
properties:
include_file_name:
type: boolean
include_file_name_resolved:
type: boolean
include_file_owner_group_name:
type: boolean
include_file_owner_name:
type: boolean
include_file_path:
type: boolean
include_file_path_resolved:
type: boolean
55 changes: 55 additions & 0 deletions pkg/stanza/fileconsumer/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
$defs:
config:
description: Config is the configuration of a file input operator
type: object
properties:
acquire_fs_lock:
type: boolean
compression:
type: string
delete_after_read:
type: boolean
encoding:
type: string
fingerprint_size:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper.byte_size
force_flush_period:
type: string
format: duration
header:
x-pointer: true
$ref: header_config
include_file_record_number:
type: boolean
include_file_record_offset:
type: boolean
initial_buffer_size:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper.byte_size
max_batches:
type: integer
max_concurrent_files:
type: integer
max_log_size:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper.byte_size
multiline:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/split.config
poll_interval:
type: string
format: duration
polls_to_archive:
type: integer
start_at:
type: string
allOf:
- $ref: ./matcher.criteria
- $ref: ./attrs.resolver
- $ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/trim.config
header_config:
type: object
properties:
metadata_operators:
type: array
items:
x-customType: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator.Config
pattern:
type: string
45 changes: 45 additions & 0 deletions pkg/stanza/fileconsumer/matcher/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
$defs:
criteria:
type: object
properties:
exclude:
type: array
items:
type: string
exclude_older_than:
description: ExcludeOlderThan allows excluding files whose modification time is older than the specified age.
type: string
format: duration
include:
type: array
items:
type: string
ordering_criteria:
$ref: ordering_criteria
ordering_criteria:
type: object
properties:
group_by:
type: string
regex:
type: string
sort_by:
type: array
items:
$ref: sort
top_n:
type: integer
sort:
type: object
properties:
ascending:
type: boolean
layout:
description: Timestamp only
type: string
location:
type: string
regex_key:
type: string
sort_type:
type: string
1 change: 1 addition & 0 deletions pkg/stanza/operator/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
153 changes: 153 additions & 0 deletions pkg/stanza/operator/helper/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
$defs:
attributer_config:
description: AttributerConfig is the configuration of a attributer
type: object
properties:
attributes:
type: object
additionalProperties:
$ref: expr_string_config
basic_config:
description: BasicConfig provides a basic implemention for an operator config.
type: object
properties:
id:
type: string
type:
type: string
byte_size:
type: integer
x-customType: int64
expr_string_config:
description: ExprStringConfig is a string that represents an expression
type: string
identifier_config:
description: IdentifierConfig is the configuration of a resource identifier
type: object
properties:
resource:
type: object
additionalProperties:
$ref: expr_string_config
input_config:
description: InputConfig provides a basic implementation of an input operator config.
type: object
allOf:
- $ref: attributer_config
- $ref: identifier_config
- $ref: writer_config
output_config:
description: OutputConfig provides a basic implementation of an output operator config.
type: object
allOf:
- $ref: basic_config
parser_config:
description: ParserConfig provides the basic implementation of a parser config.
type: object
properties:
body:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
parse_from:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
parse_to:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.rootable_field
scope_name:
x-pointer: true
$ref: scope_name_parser
severity:
x-pointer: true
$ref: severity_config
timestamp:
x-pointer: true
$ref: time_parser
trace:
x-pointer: true
$ref: trace_parser
allOf:
- $ref: transformer_config
scope_name_parser:
description: ScopeNameParser is a helper that parses severity onto an entry.
type: object
properties:
parse_from:
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
severity_config:
description: SeverityConfig allows users to specify how to parse a severity from a field.
type: object
properties:
mapping:
type: object
additionalProperties:
x-customType: any
overwrite_text:
type: boolean
parse_from:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
preset:
type: string
span_id_config:
type: object
properties:
parse_from:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
time_parser:
description: TimeParser is a helper that parses time onto an entry.
type: object
properties:
layout:
type: string
layout_type:
type: string
location:
type: string
parse_from:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
trace_flags_config:
type: object
properties:
parse_from:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
trace_id_config:
type: object
properties:
parse_from:
x-pointer: true
$ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry.field
trace_parser:
description: TraceParser is a helper that parses trace spans (and flags) onto an entry.
type: object
properties:
span_id:
x-pointer: true
$ref: span_id_config
trace_flags:
x-pointer: true
$ref: trace_flags_config
trace_id:
x-pointer: true
$ref: trace_id_config
transformer_config:
description: TransformerConfig provides a basic implementation of a transformer config.
type: object
properties:
if:
type: string
on_error:
type: string
allOf:
- $ref: writer_config
writer_config:
description: WriterConfig is the configuration of a writer operator.
type: object
properties:
output:
type: array
items:
type: string
allOf:
- $ref: basic_config
7 changes: 7 additions & 0 deletions pkg/stanza/operator/input/file/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$defs:
config:
description: Config is the configuration of a file input operator
type: object
allOf:
- $ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper.input_config
- $ref: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer.config
11 changes: 11 additions & 0 deletions pkg/stanza/split/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$defs:
config:
description: Config is the configuration for a split func
type: object
properties:
line_end_pattern:
type: string
line_start_pattern:
type: string
omit_pattern:
type: boolean
8 changes: 8 additions & 0 deletions pkg/stanza/trim/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$defs:
config:
type: object
properties:
preserve_leading_whitespaces:
type: boolean
preserve_trailing_whitespaces:
type: boolean
26 changes: 26 additions & 0 deletions receiver/elasticsearchreceiver/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
description: Config is the configuration for the elasticsearch receiver
type: object
properties:
indices:
description: Indices defines the indices to scrape. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html#index-stats-api-path-params for which names are viable. If Indices is empty, no indices will be scraped.
type: array
items:
type: string
nodes:
description: Nodes defines the nodes to scrape. See https://www.elastic.co/guide/en/elasticsearch/reference/7.9/cluster.html#cluster-nodes for which selectors may be used here. If Nodes is empty, no nodes will be scraped.
type: array
items:
type: string
password:
description: Password is the password used when making REST calls to elasticsearch. Must be specified if Username is. Not required.
$ref: go.opentelemetry.io/collector/config/configopaque.string
skip_cluster_metrics:
description: SkipClusterMetrics indicates whether cluster level metrics from /_cluster/* endpoints should be scraped or not.
type: boolean
username:
description: Username is the username used when making REST calls to elasticsearch. Must be specified if Password is. Not required.
type: string
allOf:
- $ref: go.opentelemetry.io/collector/scraper/scraperhelper.controller_config
- $ref: go.opentelemetry.io/collector/config/confighttp.client_config
- $ref: ./internal/metadata.metrics_builder_config
Loading