From ae38d8d71ea822889feefeae43139d954e554ce0 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Mon, 25 Mar 2024 14:53:19 -0400 Subject: [PATCH] all: use alloy struct tags --- internal/component/common/config/selectors.go | 10 +- internal/component/common/config/types.go | 74 ++++----- .../component/common/kubernetes/kubernetes.go | 6 +- internal/component/common/kubernetes/rules.go | 10 +- internal/component/common/net/config.go | 36 ++--- internal/component/common/net/config_test.go | 2 +- internal/component/common/relabel/relabel.go | 14 +- internal/component/component_health.go | 6 +- internal/component/discovery/aws/ec2.go | 24 +-- internal/component/discovery/aws/lightsail.go | 18 +-- internal/component/discovery/azure/azure.go | 32 ++-- internal/component/discovery/consul/consul.go | 30 ++-- .../discovery/consulagent/consulagent.go | 22 +-- .../discovery/digitalocean/digitalocean.go | 14 +- internal/component/discovery/discovery.go | 2 +- internal/component/discovery/dns/dns.go | 8 +- internal/component/discovery/docker/docker.go | 16 +- .../discovery/dockerswarm/dockerswarm.go | 16 +- internal/component/discovery/eureka/eureka.go | 6 +- internal/component/discovery/file/file.go | 4 +- internal/component/discovery/gce/gce.go | 12 +- .../component/discovery/hetzner/hetzner.go | 8 +- internal/component/discovery/http/http.go | 6 +- internal/component/discovery/ionos/ionos.go | 8 +- .../component/discovery/kubelet/kubelet.go | 8 +- .../discovery/kubernetes/kubernetes.go | 26 +-- internal/component/discovery/kuma/kuma.go | 8 +- internal/component/discovery/linode/linode.go | 8 +- .../component/discovery/marathon/marathon.go | 10 +- internal/component/discovery/nerve/nerve.go | 6 +- internal/component/discovery/nomad/nomad.go | 14 +- .../discovery/openstack/openstack.go | 36 ++--- .../component/discovery/ovhcloud/ovhcloud.go | 12 +- internal/component/discovery/process/args.go | 18 +-- .../component/discovery/puppetdb/puppetdb.go | 12 +- .../component/discovery/relabel/relabel.go | 8 +- .../component/discovery/scaleway/scaleway.go | 32 ++-- .../discovery/serverset/serverset.go | 6 +- internal/component/discovery/triton/triton.go | 18 +-- internal/component/discovery/uyuni/uyuni.go | 20 +-- internal/component/faro/receiver/arguments.go | 42 ++--- internal/component/local/file/file.go | 10 +- internal/component/local/file_match/file.go | 4 +- internal/component/loki/echo/echo.go | 2 +- .../component/loki/process/metric/counters.go | 18 +-- .../component/loki/process/metric/gauges.go | 14 +- .../loki/process/metric/histograms.go | 14 +- internal/component/loki/process/process.go | 6 +- .../component/loki/process/process_test.go | 8 +- .../component/loki/process/stages/drop.go | 14 +- .../loki/process/stages/eventlogmessage.go | 6 +- .../loki/process/stages/extensions.go | 6 +- .../component/loki/process/stages/geoip.go | 8 +- .../component/loki/process/stages/json.go | 6 +- .../loki/process/stages/label_drop.go | 2 +- .../loki/process/stages/label_keep.go | 2 +- .../component/loki/process/stages/labels.go | 2 +- .../component/loki/process/stages/limit.go | 10 +- .../component/loki/process/stages/logfmt.go | 4 +- .../component/loki/process/stages/match.go | 10 +- .../component/loki/process/stages/metric.go | 8 +- .../loki/process/stages/multiline.go | 6 +- .../component/loki/process/stages/output.go | 2 +- .../component/loki/process/stages/pack.go | 4 +- .../component/loki/process/stages/pipeline.go | 50 +++--- .../loki/process/stages/pipeline_test.go | 2 +- .../component/loki/process/stages/regex.go | 4 +- .../component/loki/process/stages/replace.go | 6 +- .../component/loki/process/stages/sampling.go | 4 +- .../loki/process/stages/static_labels.go | 2 +- .../component/loki/process/stages/template.go | 4 +- .../component/loki/process/stages/tenant.go | 6 +- .../loki/process/stages/timestamp.go | 10 +- internal/component/loki/relabel/relabel.go | 10 +- .../component/loki/relabel/relabel_test.go | 6 +- .../component/loki/rules/kubernetes/debug.go | 18 +-- .../component/loki/rules/kubernetes/types.go | 18 +-- internal/component/loki/source/api/api.go | 10 +- .../loki/source/aws_firehose/component.go | 10 +- .../azure_event_hubs/azure_event_hubs.go | 26 +-- .../loki/source/cloudflare/cloudflare.go | 20 +-- .../component/loki/source/docker/docker.go | 26 +-- internal/component/loki/source/file/file.go | 32 ++-- .../component/loki/source/gcplog/gcplog.go | 10 +- .../loki/source/gcplog/gcptypes/gcptypes.go | 20 +-- internal/component/loki/source/gelf/gelf.go | 8 +- .../component/loki/source/heroku/heroku.go | 14 +- .../component/loki/source/journal/types.go | 14 +- internal/component/loki/source/kafka/kafka.go | 44 +++--- .../loki/source/kubernetes/kubernetes.go | 18 +-- .../kubernetes_events/event_controller.go | 4 +- .../kubernetes_events/kubernetes_events.go | 12 +- .../component/loki/source/podlogs/podlogs.go | 14 +- .../loki/source/podlogs/reconciler.go | 24 +-- .../component/loki/source/syslog/syslog.go | 16 +- .../component/loki/source/syslog/types.go | 18 +-- .../loki/source/windowsevent/arguments.go | 22 +-- internal/component/loki/write/types.go | 30 ++-- internal/component/loki/write/write.go | 20 +-- .../component/mimir/rules/kubernetes/debug.go | 18 +-- .../component/mimir/rules/kubernetes/types.go | 20 +-- internal/component/otelcol/auth/auth.go | 2 +- .../component/otelcol/auth/basic/basic.go | 4 +- .../component/otelcol/auth/bearer/bearer.go | 4 +- .../component/otelcol/auth/headers/headers.go | 10 +- .../component/otelcol/auth/oauth2/oauth2.go | 18 +-- .../component/otelcol/auth/sigv4/sigv4.go | 12 +- .../component/otelcol/config_attraction.go | 14 +- .../component/otelcol/config_debug_metrics.go | 2 +- internal/component/otelcol/config_filter.go | 44 +++--- internal/component/otelcol/config_grpc.go | 64 ++++---- internal/component/otelcol/config_http.go | 42 ++--- internal/component/otelcol/config_k8s.go | 4 +- internal/component/otelcol/config_queue.go | 6 +- internal/component/otelcol/config_retry.go | 12 +- internal/component/otelcol/config_scrape.go | 6 +- internal/component/otelcol/config_tls.go | 30 ++-- .../otelcol/connector/host_info/host_info.go | 6 +- .../connector/servicegraph/servicegraph.go | 18 +-- .../otelcol/connector/spanlogs/spanlogs.go | 28 ++-- .../connector/spanmetrics/spanmetrics.go | 18 +-- .../otelcol/connector/spanmetrics/types.go | 18 +-- internal/component/otelcol/consumer.go | 8 +- .../exporter/loadbalancing/loadbalancing.go | 58 +++---- .../otelcol/exporter/logging/logging.go | 8 +- .../component/otelcol/exporter/loki/loki.go | 2 +- .../component/otelcol/exporter/otlp/otlp.go | 10 +- .../otelcol/exporter/otlphttp/otlphttp.go | 14 +- .../otelcol/exporter/prometheus/prometheus.go | 14 +- .../jaeger_remote_sampling.go | 14 +- .../processor/attributes/attributes.go | 6 +- .../otelcol/processor/batch/batch.go | 12 +- .../otelcol/processor/discovery/discovery.go | 8 +- .../otelcol/processor/filter/filter.go | 10 +- .../otelcol/processor/filter/types.go | 10 +- .../processor/k8sattributes/k8sattributes.go | 14 +- .../otelcol/processor/k8sattributes/types.go | 40 ++--- .../processor/memorylimiter/memorylimiter.go | 12 +- .../probabilistic_sampler.go | 12 +- .../internal/aws/ec2/config.go | 22 +-- .../internal/aws/ecs/config.go | 30 ++-- .../internal/aws/eks/config.go | 6 +- .../internal/aws/elasticbeanstalk/config.go | 12 +- .../internal/aws/lambda/config.go | 20 +-- .../internal/azure/aks/config.go | 6 +- .../internal/azure/config.go | 22 +-- .../internal/consul/config.go | 20 +-- .../internal/docker/config.go | 6 +- .../resourcedetection/internal/gcp/config.go | 36 ++--- .../internal/heroku/config.go | 18 +-- .../internal/k8snode/config.go | 10 +- .../internal/openshift/config.go | 16 +- .../resource_attribute_config.go | 2 +- .../internal/system/config.go | 26 +-- .../resourcedetection/resourcedetection.go | 40 ++--- .../component/otelcol/processor/span/span.go | 22 +-- .../processor/tail_sampling/tail_sampling.go | 10 +- .../otelcol/processor/tail_sampling/types.go | 96 ++++++------ .../otelcol/processor/transform/transform.go | 14 +- .../otelcol/receiver/jaeger/jaeger.go | 32 ++-- .../component/otelcol/receiver/kafka/kafka.go | 90 +++++------ .../component/otelcol/receiver/loki/loki.go | 4 +- .../otelcol/receiver/opencensus/opencensus.go | 8 +- .../component/otelcol/receiver/otlp/otlp.go | 16 +- .../otelcol/receiver/prometheus/prometheus.go | 4 +- .../otelcol/receiver/vcenter/vcenter.go | 116 +++++++------- .../otelcol/receiver/zipkin/zipkin.go | 8 +- .../prometheus/exporter/apache/apache.go | 6 +- .../prometheus/exporter/azure/azure.go | 28 ++-- .../prometheus/exporter/blackbox/blackbox.go | 16 +- .../prometheus/exporter/cadvisor/cadvisor.go | 36 ++--- .../prometheus/exporter/cloudwatch/config.go | 64 ++++---- .../prometheus/exporter/consul/consul.go | 26 +-- .../prometheus/exporter/dnsmasq/dnsmasq.go | 6 +- .../exporter/elasticsearch/elasticsearch.go | 36 ++--- .../component/prometheus/exporter/exporter.go | 2 +- .../component/prometheus/exporter/gcp/gcp.go | 16 +- .../prometheus/exporter/github/github.go | 12 +- .../prometheus/exporter/kafka/kafka.go | 44 +++--- .../exporter/memcached/memcached.go | 6 +- .../prometheus/exporter/mongodb/mongodb.go | 8 +- .../prometheus/exporter/mssql/mssql.go | 10 +- .../prometheus/exporter/mysql/mysql.go | 56 +++---- .../prometheus/exporter/oracledb/oracledb.go | 8 +- .../prometheus/exporter/postgres/postgres.go | 16 +- .../prometheus/exporter/process/process.go | 20 +-- .../prometheus/exporter/redis/redis.go | 64 ++++---- .../prometheus/exporter/snmp/snmp.go | 28 ++-- .../exporter/snowflake/snowflake.go | 10 +- .../prometheus/exporter/squid/squid.go | 6 +- .../prometheus/exporter/statsd/config.go | 40 ++--- .../prometheus/exporter/unix/config.go | 148 +++++++++--------- .../prometheus/exporter/windows/config.go | 98 ++++++------ .../component/prometheus/operator/types.go | 32 ++-- .../prometheus/receive_http/receive_http.go | 4 +- .../component/prometheus/relabel/relabel.go | 10 +- .../component/prometheus/remotewrite/types.go | 78 ++++----- .../component/prometheus/scrape/scrape.go | 60 +++---- internal/component/pyroscope/ebpf/args.go | 26 +-- .../component/pyroscope/ebpf/ebpf_linux.go | 4 +- internal/component/pyroscope/java/args.go | 18 +-- internal/component/pyroscope/scrape/scrape.go | 68 ++++---- internal/component/pyroscope/write/write.go | 22 +-- internal/component/remote/http/http.go | 18 +-- .../component/remote/kubernetes/kubernetes.go | 12 +- internal/component/remote/s3/types.go | 24 +-- internal/component/remote/vault/auth.go | 76 ++++----- internal/component/remote/vault/refresher.go | 10 +- internal/component/remote/vault/vault.go | 26 +-- internal/flow/componenttest/testfailmodule.go | 4 +- internal/flow/flow_services_test.go | 4 +- .../flow/internal/controller/loader_test.go | 2 +- .../controller/node_config_argument.go | 6 +- .../internal/controller/node_config_export.go | 2 +- .../internal/controller/value_cache_test.go | 6 +- .../flow/internal/importsource/import_file.go | 6 +- .../flow/internal/importsource/import_git.go | 10 +- .../flow/internal/importsource/import_http.go | 14 +- .../internal/importsource/import_string.go | 2 +- .../flow/internal/testcomponents/count.go | 6 +- .../testcomponents/module/file/file.go | 4 +- .../internal/testcomponents/module/git/git.go | 16 +- .../testcomponents/module/http/http.go | 4 +- .../internal/testcomponents/module/module.go | 2 +- .../testcomponents/module/string/string.go | 4 +- .../internal/testcomponents/passthrough.go | 8 +- .../flow/internal/testcomponents/sumation.go | 6 +- internal/flow/internal/testcomponents/tick.go | 4 +- internal/flow/logging/options.go | 6 +- internal/flow/module_test.go | 4 +- internal/flow/tracing/tracing.go | 14 +- internal/service/cluster/cluster.go | 2 +- internal/service/http/http.go | 2 +- internal/service/http/tls.go | 44 +++--- internal/service/remotecfg/remotecfg.go | 10 +- internal/vcs/auth.go | 16 +- 236 files changed, 2128 insertions(+), 2128 deletions(-) diff --git a/internal/component/common/config/selectors.go b/internal/component/common/config/selectors.go index e4ae0e7dd9..61489604b8 100644 --- a/internal/component/common/config/selectors.go +++ b/internal/component/common/config/selectors.go @@ -8,8 +8,8 @@ import ( // LabelSelector defines a selector to check to see if a set of Kubernetes // labels matches a selector. type LabelSelector struct { - MatchLabels map[string]string `river:"match_labels,attr,optional"` - MatchExpressions []MatchExpression `river:"match_expression,block,optional"` + MatchLabels map[string]string `alloy:"match_labels,attr,optional"` + MatchExpressions []MatchExpression `alloy:"match_expression,block,optional"` } // BuildSelector builds a [labels.Selector] from a Flow LabelSelector. @@ -32,9 +32,9 @@ func (ls *LabelSelector) BuildSelector() (labels.Selector, error) { // MatchExpression defines an expression matcher to check to see if some key // from a Kubernetes resource matches a selector. type MatchExpression struct { - Key string `river:"key,attr"` - Operator string `river:"operator,attr"` - Values []string `river:"values,attr,optional"` + Key string `alloy:"key,attr"` + Operator string `alloy:"operator,attr"` + Values []string `alloy:"values,attr,optional"` } func (me *MatchExpression) buildExpression() metav1.LabelSelectorRequirement { diff --git a/internal/component/common/config/types.go b/internal/component/common/config/types.go index 561b9e7aa0..85ebf2637a 100644 --- a/internal/component/common/config/types.go +++ b/internal/component/common/config/types.go @@ -15,15 +15,15 @@ const bearerAuth string = "Bearer" // HTTPClientConfig mirrors config.HTTPClientConfig type HTTPClientConfig struct { - BasicAuth *BasicAuth `river:"basic_auth,block,optional"` - Authorization *Authorization `river:"authorization,block,optional"` - OAuth2 *OAuth2Config `river:"oauth2,block,optional"` - BearerToken alloytypes.Secret `river:"bearer_token,attr,optional"` - BearerTokenFile string `river:"bearer_token_file,attr,optional"` - ProxyConfig *ProxyConfig `river:",squash"` - TLSConfig TLSConfig `river:"tls_config,block,optional"` - FollowRedirects bool `river:"follow_redirects,attr,optional"` - EnableHTTP2 bool `river:"enable_http2,attr,optional"` + BasicAuth *BasicAuth `alloy:"basic_auth,block,optional"` + Authorization *Authorization `alloy:"authorization,block,optional"` + OAuth2 *OAuth2Config `alloy:"oauth2,block,optional"` + BearerToken alloytypes.Secret `alloy:"bearer_token,attr,optional"` + BearerTokenFile string `alloy:"bearer_token_file,attr,optional"` + ProxyConfig *ProxyConfig `alloy:",squash"` + TLSConfig TLSConfig `alloy:"tls_config,block,optional"` + FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` } // SetToDefault implements the river.Defaulter @@ -109,9 +109,9 @@ var DefaultHTTPClientConfig = HTTPClientConfig{ // BasicAuth configures Basic HTTP authentication credentials. type BasicAuth struct { - Username string `river:"username,attr,optional"` - Password alloytypes.Secret `river:"password,attr,optional"` - PasswordFile string `river:"password_file,attr,optional"` + Username string `alloy:"username,attr,optional"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + PasswordFile string `alloy:"password_file,attr,optional"` } // Convert converts our type to the native prometheus type @@ -139,10 +139,10 @@ func (b *BasicAuth) Validate() error { } type ProxyConfig struct { - ProxyURL URL `river:"proxy_url,attr,optional"` - NoProxy string `river:"no_proxy,attr,optional"` - ProxyFromEnvironment bool `river:"proxy_from_environment,attr,optional"` - ProxyConnectHeader Header `river:",squash"` + ProxyURL URL `alloy:"proxy_url,attr,optional"` + NoProxy string `alloy:"no_proxy,attr,optional"` + ProxyFromEnvironment bool `alloy:"proxy_from_environment,attr,optional"` + ProxyConnectHeader Header `alloy:",squash"` } func (p *ProxyConfig) Convert() config.ProxyConfig { @@ -215,7 +215,7 @@ func (u *URL) Convert() config.URL { } type Header struct { - Header map[string][]alloytypes.Secret `river:"proxy_connect_header,attr,optional"` + Header map[string][]alloytypes.Secret `alloy:"proxy_connect_header,attr,optional"` } func (h *Header) Convert() config.Header { @@ -238,9 +238,9 @@ func (h *Header) Convert() config.Header { // Authorization sets up HTTP authorization credentials. type Authorization struct { - Type string `river:"type,attr,optional"` - Credentials alloytypes.Secret `river:"credentials,attr,optional"` - CredentialsFile string `river:"credentials_file,attr,optional"` + Type string `alloy:"type,attr,optional"` + Credentials alloytypes.Secret `alloy:"credentials,attr,optional"` + CredentialsFile string `alloy:"credentials_file,attr,optional"` } // Convert converts our type to the native prometheus type @@ -301,15 +301,15 @@ func (tv *TLSVersion) UnmarshalText(text []byte) error { // TLSConfig sets up options for TLS connections. type TLSConfig struct { - CA string `river:"ca_pem,attr,optional"` - CAFile string `river:"ca_file,attr,optional"` - Cert string `river:"cert_pem,attr,optional"` - CertFile string `river:"cert_file,attr,optional"` - Key alloytypes.Secret `river:"key_pem,attr,optional"` - KeyFile string `river:"key_file,attr,optional"` - ServerName string `river:"server_name,attr,optional"` - InsecureSkipVerify bool `river:"insecure_skip_verify,attr,optional"` - MinVersion TLSVersion `river:"min_version,attr,optional"` + CA string `alloy:"ca_pem,attr,optional"` + CAFile string `alloy:"ca_file,attr,optional"` + Cert string `alloy:"cert_pem,attr,optional"` + CertFile string `alloy:"cert_file,attr,optional"` + Key alloytypes.Secret `alloy:"key_pem,attr,optional"` + KeyFile string `alloy:"key_file,attr,optional"` + ServerName string `alloy:"server_name,attr,optional"` + InsecureSkipVerify bool `alloy:"insecure_skip_verify,attr,optional"` + MinVersion TLSVersion `alloy:"min_version,attr,optional"` } // Convert converts our type to the native prometheus type @@ -358,14 +358,14 @@ func (t *TLSConfig) Validate() error { // OAuth2Config sets up the OAuth2 client. type OAuth2Config struct { - ClientID string `river:"client_id,attr,optional"` - ClientSecret alloytypes.Secret `river:"client_secret,attr,optional"` - ClientSecretFile string `river:"client_secret_file,attr,optional"` - Scopes []string `river:"scopes,attr,optional"` - TokenURL string `river:"token_url,attr,optional"` - EndpointParams map[string]string `river:"endpoint_params,attr,optional"` - ProxyConfig *ProxyConfig `river:",squash"` - TLSConfig *TLSConfig `river:"tls_config,block,optional"` + ClientID string `alloy:"client_id,attr,optional"` + ClientSecret alloytypes.Secret `alloy:"client_secret,attr,optional"` + ClientSecretFile string `alloy:"client_secret_file,attr,optional"` + Scopes []string `alloy:"scopes,attr,optional"` + TokenURL string `alloy:"token_url,attr,optional"` + EndpointParams map[string]string `alloy:"endpoint_params,attr,optional"` + ProxyConfig *ProxyConfig `alloy:",squash"` + TLSConfig *TLSConfig `alloy:"tls_config,block,optional"` } // Convert converts our type to the native prometheus type diff --git a/internal/component/common/kubernetes/kubernetes.go b/internal/component/common/kubernetes/kubernetes.go index df09a0f224..01d8c009d5 100644 --- a/internal/component/common/kubernetes/kubernetes.go +++ b/internal/component/common/kubernetes/kubernetes.go @@ -15,9 +15,9 @@ import ( // ClientArguments controls how to connect to a Kubernetes cluster. type ClientArguments struct { - APIServer commoncfg.URL `river:"api_server,attr,optional"` - KubeConfig string `river:"kubeconfig_file,attr,optional"` - HTTPClientConfig commoncfg.HTTPClientConfig `river:",squash"` + APIServer commoncfg.URL `alloy:"api_server,attr,optional"` + KubeConfig string `alloy:"kubeconfig_file,attr,optional"` + HTTPClientConfig commoncfg.HTTPClientConfig `alloy:",squash"` } // DefaultClientArguments holds default values for Arguments. diff --git a/internal/component/common/kubernetes/rules.go b/internal/component/common/kubernetes/rules.go index c89d9742af..c4bcc7d198 100644 --- a/internal/component/common/kubernetes/rules.go +++ b/internal/component/common/kubernetes/rules.go @@ -6,14 +6,14 @@ import ( ) type LabelSelector struct { - MatchLabels map[string]string `river:"match_labels,attr,optional"` - MatchExpressions []MatchExpression `river:"match_expression,block,optional"` + MatchLabels map[string]string `alloy:"match_labels,attr,optional"` + MatchExpressions []MatchExpression `alloy:"match_expression,block,optional"` } type MatchExpression struct { - Key string `river:"key,attr"` - Operator string `river:"operator,attr"` - Values []string `river:"values,attr,optional"` + Key string `alloy:"key,attr"` + Operator string `alloy:"operator,attr"` + Values []string `alloy:"values,attr,optional"` } func ConvertSelectorToListOptions(selector LabelSelector) (labels.Selector, error) { diff --git a/internal/component/common/net/config.go b/internal/component/common/net/config.go index 444627bf50..6f7c40479e 100644 --- a/internal/component/common/net/config.go +++ b/internal/component/common/net/config.go @@ -26,24 +26,24 @@ const ( type ServerConfig struct { // HTTP configures the HTTP dskit. Note that despite the block being present or not, // the dskit is always started. - HTTP *HTTPConfig `river:"http,block,optional"` + HTTP *HTTPConfig `alloy:"http,block,optional"` // GRPC configures the gRPC dskit. Note that despite the block being present or not, // the dskit is always started. - GRPC *GRPCConfig `river:"grpc,block,optional"` + GRPC *GRPCConfig `alloy:"grpc,block,optional"` // GracefulShutdownTimeout configures a timeout to gracefully shut down the server. - GracefulShutdownTimeout time.Duration `river:"graceful_shutdown_timeout,attr,optional"` + GracefulShutdownTimeout time.Duration `alloy:"graceful_shutdown_timeout,attr,optional"` } // HTTPConfig configures the HTTP dskit started by dskit.Server. type HTTPConfig struct { - ListenAddress string `river:"listen_address,attr,optional"` - ListenPort int `river:"listen_port,attr,optional"` - ConnLimit int `river:"conn_limit,attr,optional"` - ServerReadTimeout time.Duration `river:"server_read_timeout,attr,optional"` - ServerWriteTimeout time.Duration `river:"server_write_timeout,attr,optional"` - ServerIdleTimeout time.Duration `river:"server_idle_timeout,attr,optional"` + ListenAddress string `alloy:"listen_address,attr,optional"` + ListenPort int `alloy:"listen_port,attr,optional"` + ConnLimit int `alloy:"conn_limit,attr,optional"` + ServerReadTimeout time.Duration `alloy:"server_read_timeout,attr,optional"` + ServerWriteTimeout time.Duration `alloy:"server_write_timeout,attr,optional"` + ServerIdleTimeout time.Duration `alloy:"server_idle_timeout,attr,optional"` } // Into applies the configs from HTTPConfig into a dskit.Into. @@ -58,15 +58,15 @@ func (h *HTTPConfig) Into(c *dskit.Config) { // GRPCConfig configures the gRPC dskit started by dskit.Server. type GRPCConfig struct { - ListenAddress string `river:"listen_address,attr,optional"` - ListenPort int `river:"listen_port,attr,optional"` - ConnLimit int `river:"conn_limit,attr,optional"` - MaxConnectionAge time.Duration `river:"max_connection_age,attr,optional"` - MaxConnectionAgeGrace time.Duration `river:"max_connection_age_grace,attr,optional"` - MaxConnectionIdle time.Duration `river:"max_connection_idle,attr,optional"` - ServerMaxRecvMsg int `river:"server_max_recv_msg_size,attr,optional"` - ServerMaxSendMsg int `river:"server_max_send_msg_size,attr,optional"` - ServerMaxConcurrentStreams uint `river:"server_max_concurrent_streams,attr,optional"` + ListenAddress string `alloy:"listen_address,attr,optional"` + ListenPort int `alloy:"listen_port,attr,optional"` + ConnLimit int `alloy:"conn_limit,attr,optional"` + MaxConnectionAge time.Duration `alloy:"max_connection_age,attr,optional"` + MaxConnectionAgeGrace time.Duration `alloy:"max_connection_age_grace,attr,optional"` + MaxConnectionIdle time.Duration `alloy:"max_connection_idle,attr,optional"` + ServerMaxRecvMsg int `alloy:"server_max_recv_msg_size,attr,optional"` + ServerMaxSendMsg int `alloy:"server_max_send_msg_size,attr,optional"` + ServerMaxConcurrentStreams uint `alloy:"server_max_concurrent_streams,attr,optional"` } // Into applies the configs from GRPCConfig into a dskit.Into. diff --git a/internal/component/common/net/config_test.go b/internal/component/common/net/config_test.go index 56a04b43ad..33ee7216ea 100644 --- a/internal/component/common/net/config_test.go +++ b/internal/component/common/net/config_test.go @@ -13,7 +13,7 @@ import ( // testArguments mimics an arguments type used by a component, applying the defaults to ServerConfig // from it's UnmarshalRiver implementation, since the block is squashed. type testArguments struct { - Server *ServerConfig `river:",squash"` + Server *ServerConfig `alloy:",squash"` } func (t *testArguments) UnmarshalRiver(f func(v interface{}) error) error { diff --git a/internal/component/common/relabel/relabel.go b/internal/component/common/relabel/relabel.go index a1acaf3b83..a0b3f8a9cf 100644 --- a/internal/component/common/relabel/relabel.go +++ b/internal/component/common/relabel/relabel.go @@ -109,13 +109,13 @@ func (re Regexp) String() string { // Config describes a relabelling step to be applied on a target. type Config struct { - SourceLabels []string `river:"source_labels,attr,optional"` - Separator string `river:"separator,attr,optional"` - Regex Regexp `river:"regex,attr,optional"` - Modulus uint64 `river:"modulus,attr,optional"` - TargetLabel string `river:"target_label,attr,optional"` - Replacement string `river:"replacement,attr,optional"` - Action Action `river:"action,attr,optional"` + SourceLabels []string `alloy:"source_labels,attr,optional"` + Separator string `alloy:"separator,attr,optional"` + Regex Regexp `alloy:"regex,attr,optional"` + Modulus uint64 `alloy:"modulus,attr,optional"` + TargetLabel string `alloy:"target_label,attr,optional"` + Replacement string `alloy:"replacement,attr,optional"` + Action Action `alloy:"action,attr,optional"` } // DefaultRelabelConfig sets the default values of fields when decoding a RelabelConfig block. diff --git a/internal/component/component_health.go b/internal/component/component_health.go index 66a3647886..bfb13ae94d 100644 --- a/internal/component/component_health.go +++ b/internal/component/component_health.go @@ -26,15 +26,15 @@ type HealthComponent interface { // River. type Health struct { // The specific health value. - Health HealthType `river:"state,attr"` + Health HealthType `alloy:"state,attr"` // An optional message to describe the health; useful to say why a component // is unhealthy. - Message string `river:"message,attr,optional"` + Message string `alloy:"message,attr,optional"` // An optional time to indicate when the component last modified something // which updated its health. - UpdateTime time.Time `river:"update_time,attr,optional"` + UpdateTime time.Time `alloy:"update_time,attr,optional"` } // HealthType holds the health value for a component. diff --git a/internal/component/discovery/aws/ec2.go b/internal/component/discovery/aws/ec2.go index 72ce4464ab..971dd25863 100644 --- a/internal/component/discovery/aws/ec2.go +++ b/internal/component/discovery/aws/ec2.go @@ -31,23 +31,23 @@ func init() { // EC2Filter is the configuration for filtering EC2 instances. type EC2Filter struct { - Name string `river:"name,attr"` - Values []string `river:"values,attr"` + Name string `alloy:"name,attr"` + Values []string `alloy:"values,attr"` } // EC2Arguments is the configuration for EC2 based service discovery. type EC2Arguments struct { - Endpoint string `river:"endpoint,attr,optional"` - Region string `river:"region,attr,optional"` - AccessKey string `river:"access_key,attr,optional"` - SecretKey alloytypes.Secret `river:"secret_key,attr,optional"` - Profile string `river:"profile,attr,optional"` - RoleARN string `river:"role_arn,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - Filters []*EC2Filter `river:"filter,block,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` + Region string `alloy:"region,attr,optional"` + AccessKey string `alloy:"access_key,attr,optional"` + SecretKey alloytypes.Secret `alloy:"secret_key,attr,optional"` + Profile string `alloy:"profile,attr,optional"` + RoleARN string `alloy:"role_arn,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + Filters []*EC2Filter `alloy:"filter,block,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } func (args EC2Arguments) Convert() *promaws.EC2SDConfig { diff --git a/internal/component/discovery/aws/lightsail.go b/internal/component/discovery/aws/lightsail.go index ca35979fba..b64f5f9ba4 100644 --- a/internal/component/discovery/aws/lightsail.go +++ b/internal/component/discovery/aws/lightsail.go @@ -31,15 +31,15 @@ func init() { // LightsailArguments is the configuration for AWS Lightsail based service discovery. type LightsailArguments struct { - Endpoint string `river:"endpoint,attr,optional"` - Region string `river:"region,attr,optional"` - AccessKey string `river:"access_key,attr,optional"` - SecretKey alloytypes.Secret `river:"secret_key,attr,optional"` - Profile string `river:"profile,attr,optional"` - RoleARN string `river:"role_arn,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + Endpoint string `alloy:"endpoint,attr,optional"` + Region string `alloy:"region,attr,optional"` + AccessKey string `alloy:"access_key,attr,optional"` + SecretKey alloytypes.Secret `alloy:"secret_key,attr,optional"` + Profile string `alloy:"profile,attr,optional"` + RoleARN string `alloy:"role_arn,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } func (args LightsailArguments) Convert() *promaws.LightsailSDConfig { diff --git a/internal/component/discovery/azure/azure.go b/internal/component/discovery/azure/azure.go index 61b4857737..beb7fb64e8 100644 --- a/internal/component/discovery/azure/azure.go +++ b/internal/component/discovery/azure/azure.go @@ -29,28 +29,28 @@ func init() { } type Arguments struct { - Environment string `river:"environment,attr,optional"` - Port int `river:"port,attr,optional"` - SubscriptionID string `river:"subscription_id,attr,optional"` - OAuth *OAuth `river:"oauth,block,optional"` - ManagedIdentity *ManagedIdentity `river:"managed_identity,block,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - ResourceGroup string `river:"resource_group,attr,optional"` - - ProxyConfig *config.ProxyConfig `river:",squash"` - FollowRedirects bool `river:"follow_redirects,attr,optional"` - EnableHTTP2 bool `river:"enable_http2,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` + Environment string `alloy:"environment,attr,optional"` + Port int `alloy:"port,attr,optional"` + SubscriptionID string `alloy:"subscription_id,attr,optional"` + OAuth *OAuth `alloy:"oauth,block,optional"` + ManagedIdentity *ManagedIdentity `alloy:"managed_identity,block,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + ResourceGroup string `alloy:"resource_group,attr,optional"` + + ProxyConfig *config.ProxyConfig `alloy:",squash"` + FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` } type OAuth struct { - ClientID string `river:"client_id,attr"` - TenantID string `river:"tenant_id,attr"` - ClientSecret alloytypes.Secret `river:"client_secret,attr"` + ClientID string `alloy:"client_id,attr"` + TenantID string `alloy:"tenant_id,attr"` + ClientSecret alloytypes.Secret `alloy:"client_secret,attr"` } type ManagedIdentity struct { - ClientID string `river:"client_id,attr"` + ClientID string `alloy:"client_id,attr"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/consul/consul.go b/internal/component/discovery/consul/consul.go index 529b44af9e..f68eb614ab 100644 --- a/internal/component/discovery/consul/consul.go +++ b/internal/component/discovery/consul/consul.go @@ -28,22 +28,22 @@ func init() { } type Arguments struct { - Server string `river:"server,attr,optional"` - Token alloytypes.Secret `river:"token,attr,optional"` - Datacenter string `river:"datacenter,attr,optional"` - Namespace string `river:"namespace,attr,optional"` - Partition string `river:"partition,attr,optional"` - TagSeparator string `river:"tag_separator,attr,optional"` - Scheme string `river:"scheme,attr,optional"` - Username string `river:"username,attr,optional"` - Password alloytypes.Secret `river:"password,attr,optional"` - AllowStale bool `river:"allow_stale,attr,optional"` - Services []string `river:"services,attr,optional"` - ServiceTags []string `river:"tags,attr,optional"` - NodeMeta map[string]string `river:"node_meta,attr,optional"` + Server string `alloy:"server,attr,optional"` + Token alloytypes.Secret `alloy:"token,attr,optional"` + Datacenter string `alloy:"datacenter,attr,optional"` + Namespace string `alloy:"namespace,attr,optional"` + Partition string `alloy:"partition,attr,optional"` + TagSeparator string `alloy:"tag_separator,attr,optional"` + Scheme string `alloy:"scheme,attr,optional"` + Username string `alloy:"username,attr,optional"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + AllowStale bool `alloy:"allow_stale,attr,optional"` + Services []string `alloy:"services,attr,optional"` + ServiceTags []string `alloy:"tags,attr,optional"` + NodeMeta map[string]string `alloy:"node_meta,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/consulagent/consulagent.go b/internal/component/discovery/consulagent/consulagent.go index 76f96c7370..d897072c9e 100644 --- a/internal/component/discovery/consulagent/consulagent.go +++ b/internal/component/discovery/consulagent/consulagent.go @@ -27,17 +27,17 @@ func init() { } type Arguments struct { - Server string `river:"server,attr,optional"` - Token alloytypes.Secret `river:"token,attr,optional"` - Datacenter string `river:"datacenter,attr,optional"` - TagSeparator string `river:"tag_separator,attr,optional"` - Scheme string `river:"scheme,attr,optional"` - Username string `river:"username,attr,optional"` - Password alloytypes.Secret `river:"password,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Services []string `river:"services,attr,optional"` - ServiceTags []string `river:"tags,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` + Server string `alloy:"server,attr,optional"` + Token alloytypes.Secret `alloy:"token,attr,optional"` + Datacenter string `alloy:"datacenter,attr,optional"` + TagSeparator string `alloy:"tag_separator,attr,optional"` + Scheme string `alloy:"scheme,attr,optional"` + Username string `alloy:"username,attr,optional"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Services []string `alloy:"services,attr,optional"` + ServiceTags []string `alloy:"tags,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/digitalocean/digitalocean.go b/internal/component/discovery/digitalocean/digitalocean.go index 7fe661fcf3..bb7315eb15 100644 --- a/internal/component/discovery/digitalocean/digitalocean.go +++ b/internal/component/discovery/digitalocean/digitalocean.go @@ -27,15 +27,15 @@ func init() { } type Arguments struct { - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` - BearerToken alloytypes.Secret `river:"bearer_token,attr,optional"` - BearerTokenFile string `river:"bearer_token_file,attr,optional"` + BearerToken alloytypes.Secret `alloy:"bearer_token,attr,optional"` + BearerTokenFile string `alloy:"bearer_token_file,attr,optional"` - ProxyConfig *config.ProxyConfig `river:",squash"` - FollowRedirects bool `river:"follow_redirects,attr,optional"` - EnableHTTP2 bool `river:"enable_http2,attr,optional"` + ProxyConfig *config.ProxyConfig `alloy:",squash"` + FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/discovery.go b/internal/component/discovery/discovery.go index 2d4014cbb7..be260650d3 100644 --- a/internal/component/discovery/discovery.go +++ b/internal/component/discovery/discovery.go @@ -90,7 +90,7 @@ func (t Target) NonMetaLabels() labels.Labels { // Exports holds values which are exported by all discovery components. type Exports struct { - Targets []Target `river:"targets,attr"` + Targets []Target `alloy:"targets,attr"` } // Discoverer is an alias for Prometheus' Discoverer interface, so users of this package don't need diff --git a/internal/component/discovery/dns/dns.go b/internal/component/discovery/dns/dns.go index 3a774ae291..4f1309f37c 100644 --- a/internal/component/discovery/dns/dns.go +++ b/internal/component/discovery/dns/dns.go @@ -28,10 +28,10 @@ func init() { // Arguments configures the discovery.dns component. type Arguments struct { - Names []string `river:"names,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Type string `river:"type,attr,optional"` - Port int `river:"port,attr,optional"` + Names []string `alloy:"names,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Type string `alloy:"type,attr,optional"` + Port int `alloy:"port,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/docker/docker.go b/internal/component/discovery/docker/docker.go index 517311174b..0712c20e63 100644 --- a/internal/component/discovery/docker/docker.go +++ b/internal/component/discovery/docker/docker.go @@ -29,19 +29,19 @@ func init() { // Arguments configures the discovery.docker component. type Arguments struct { - Host string `river:"host,attr"` - Port int `river:"port,attr,optional"` - HostNetworkingHost string `river:"host_networking_host,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Filters []Filter `river:"filter,block,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + Host string `alloy:"host,attr"` + Port int `alloy:"port,attr,optional"` + HostNetworkingHost string `alloy:"host_networking_host,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Filters []Filter `alloy:"filter,block,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } // Filter is used to limit the discovery process to a subset of available // resources. type Filter struct { - Name string `river:"name,attr"` - Values []string `river:"values,attr"` + Name string `alloy:"name,attr"` + Values []string `alloy:"values,attr"` } // Convert converts a Filter to the upstream Prometheus SD type. diff --git a/internal/component/discovery/dockerswarm/dockerswarm.go b/internal/component/discovery/dockerswarm/dockerswarm.go index 030d8cad99..f7caafc665 100644 --- a/internal/component/discovery/dockerswarm/dockerswarm.go +++ b/internal/component/discovery/dockerswarm/dockerswarm.go @@ -27,17 +27,17 @@ func init() { } type Arguments struct { - Host string `river:"host,attr"` - Role string `river:"role,attr"` - Port int `river:"port,attr,optional"` - Filters []Filter `river:"filter,block,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + Host string `alloy:"host,attr"` + Role string `alloy:"role,attr"` + Port int `alloy:"port,attr,optional"` + Filters []Filter `alloy:"filter,block,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } type Filter struct { - Name string `river:"name,attr"` - Values []string `river:"values,attr"` + Name string `alloy:"name,attr"` + Values []string `alloy:"values,attr"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/eureka/eureka.go b/internal/component/discovery/eureka/eureka.go index 1ca6bee686..3221a681a9 100644 --- a/internal/component/discovery/eureka/eureka.go +++ b/internal/component/discovery/eureka/eureka.go @@ -27,10 +27,10 @@ func init() { } type Arguments struct { - Server string `river:"server,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` + Server string `alloy:"server,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/file/file.go b/internal/component/discovery/file/file.go index 5d075cbfb8..4611df0e46 100644 --- a/internal/component/discovery/file/file.go +++ b/internal/component/discovery/file/file.go @@ -24,8 +24,8 @@ func init() { } type Arguments struct { - Files []string `river:"files,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` + Files []string `alloy:"files,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/gce/gce.go b/internal/component/discovery/gce/gce.go index ca5d3a5401..5288f9b73d 100644 --- a/internal/component/discovery/gce/gce.go +++ b/internal/component/discovery/gce/gce.go @@ -26,12 +26,12 @@ func init() { // Arguments configures the discovery.gce component. type Arguments struct { - Project string `river:"project,attr"` - Zone string `river:"zone,attr"` - Filter string `river:"filter,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - TagSeparator string `river:"tag_separator,attr,optional"` + Project string `alloy:"project,attr"` + Zone string `alloy:"zone,attr"` + Filter string `alloy:"filter,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + TagSeparator string `alloy:"tag_separator,attr,optional"` } // DefaultArguments holds default values for Arguments. diff --git a/internal/component/discovery/hetzner/hetzner.go b/internal/component/discovery/hetzner/hetzner.go index be10a499d5..974260e3da 100644 --- a/internal/component/discovery/hetzner/hetzner.go +++ b/internal/component/discovery/hetzner/hetzner.go @@ -26,10 +26,10 @@ func init() { } type Arguments struct { - Role string `river:"role,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + Role string `alloy:"role,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/http/http.go b/internal/component/discovery/http/http.go index fe74b8fd66..098d3eed12 100644 --- a/internal/component/discovery/http/http.go +++ b/internal/component/discovery/http/http.go @@ -25,9 +25,9 @@ func init() { } type Arguments struct { - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - URL config.URL `river:"url,attr"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + URL config.URL `alloy:"url,attr"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/ionos/ionos.go b/internal/component/discovery/ionos/ionos.go index d1ae37cf35..117ae38e87 100644 --- a/internal/component/discovery/ionos/ionos.go +++ b/internal/component/discovery/ionos/ionos.go @@ -26,10 +26,10 @@ func init() { } type Arguments struct { - DatacenterID string `river:"datacenter_id,attr"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` + DatacenterID string `alloy:"datacenter_id,attr"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/kubelet/kubelet.go b/internal/component/discovery/kubelet/kubelet.go index 8f06aa104b..835c0d24d3 100644 --- a/internal/component/discovery/kubelet/kubelet.go +++ b/internal/component/discovery/kubelet/kubelet.go @@ -72,10 +72,10 @@ func init() { // Arguments configures the discovery.kubelet component. type Arguments struct { - URL config.URL `river:"url,attr,optional"` - Interval time.Duration `river:"refresh_interval,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - Namespaces []string `river:"namespaces,attr,optional"` + URL config.URL `alloy:"url,attr,optional"` + Interval time.Duration `alloy:"refresh_interval,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + Namespaces []string `alloy:"namespaces,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/discovery/kubernetes/kubernetes.go b/internal/component/discovery/kubernetes/kubernetes.go index 7f379bac53..1e622aa72a 100644 --- a/internal/component/discovery/kubernetes/kubernetes.go +++ b/internal/component/discovery/kubernetes/kubernetes.go @@ -24,13 +24,13 @@ func init() { // Arguments configures the discovery.kubernetes component. type Arguments struct { - APIServer config.URL `river:"api_server,attr,optional"` - Role string `river:"role,attr"` - KubeConfig string `river:"kubeconfig_file,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - NamespaceDiscovery NamespaceDiscovery `river:"namespaces,block,optional"` - Selectors []SelectorConfig `river:"selectors,block,optional"` - AttachMetadata AttachMetadataConfig `river:"attach_metadata,block,optional"` + APIServer config.URL `alloy:"api_server,attr,optional"` + Role string `alloy:"role,attr"` + KubeConfig string `alloy:"kubeconfig_file,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + NamespaceDiscovery NamespaceDiscovery `alloy:"namespaces,block,optional"` + Selectors []SelectorConfig `alloy:"selectors,block,optional"` + AttachMetadata AttachMetadataConfig `alloy:"attach_metadata,block,optional"` } // DefaultConfig holds defaults for SDConfig. @@ -68,8 +68,8 @@ func (args *Arguments) Convert() *promk8s.SDConfig { // NamespaceDiscovery configures filtering rules for which namespaces to discover. type NamespaceDiscovery struct { - IncludeOwnNamespace bool `river:"own_namespace,attr,optional"` - Names []string `river:"names,attr,optional"` + IncludeOwnNamespace bool `alloy:"own_namespace,attr,optional"` + Names []string `alloy:"names,attr,optional"` } func (nd *NamespaceDiscovery) convert() *promk8s.NamespaceDiscovery { @@ -81,9 +81,9 @@ func (nd *NamespaceDiscovery) convert() *promk8s.NamespaceDiscovery { // SelectorConfig configures selectors to filter resources to discover. type SelectorConfig struct { - Role string `river:"role,attr"` - Label string `river:"label,attr,optional"` - Field string `river:"field,attr,optional"` + Role string `alloy:"role,attr"` + Label string `alloy:"label,attr,optional"` + Field string `alloy:"field,attr,optional"` } func (sc *SelectorConfig) convert() *promk8s.SelectorConfig { @@ -95,7 +95,7 @@ func (sc *SelectorConfig) convert() *promk8s.SelectorConfig { } type AttachMetadataConfig struct { - Node bool `river:"node,attr,optional"` + Node bool `alloy:"node,attr,optional"` } func (am *AttachMetadataConfig) convert() *promk8s.AttachMetadataConfig { diff --git a/internal/component/discovery/kuma/kuma.go b/internal/component/discovery/kuma/kuma.go index f4adf85de0..c91aa3b5f4 100644 --- a/internal/component/discovery/kuma/kuma.go +++ b/internal/component/discovery/kuma/kuma.go @@ -27,11 +27,11 @@ func init() { // Arguments configure the discovery.kuma component. type Arguments struct { - Server string `river:"server,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - FetchTimeout time.Duration `river:"fetch_timeout,attr,optional"` + Server string `alloy:"server,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + FetchTimeout time.Duration `alloy:"fetch_timeout,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } // DefaultArguments is used to initialize default values for Arguments. diff --git a/internal/component/discovery/linode/linode.go b/internal/component/discovery/linode/linode.go index 152167c010..8031bde15b 100644 --- a/internal/component/discovery/linode/linode.go +++ b/internal/component/discovery/linode/linode.go @@ -27,10 +27,10 @@ func init() { // Arguments configure the discovery.linode component. type Arguments struct { - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - TagSeparator string `river:"tag_separator,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + TagSeparator string `alloy:"tag_separator,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } // DefaultArguments is used to initialize default values for Arguments. diff --git a/internal/component/discovery/marathon/marathon.go b/internal/component/discovery/marathon/marathon.go index 1c75473aaf..e7630cf834 100644 --- a/internal/component/discovery/marathon/marathon.go +++ b/internal/component/discovery/marathon/marathon.go @@ -28,11 +28,11 @@ func init() { } type Arguments struct { - Servers []string `river:"servers,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - AuthToken alloytypes.Secret `river:"auth_token,attr,optional"` - AuthTokenFile string `river:"auth_token_file,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` + Servers []string `alloy:"servers,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + AuthToken alloytypes.Secret `alloy:"auth_token,attr,optional"` + AuthTokenFile string `alloy:"auth_token_file,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/nerve/nerve.go b/internal/component/discovery/nerve/nerve.go index d7a71f28ac..d8521a80c9 100644 --- a/internal/component/discovery/nerve/nerve.go +++ b/internal/component/discovery/nerve/nerve.go @@ -26,9 +26,9 @@ func init() { // Arguments configure the discovery.nerve component. type Arguments struct { - Servers []string `river:"servers,attr"` - Paths []string `river:"paths,attr"` - Timeout time.Duration `river:"timeout,attr,optional"` + Servers []string `alloy:"servers,attr"` + Paths []string `alloy:"paths,attr"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } // DefaultArguments is used to initialize default values for Arguments. diff --git a/internal/component/discovery/nomad/nomad.go b/internal/component/discovery/nomad/nomad.go index f2a86a4773..b324add03e 100644 --- a/internal/component/discovery/nomad/nomad.go +++ b/internal/component/discovery/nomad/nomad.go @@ -27,13 +27,13 @@ func init() { } type Arguments struct { - AllowStale bool `river:"allow_stale,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - Namespace string `river:"namespace,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Region string `river:"region,attr,optional"` - Server string `river:"server,attr,optional"` - TagSeparator string `river:"tag_separator,attr,optional"` + AllowStale bool `alloy:"allow_stale,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + Namespace string `alloy:"namespace,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Region string `alloy:"region,attr,optional"` + Server string `alloy:"server,attr,optional"` + TagSeparator string `alloy:"tag_separator,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/openstack/openstack.go b/internal/component/discovery/openstack/openstack.go index 1ab76dceb0..892126ce8e 100644 --- a/internal/component/discovery/openstack/openstack.go +++ b/internal/component/discovery/openstack/openstack.go @@ -28,24 +28,24 @@ func init() { } type Arguments struct { - IdentityEndpoint string `river:"identity_endpoint,attr,optional"` - Username string `river:"username,attr,optional"` - UserID string `river:"userid,attr,optional"` - Password alloytypes.Secret `river:"password,attr,optional"` - ProjectName string `river:"project_name,attr,optional"` - ProjectID string `river:"project_id,attr,optional"` - DomainName string `river:"domain_name,attr,optional"` - DomainID string `river:"domain_id,attr,optional"` - ApplicationCredentialName string `river:"application_credential_name,attr,optional"` - ApplicationCredentialID string `river:"application_credential_id,attr,optional"` - ApplicationCredentialSecret alloytypes.Secret `river:"application_credential_secret,attr,optional"` - Role string `river:"role,attr"` - Region string `river:"region,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - AllTenants bool `river:"all_tenants,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` - Availability string `river:"availability,attr,optional"` + IdentityEndpoint string `alloy:"identity_endpoint,attr,optional"` + Username string `alloy:"username,attr,optional"` + UserID string `alloy:"userid,attr,optional"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + ProjectName string `alloy:"project_name,attr,optional"` + ProjectID string `alloy:"project_id,attr,optional"` + DomainName string `alloy:"domain_name,attr,optional"` + DomainID string `alloy:"domain_id,attr,optional"` + ApplicationCredentialName string `alloy:"application_credential_name,attr,optional"` + ApplicationCredentialID string `alloy:"application_credential_id,attr,optional"` + ApplicationCredentialSecret alloytypes.Secret `alloy:"application_credential_secret,attr,optional"` + Role string `alloy:"role,attr"` + Region string `alloy:"region,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + AllTenants bool `alloy:"all_tenants,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` + Availability string `alloy:"availability,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/ovhcloud/ovhcloud.go b/internal/component/discovery/ovhcloud/ovhcloud.go index 9fc31defe8..1117b35381 100644 --- a/internal/component/discovery/ovhcloud/ovhcloud.go +++ b/internal/component/discovery/ovhcloud/ovhcloud.go @@ -28,12 +28,12 @@ func init() { // Arguments configure the discovery.ovhcloud component. type Arguments struct { - Endpoint string `river:"endpoint,attr,optional"` - ApplicationKey string `river:"application_key,attr"` - ApplicationSecret alloytypes.Secret `river:"application_secret,attr"` - ConsumerKey alloytypes.Secret `river:"consumer_key,attr"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Service string `river:"service,attr"` + Endpoint string `alloy:"endpoint,attr,optional"` + ApplicationKey string `alloy:"application_key,attr"` + ApplicationSecret alloytypes.Secret `alloy:"application_secret,attr"` + ConsumerKey alloytypes.Secret `alloy:"consumer_key,attr"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Service string `alloy:"service,attr"` } // DefaultArguments is used to initialize default values for Arguments. diff --git a/internal/component/discovery/process/args.go b/internal/component/discovery/process/args.go index 7323b7858c..45ed6649bb 100644 --- a/internal/component/discovery/process/args.go +++ b/internal/component/discovery/process/args.go @@ -7,18 +7,18 @@ import ( ) type Arguments struct { - Join []discovery.Target `river:"join,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - DiscoverConfig DiscoverConfig `river:"discover_config,block,optional"` + Join []discovery.Target `alloy:"join,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + DiscoverConfig DiscoverConfig `alloy:"discover_config,block,optional"` } type DiscoverConfig struct { - Cwd bool `river:"cwd,attr,optional"` - Exe bool `river:"exe,attr,optional"` - Commandline bool `river:"commandline,attr,optional"` - Username bool `river:"username,attr,optional"` - UID bool `river:"uid,attr,optional"` - ContainerID bool `river:"container_id,attr,optional"` + Cwd bool `alloy:"cwd,attr,optional"` + Exe bool `alloy:"exe,attr,optional"` + Commandline bool `alloy:"commandline,attr,optional"` + Username bool `alloy:"username,attr,optional"` + UID bool `alloy:"uid,attr,optional"` + ContainerID bool `alloy:"container_id,attr,optional"` } var DefaultConfig = Arguments{ diff --git a/internal/component/discovery/puppetdb/puppetdb.go b/internal/component/discovery/puppetdb/puppetdb.go index 7299051ea7..1b1b29ea87 100644 --- a/internal/component/discovery/puppetdb/puppetdb.go +++ b/internal/component/discovery/puppetdb/puppetdb.go @@ -27,12 +27,12 @@ func init() { } type Arguments struct { - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - URL string `river:"url,attr"` - Query string `river:"query,attr"` - IncludeParameters bool `river:"include_parameters,attr,optional"` - Port int `river:"port,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + URL string `alloy:"url,attr"` + Query string `alloy:"query,attr"` + IncludeParameters bool `alloy:"include_parameters,attr,optional"` + Port int `alloy:"port,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/relabel/relabel.go b/internal/component/discovery/relabel/relabel.go index 77519abcf8..dc75ba4418 100644 --- a/internal/component/discovery/relabel/relabel.go +++ b/internal/component/discovery/relabel/relabel.go @@ -28,16 +28,16 @@ func init() { // Arguments holds values which are used to configure the discovery.relabel component. type Arguments struct { // Targets contains the input 'targets' passed by a service discovery component. - Targets []discovery.Target `river:"targets,attr"` + Targets []discovery.Target `alloy:"targets,attr"` // The relabelling rules to apply to each target's label set. - RelabelConfigs []*flow_relabel.Config `river:"rule,block,optional"` + RelabelConfigs []*flow_relabel.Config `alloy:"rule,block,optional"` } // Exports holds values which are exported by the discovery.relabel component. type Exports struct { - Output []discovery.Target `river:"output,attr"` - Rules flow_relabel.Rules `river:"rules,attr"` + Output []discovery.Target `alloy:"output,attr"` + Rules flow_relabel.Rules `alloy:"rules,attr"` } // Component implements the discovery.relabel component. diff --git a/internal/component/discovery/scaleway/scaleway.go b/internal/component/discovery/scaleway/scaleway.go index 7a50f4073e..2b2a30ce7a 100644 --- a/internal/component/discovery/scaleway/scaleway.go +++ b/internal/component/discovery/scaleway/scaleway.go @@ -32,22 +32,22 @@ func init() { } type Arguments struct { - Project string `river:"project_id,attr"` - Role Role `river:"role,attr"` - APIURL string `river:"api_url,attr,optional"` - Zone string `river:"zone,attr,optional"` - AccessKey string `river:"access_key,attr"` - SecretKey alloytypes.Secret `river:"secret_key,attr,optional"` - SecretKeyFile string `river:"secret_key_file,attr,optional"` - NameFilter string `river:"name_filter,attr,optional"` - TagsFilter []string `river:"tags_filter,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Port int `river:"port,attr,optional"` - - ProxyConfig *config.ProxyConfig `river:",squash"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` - FollowRedirects bool `river:"follow_redirects,attr,optional"` - EnableHTTP2 bool `river:"enable_http2,attr,optional"` + Project string `alloy:"project_id,attr"` + Role Role `alloy:"role,attr"` + APIURL string `alloy:"api_url,attr,optional"` + Zone string `alloy:"zone,attr,optional"` + AccessKey string `alloy:"access_key,attr"` + SecretKey alloytypes.Secret `alloy:"secret_key,attr,optional"` + SecretKeyFile string `alloy:"secret_key_file,attr,optional"` + NameFilter string `alloy:"name_filter,attr,optional"` + TagsFilter []string `alloy:"tags_filter,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Port int `alloy:"port,attr,optional"` + + ProxyConfig *config.ProxyConfig `alloy:",squash"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` + FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/serverset/serverset.go b/internal/component/discovery/serverset/serverset.go index c63855822f..e706e3a8e7 100644 --- a/internal/component/discovery/serverset/serverset.go +++ b/internal/component/discovery/serverset/serverset.go @@ -27,9 +27,9 @@ func init() { } type Arguments struct { - Servers []string `river:"servers,attr"` - Paths []string `river:"paths,attr"` - Timeout time.Duration `river:"timeout,attr,optional"` + Servers []string `alloy:"servers,attr"` + Paths []string `alloy:"paths,attr"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/triton/triton.go b/internal/component/discovery/triton/triton.go index 0aa1fea3f9..c74e7c5283 100644 --- a/internal/component/discovery/triton/triton.go +++ b/internal/component/discovery/triton/triton.go @@ -26,15 +26,15 @@ func init() { } type Arguments struct { - Account string `river:"account,attr"` - Role string `river:"role,attr,optional"` - DNSSuffix string `river:"dns_suffix,attr"` - Endpoint string `river:"endpoint,attr"` - Groups []string `river:"groups,attr,optional"` - Port int `river:"port,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - Version int `river:"version,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` + Account string `alloy:"account,attr"` + Role string `alloy:"role,attr,optional"` + DNSSuffix string `alloy:"dns_suffix,attr"` + Endpoint string `alloy:"endpoint,attr"` + Groups []string `alloy:"groups,attr,optional"` + Port int `alloy:"port,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + Version int `alloy:"version,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/discovery/uyuni/uyuni.go b/internal/component/discovery/uyuni/uyuni.go index 84d155100f..f9408d0a22 100644 --- a/internal/component/discovery/uyuni/uyuni.go +++ b/internal/component/discovery/uyuni/uyuni.go @@ -29,16 +29,16 @@ func init() { } type Arguments struct { - Server string `river:"server,attr"` - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` - Entitlement string `river:"entitlement,attr,optional"` - Separator string `river:"separator,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` - ProxyConfig *config.ProxyConfig `river:",squash"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` - FollowRedirects bool `river:"follow_redirects,attr,optional"` - EnableHTTP2 bool `river:"enable_http2,attr,optional"` + Server string `alloy:"server,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` + Entitlement string `alloy:"entitlement,attr,optional"` + Separator string `alloy:"separator,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` + ProxyConfig *config.ProxyConfig `alloy:",squash"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` + FollowRedirects bool `alloy:"follow_redirects,attr,optional"` + EnableHTTP2 bool `alloy:"enable_http2,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/faro/receiver/arguments.go b/internal/component/faro/receiver/arguments.go index d9b006d26f..3effb1f964 100644 --- a/internal/component/faro/receiver/arguments.go +++ b/internal/component/faro/receiver/arguments.go @@ -12,11 +12,11 @@ import ( // Arguments configures the app_agent_receiver component. type Arguments struct { - LogLabels map[string]string `river:"extra_log_labels,attr,optional"` + LogLabels map[string]string `alloy:"extra_log_labels,attr,optional"` - Server ServerArguments `river:"server,block,optional"` - SourceMaps SourceMapsArguments `river:"sourcemaps,block,optional"` - Output OutputArguments `river:"output,block"` + Server ServerArguments `alloy:"server,block,optional"` + SourceMaps SourceMapsArguments `alloy:"sourcemaps,block,optional"` + Output OutputArguments `alloy:"output,block"` } var _ syntax.Defaulter = (*Arguments)(nil) @@ -30,13 +30,13 @@ func (args *Arguments) SetToDefault() { // ServerArguments configures the HTTP server where telemetry information will // be sent from Faro clients. type ServerArguments struct { - Host string `river:"listen_address,attr,optional"` - Port int `river:"listen_port,attr,optional"` - CORSAllowedOrigins []string `river:"cors_allowed_origins,attr,optional"` - APIKey alloytypes.Secret `river:"api_key,attr,optional"` - MaxAllowedPayloadSize units.Base2Bytes `river:"max_allowed_payload_size,attr,optional"` + Host string `alloy:"listen_address,attr,optional"` + Port int `alloy:"listen_port,attr,optional"` + CORSAllowedOrigins []string `alloy:"cors_allowed_origins,attr,optional"` + APIKey alloytypes.Secret `alloy:"api_key,attr,optional"` + MaxAllowedPayloadSize units.Base2Bytes `alloy:"max_allowed_payload_size,attr,optional"` - RateLimiting RateLimitingArguments `river:"rate_limiting,block,optional"` + RateLimiting RateLimitingArguments `alloy:"rate_limiting,block,optional"` } func (s *ServerArguments) SetToDefault() { @@ -50,9 +50,9 @@ func (s *ServerArguments) SetToDefault() { // RateLimitingArguments configures rate limiting for the HTTP server. type RateLimitingArguments struct { - Enabled bool `river:"enabled,attr,optional"` - Rate float64 `river:"rate,attr,optional"` - BurstSize float64 `river:"burst_size,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + Rate float64 `alloy:"rate,attr,optional"` + BurstSize float64 `alloy:"burst_size,attr,optional"` } func (r *RateLimitingArguments) SetToDefault() { @@ -66,10 +66,10 @@ func (r *RateLimitingArguments) SetToDefault() { // SourceMapsArguments configures how app_agent_receiver will retrieve source // maps for transforming stack traces. type SourceMapsArguments struct { - Download bool `river:"download,attr,optional"` - DownloadFromOrigins []string `river:"download_from_origins,attr,optional"` - DownloadTimeout time.Duration `river:"download_timeout,attr,optional"` - Locations []LocationArguments `river:"location,block,optional"` + Download bool `alloy:"download,attr,optional"` + DownloadFromOrigins []string `alloy:"download_from_origins,attr,optional"` + DownloadTimeout time.Duration `alloy:"download_timeout,attr,optional"` + Locations []LocationArguments `alloy:"location,block,optional"` } func (s *SourceMapsArguments) SetToDefault() { @@ -82,13 +82,13 @@ func (s *SourceMapsArguments) SetToDefault() { // LocationArguments specifies an individual location where source maps will be loaded. type LocationArguments struct { - Path string `river:"path,attr"` - MinifiedPathPrefix string `river:"minified_path_prefix,attr"` + Path string `alloy:"path,attr"` + MinifiedPathPrefix string `alloy:"minified_path_prefix,attr"` } // OutputArguments configures where to send emitted logs and traces. Metrics // emitted by app_agent_receiver are exported as targets to be scraped. type OutputArguments struct { - Logs []loki.LogsReceiver `river:"logs,attr,optional"` - Traces []otelcol.Consumer `river:"traces,attr,optional"` + Logs []loki.LogsReceiver `alloy:"logs,attr,optional"` + Traces []otelcol.Consumer `alloy:"traces,attr,optional"` } diff --git a/internal/component/local/file/file.go b/internal/component/local/file/file.go index 194f340474..eb7899a8d8 100644 --- a/internal/component/local/file/file.go +++ b/internal/component/local/file/file.go @@ -40,15 +40,15 @@ func init() { // Arguments holds values which are used to configure the local.file component. type Arguments struct { // Filename indicates the file to watch. - Filename string `river:"filename,attr"` + Filename string `alloy:"filename,attr"` // Type indicates how to detect changes to the file. - Type filedetector.Detector `river:"detector,attr,optional"` + Type filedetector.Detector `alloy:"detector,attr,optional"` // PollFrequency determines the frequency to check for changes when Type is // Poll. - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` // IsSecret marks the file as holding a secret value which should not be // displayed to the user. - IsSecret bool `river:"is_secret,attr,optional"` + IsSecret bool `alloy:"is_secret,attr,optional"` } // DefaultArguments provides the default arguments for the local.file @@ -66,7 +66,7 @@ func (a *Arguments) SetToDefault() { // Exports holds values which are exported by the local.file component. type Exports struct { // Content of the file. - Content alloytypes.OptionalSecret `river:"content,attr"` + Content alloytypes.OptionalSecret `alloy:"content,attr"` } // Component implements the local.file component. diff --git a/internal/component/local/file_match/file.go b/internal/component/local/file_match/file.go index b3cba10824..00f3ffad7d 100644 --- a/internal/component/local/file_match/file.go +++ b/internal/component/local/file_match/file.go @@ -26,8 +26,8 @@ func init() { // Arguments holds values which are used to configure the local.file_match // component. type Arguments struct { - PathTargets []discovery.Target `river:"path_targets,attr"` - SyncPeriod time.Duration `river:"sync_period,attr,optional"` + PathTargets []discovery.Target `alloy:"path_targets,attr"` + SyncPeriod time.Duration `alloy:"sync_period,attr,optional"` } var _ component.Component = (*Component)(nil) diff --git a/internal/component/loki/echo/echo.go b/internal/component/loki/echo/echo.go index 63e2fc373a..9f0ca8d6a1 100644 --- a/internal/component/loki/echo/echo.go +++ b/internal/component/loki/echo/echo.go @@ -29,7 +29,7 @@ type Arguments struct{} // Exports holds the values exported by the loki.echo component. type Exports struct { - Receiver loki.LogsReceiver `river:"receiver,attr"` + Receiver loki.LogsReceiver `alloy:"receiver,attr"` } // DefaultArguments defines the default settings for log scraping. diff --git a/internal/component/loki/process/metric/counters.go b/internal/component/loki/process/metric/counters.go index a289553510..c5b6e15d21 100644 --- a/internal/component/loki/process/metric/counters.go +++ b/internal/component/loki/process/metric/counters.go @@ -18,17 +18,17 @@ const ( // CounterConfig defines a counter metric whose value only goes up. type CounterConfig struct { // Shared fields - Name string `river:"name,attr"` - Description string `river:"description,attr,optional"` - Source string `river:"source,attr,optional"` - Prefix string `river:"prefix,attr,optional"` - MaxIdle time.Duration `river:"max_idle_duration,attr,optional"` - Value string `river:"value,attr,optional"` + Name string `alloy:"name,attr"` + Description string `alloy:"description,attr,optional"` + Source string `alloy:"source,attr,optional"` + Prefix string `alloy:"prefix,attr,optional"` + MaxIdle time.Duration `alloy:"max_idle_duration,attr,optional"` + Value string `alloy:"value,attr,optional"` // Counter-specific fields - Action string `river:"action,attr"` - MatchAll bool `river:"match_all,attr,optional"` - CountEntryBytes bool `river:"count_entry_bytes,attr,optional"` + Action string `alloy:"action,attr"` + MatchAll bool `alloy:"match_all,attr,optional"` + CountEntryBytes bool `alloy:"count_entry_bytes,attr,optional"` } // DefaultCounterConfig sets the default for a Counter. diff --git a/internal/component/loki/process/metric/gauges.go b/internal/component/loki/process/metric/gauges.go index f3222af161..62d3c258df 100644 --- a/internal/component/loki/process/metric/gauges.go +++ b/internal/component/loki/process/metric/gauges.go @@ -29,15 +29,15 @@ var DefaultGaugeConfig = GaugeConfig{ // GaugeConfig defines a gauge metric whose value can go up or down. type GaugeConfig struct { // Shared fields - Name string `river:"name,attr"` - Description string `river:"description,attr,optional"` - Source string `river:"source,attr,optional"` - Prefix string `river:"prefix,attr,optional"` - MaxIdle time.Duration `river:"max_idle_duration,attr,optional"` - Value string `river:"value,attr,optional"` + Name string `alloy:"name,attr"` + Description string `alloy:"description,attr,optional"` + Source string `alloy:"source,attr,optional"` + Prefix string `alloy:"prefix,attr,optional"` + MaxIdle time.Duration `alloy:"max_idle_duration,attr,optional"` + Value string `alloy:"value,attr,optional"` // Gauge-specific fields - Action string `river:"action,attr"` + Action string `alloy:"action,attr"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/process/metric/histograms.go b/internal/component/loki/process/metric/histograms.go index 6ce2b2b5f3..447ad62ae6 100644 --- a/internal/component/loki/process/metric/histograms.go +++ b/internal/component/loki/process/metric/histograms.go @@ -18,15 +18,15 @@ var DefaultHistogramConfig = HistogramConfig{ // HistogramConfig defines a histogram metric whose values are bucketed. type HistogramConfig struct { // Shared fields - Name string `river:"name,attr"` - Description string `river:"description,attr,optional"` - Source string `river:"source,attr,optional"` - Prefix string `river:"prefix,attr,optional"` - MaxIdle time.Duration `river:"max_idle_duration,attr,optional"` - Value string `river:"value,attr,optional"` + Name string `alloy:"name,attr"` + Description string `alloy:"description,attr,optional"` + Source string `alloy:"source,attr,optional"` + Prefix string `alloy:"prefix,attr,optional"` + MaxIdle time.Duration `alloy:"max_idle_duration,attr,optional"` + Value string `alloy:"value,attr,optional"` // Histogram-specific fields - Buckets []float64 `river:"buckets,attr"` + Buckets []float64 `alloy:"buckets,attr"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/process/process.go b/internal/component/loki/process/process.go index b084582a95..4183c4b275 100644 --- a/internal/component/loki/process/process.go +++ b/internal/component/loki/process/process.go @@ -34,14 +34,14 @@ func init() { // Arguments holds values which are used to configure the loki.process // component. type Arguments struct { - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - Stages []stages.StageConfig `river:"stage,enum,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + Stages []stages.StageConfig `alloy:"stage,enum,optional"` } // Exports exposes the receiver that can be used to send log entries to // loki.process. type Exports struct { - Receiver loki.LogsReceiver `river:"receiver,attr"` + Receiver loki.LogsReceiver `alloy:"receiver,attr"` } var ( diff --git a/internal/component/loki/process/process_test.go b/internal/component/loki/process/process_test.go index 5178cc92c2..cb3e4b925f 100644 --- a/internal/component/loki/process/process_test.go +++ b/internal/component/loki/process/process_test.go @@ -64,7 +64,7 @@ func TestJSONLabelsStage(t *testing.T) { // an easy way to refer to a loki.LogsReceiver value for the forward_to // argument. type cfg struct { - Stages []stages.StageConfig `river:"stage,enum"` + Stages []stages.StageConfig `alloy:"stage,enum"` } var stagesCfg cfg err := syntax.Unmarshal([]byte(stg), &stagesCfg) @@ -151,7 +151,7 @@ stage.label_keep { // an easy way to refer to a loki.LogsReceiver value for the forward_to // argument. type cfg struct { - Stages []stages.StageConfig `river:"stage,enum"` + Stages []stages.StageConfig `alloy:"stage,enum"` } var stagesCfg cfg err := syntax.Unmarshal([]byte(stg), &stagesCfg) @@ -246,7 +246,7 @@ stage.labels { // an easy way to refer to a loki.LogsReceiver value for the forward_to // argument. type cfg struct { - Stages []stages.StageConfig `river:"stage,enum"` + Stages []stages.StageConfig `alloy:"stage,enum"` } var stagesCfg cfg err := syntax.Unmarshal([]byte(stg), &stagesCfg) @@ -412,7 +412,7 @@ func TestDeadlockWithFrequentUpdates(t *testing.T) { // an easy way to refer to a loki.LogsReceiver value for the forward_to // argument. type cfg struct { - Stages []stages.StageConfig `river:"stage,enum"` + Stages []stages.StageConfig `alloy:"stage,enum"` } var stagesCfg cfg err := syntax.Unmarshal([]byte(stg), &stagesCfg) diff --git a/internal/component/loki/process/stages/drop.go b/internal/component/loki/process/stages/drop.go index 96c212ba3c..e1c3b44421 100644 --- a/internal/component/loki/process/stages/drop.go +++ b/internal/component/loki/process/stages/drop.go @@ -30,13 +30,13 @@ var ( // DropConfig contains the configuration for a dropStage type DropConfig struct { - DropReason string `river:"drop_counter_reason,attr,optional"` - Source string `river:"source,attr,optional"` - Value string `river:"value,attr,optional"` - Separator string `river:"separator,attr,optional"` - Expression string `river:"expression,attr,optional"` - OlderThan time.Duration `river:"older_than,attr,optional"` - LongerThan units.Base2Bytes `river:"longer_than,attr,optional"` + DropReason string `alloy:"drop_counter_reason,attr,optional"` + Source string `alloy:"source,attr,optional"` + Value string `alloy:"value,attr,optional"` + Separator string `alloy:"separator,attr,optional"` + Expression string `alloy:"expression,attr,optional"` + OlderThan time.Duration `alloy:"older_than,attr,optional"` + LongerThan units.Base2Bytes `alloy:"longer_than,attr,optional"` regex *regexp.Regexp } diff --git a/internal/component/loki/process/stages/eventlogmessage.go b/internal/component/loki/process/stages/eventlogmessage.go index 247b801639..58cab36a5d 100644 --- a/internal/component/loki/process/stages/eventlogmessage.go +++ b/internal/component/loki/process/stages/eventlogmessage.go @@ -14,9 +14,9 @@ const ( ) type EventLogMessageConfig struct { - Source string `river:"source,attr,optional"` - DropInvalidLabels bool `river:"drop_invalid_labels,attr,optional"` - OverwriteExisting bool `river:"overwrite_existing,attr,optional"` + Source string `alloy:"source,attr,optional"` + DropInvalidLabels bool `alloy:"drop_invalid_labels,attr,optional"` + OverwriteExisting bool `alloy:"overwrite_existing,attr,optional"` } func (e *EventLogMessageConfig) Validate() error { diff --git a/internal/component/loki/process/stages/extensions.go b/internal/component/loki/process/stages/extensions.go index 61071b8825..7b0cccd110 100644 --- a/internal/component/loki/process/stages/extensions.go +++ b/internal/component/loki/process/stages/extensions.go @@ -22,9 +22,9 @@ type DockerConfig struct{} // CRIConfig is an empty struct that is used to enable a pre-defined pipeline // for decoding entries that are using the CRI logging format. type CRIConfig struct { - MaxPartialLines int `river:"max_partial_lines,attr,optional"` - MaxPartialLineSize uint64 `river:"max_partial_line_size,attr,optional"` - MaxPartialLineSizeTruncate bool `river:"max_partial_line_size_truncate,attr,optional"` + MaxPartialLines int `alloy:"max_partial_lines,attr,optional"` + MaxPartialLineSize uint64 `alloy:"max_partial_line_size,attr,optional"` + MaxPartialLineSizeTruncate bool `alloy:"max_partial_line_size_truncate,attr,optional"` } var ( diff --git a/internal/component/loki/process/stages/geoip.go b/internal/component/loki/process/stages/geoip.go index 505077ecfe..8822b9f20f 100644 --- a/internal/component/loki/process/stages/geoip.go +++ b/internal/component/loki/process/stages/geoip.go @@ -56,10 +56,10 @@ var fields = map[GeoIPFields]string{ // GeoIPConfig represents GeoIP stage config type GeoIPConfig struct { - DB string `river:"db,attr"` - Source *string `river:"source,attr"` - DBType string `river:"db_type,attr,optional"` - CustomLookups map[string]string `river:"custom_lookups,attr,optional"` + DB string `alloy:"db,attr"` + Source *string `alloy:"source,attr"` + DBType string `alloy:"db_type,attr,optional"` + CustomLookups map[string]string `alloy:"custom_lookups,attr,optional"` } func validateGeoIPConfig(c GeoIPConfig) (map[string]*jmespath.JMESPath, error) { diff --git a/internal/component/loki/process/stages/json.go b/internal/component/loki/process/stages/json.go index 5f98209b46..4ee263cbc4 100644 --- a/internal/component/loki/process/stages/json.go +++ b/internal/component/loki/process/stages/json.go @@ -22,9 +22,9 @@ const ( // JSONConfig represents a JSON Stage configuration type JSONConfig struct { - Expressions map[string]string `river:"expressions,attr"` - Source *string `river:"source,attr,optional"` - DropMalformed bool `river:"drop_malformed,attr,optional"` + Expressions map[string]string `alloy:"expressions,attr"` + Source *string `alloy:"source,attr,optional"` + DropMalformed bool `alloy:"drop_malformed,attr,optional"` } // validateJSONConfig validates a json config and returns a map of necessary jmespath expressions. diff --git a/internal/component/loki/process/stages/label_drop.go b/internal/component/loki/process/stages/label_drop.go index ae117220ce..143bd16d4f 100644 --- a/internal/component/loki/process/stages/label_drop.go +++ b/internal/component/loki/process/stages/label_drop.go @@ -12,7 +12,7 @@ var ErrEmptyLabelDropStageConfig = errors.New("labeldrop stage config cannot be // LabelDropConfig contains the slice of labels to be dropped. type LabelDropConfig struct { - Values []string `river:"values,attr"` + Values []string `alloy:"values,attr"` } func newLabelDropStage(config LabelDropConfig) (Stage, error) { diff --git a/internal/component/loki/process/stages/label_keep.go b/internal/component/loki/process/stages/label_keep.go index c06baa31f0..1887706319 100644 --- a/internal/component/loki/process/stages/label_keep.go +++ b/internal/component/loki/process/stages/label_keep.go @@ -12,7 +12,7 @@ var ErrEmptyLabelAllowStageConfig = errors.New("labelallow stage config cannot b // LabelAllowConfig contains the slice of labels to allow through. type LabelAllowConfig struct { - Values []string `river:"values,attr"` + Values []string `alloy:"values,attr"` } func newLabelAllowStage(config LabelAllowConfig) (Stage, error) { diff --git a/internal/component/loki/process/stages/labels.go b/internal/component/loki/process/stages/labels.go index 5faac02cc0..5bec9583ff 100644 --- a/internal/component/loki/process/stages/labels.go +++ b/internal/component/loki/process/stages/labels.go @@ -18,7 +18,7 @@ const ( // LabelsConfig is a set of labels to be extracted type LabelsConfig struct { - Values map[string]*string `river:"values,attr"` + Values map[string]*string `alloy:"values,attr"` } // validateLabelsConfig validates the Label stage configuration diff --git a/internal/component/loki/process/stages/limit.go b/internal/component/loki/process/stages/limit.go index aee76ee519..51b0c3e825 100644 --- a/internal/component/loki/process/stages/limit.go +++ b/internal/component/loki/process/stages/limit.go @@ -24,11 +24,11 @@ const MinReasonableMaxDistinctLabels = 10000 // 80bytes per rate.Limiter ~ 1MiB // LimitConfig sets up a Limit stage. type LimitConfig struct { - Rate float64 `river:"rate,attr"` - Burst int `river:"burst,attr"` - Drop bool `river:"drop,attr,optional"` - ByLabelName string `river:"by_label_name,attr,optional"` - MaxDistinctLabels int `river:"max_distinct_labels,attr,optional"` + Rate float64 `alloy:"rate,attr"` + Burst int `alloy:"burst,attr"` + Drop bool `alloy:"drop,attr,optional"` + ByLabelName string `alloy:"by_label_name,attr,optional"` + MaxDistinctLabels int `alloy:"max_distinct_labels,attr,optional"` } func newLimitStage(logger log.Logger, cfg LimitConfig, registerer prometheus.Registerer) (Stage, error) { diff --git a/internal/component/loki/process/stages/logfmt.go b/internal/component/loki/process/stages/logfmt.go index a70c84f527..0cf006b265 100644 --- a/internal/component/loki/process/stages/logfmt.go +++ b/internal/component/loki/process/stages/logfmt.go @@ -21,8 +21,8 @@ var ( // LogfmtConfig represents a logfmt Stage configuration type LogfmtConfig struct { - Mapping map[string]string `river:"mapping,attr"` - Source string `river:"source,attr,optional"` + Mapping map[string]string `alloy:"mapping,attr"` + Source string `alloy:"source,attr,optional"` } // validateLogfmtConfig validates a logfmt stage config and returns an inverse mapping of configured mapping. diff --git a/internal/component/loki/process/stages/match.go b/internal/component/loki/process/stages/match.go index 4b84bb99a9..3a06634670 100644 --- a/internal/component/loki/process/stages/match.go +++ b/internal/component/loki/process/stages/match.go @@ -27,11 +27,11 @@ var ( // MatchConfig contains the configuration for a matcherStage type MatchConfig struct { - Selector string `river:"selector,attr"` - Stages []StageConfig `river:"stage,enum,optional"` - Action string `river:"action,attr,optional"` - PipelineName string `river:"pipeline_name,attr,optional"` - DropReason string `river:"drop_counter_reason,attr,optional"` + Selector string `alloy:"selector,attr"` + Stages []StageConfig `alloy:"stage,enum,optional"` + Action string `alloy:"action,attr,optional"` + PipelineName string `alloy:"pipeline_name,attr,optional"` + DropReason string `alloy:"drop_counter_reason,attr,optional"` } // validateMatcherConfig validates the MatcherConfig for the matcherStage diff --git a/internal/component/loki/process/stages/metric.go b/internal/component/loki/process/stages/metric.go index 983354abd6..8d0ca48785 100644 --- a/internal/component/loki/process/stages/metric.go +++ b/internal/component/loki/process/stages/metric.go @@ -35,14 +35,14 @@ var ( // MetricConfig is a single metrics configuration. // TODO(@tpaschalis) Rework once River squashing is implemented. type MetricConfig struct { - Counter *metric.CounterConfig `river:"counter,block,optional"` - Gauge *metric.GaugeConfig `river:"gauge,block,optional"` - Histogram *metric.HistogramConfig `river:"histogram,block,optional"` + Counter *metric.CounterConfig `alloy:"counter,block,optional"` + Gauge *metric.GaugeConfig `alloy:"gauge,block,optional"` + Histogram *metric.HistogramConfig `alloy:"histogram,block,optional"` } // MetricsConfig is a set of configured metrics. type MetricsConfig struct { - Metrics []MetricConfig `river:"metric,enum,optional"` + Metrics []MetricConfig `alloy:"metric,enum,optional"` } type cfgCollector struct { diff --git a/internal/component/loki/process/stages/multiline.go b/internal/component/loki/process/stages/multiline.go index 677fe5c09b..0e4a7d234b 100644 --- a/internal/component/loki/process/stages/multiline.go +++ b/internal/component/loki/process/stages/multiline.go @@ -24,9 +24,9 @@ var ( // MultilineConfig contains the configuration for a Multiline stage. type MultilineConfig struct { - Expression string `river:"firstline,attr"` - MaxLines uint64 `river:"max_lines,attr,optional"` - MaxWaitTime time.Duration `river:"max_wait_time,attr,optional"` + Expression string `alloy:"firstline,attr"` + MaxLines uint64 `alloy:"max_lines,attr,optional"` + MaxWaitTime time.Duration `alloy:"max_wait_time,attr,optional"` regex *regexp.Regexp } diff --git a/internal/component/loki/process/stages/output.go b/internal/component/loki/process/stages/output.go index ae68a59384..b82d3cd3fb 100644 --- a/internal/component/loki/process/stages/output.go +++ b/internal/component/loki/process/stages/output.go @@ -19,7 +19,7 @@ var ( // OutputConfig initializes a configuration stage which sets the log line to a // value from the extracted map. type OutputConfig struct { - Source string `river:"source,attr"` + Source string `alloy:"source,attr"` } // newOutputStage creates a new outputStage diff --git a/internal/component/loki/process/stages/pack.go b/internal/component/loki/process/stages/pack.go index a5d1633b40..2aece44982 100644 --- a/internal/component/loki/process/stages/pack.go +++ b/internal/component/loki/process/stages/pack.go @@ -101,8 +101,8 @@ func (w Packed) MarshalJSON() ([]byte, error) { // PackConfig contains the configuration for a packStage type PackConfig struct { - Labels []string `river:"labels,attr"` - IngestTimestamp bool `river:"ingest_timestamp,attr,optional"` + Labels []string `alloy:"labels,attr"` + IngestTimestamp bool `alloy:"ingest_timestamp,attr,optional"` } // DefaultPackConfig sets the defaults. diff --git a/internal/component/loki/process/stages/pipeline.go b/internal/component/loki/process/stages/pipeline.go index fb1be291e5..65885c9140 100644 --- a/internal/component/loki/process/stages/pipeline.go +++ b/internal/component/loki/process/stages/pipeline.go @@ -16,31 +16,31 @@ import ( // exactly one is set. type StageConfig struct { //TODO(thampiotr): sync these with new stages - CRIConfig *CRIConfig `river:"cri,block,optional"` - DecolorizeConfig *DecolorizeConfig `river:"decolorize,block,optional"` - DockerConfig *DockerConfig `river:"docker,block,optional"` - DropConfig *DropConfig `river:"drop,block,optional"` - EventLogMessageConfig *EventLogMessageConfig `river:"eventlogmessage,block,optional"` - GeoIPConfig *GeoIPConfig `river:"geoip,block,optional"` - JSONConfig *JSONConfig `river:"json,block,optional"` - LabelAllowConfig *LabelAllowConfig `river:"label_keep,block,optional"` - LabelDropConfig *LabelDropConfig `river:"label_drop,block,optional"` - LabelsConfig *LabelsConfig `river:"labels,block,optional"` - LimitConfig *LimitConfig `river:"limit,block,optional"` - LogfmtConfig *LogfmtConfig `river:"logfmt,block,optional"` - MatchConfig *MatchConfig `river:"match,block,optional"` - MetricsConfig *MetricsConfig `river:"metrics,block,optional"` - MultilineConfig *MultilineConfig `river:"multiline,block,optional"` - OutputConfig *OutputConfig `river:"output,block,optional"` - PackConfig *PackConfig `river:"pack,block,optional"` - RegexConfig *RegexConfig `river:"regex,block,optional"` - ReplaceConfig *ReplaceConfig `river:"replace,block,optional"` - StaticLabelsConfig *StaticLabelsConfig `river:"static_labels,block,optional"` - StructuredMetadata *LabelsConfig `river:"structured_metadata,block,optional"` - SamplingConfig *SamplingConfig `river:"sampling,block,optional"` - TemplateConfig *TemplateConfig `river:"template,block,optional"` - TenantConfig *TenantConfig `river:"tenant,block,optional"` - TimestampConfig *TimestampConfig `river:"timestamp,block,optional"` + CRIConfig *CRIConfig `alloy:"cri,block,optional"` + DecolorizeConfig *DecolorizeConfig `alloy:"decolorize,block,optional"` + DockerConfig *DockerConfig `alloy:"docker,block,optional"` + DropConfig *DropConfig `alloy:"drop,block,optional"` + EventLogMessageConfig *EventLogMessageConfig `alloy:"eventlogmessage,block,optional"` + GeoIPConfig *GeoIPConfig `alloy:"geoip,block,optional"` + JSONConfig *JSONConfig `alloy:"json,block,optional"` + LabelAllowConfig *LabelAllowConfig `alloy:"label_keep,block,optional"` + LabelDropConfig *LabelDropConfig `alloy:"label_drop,block,optional"` + LabelsConfig *LabelsConfig `alloy:"labels,block,optional"` + LimitConfig *LimitConfig `alloy:"limit,block,optional"` + LogfmtConfig *LogfmtConfig `alloy:"logfmt,block,optional"` + MatchConfig *MatchConfig `alloy:"match,block,optional"` + MetricsConfig *MetricsConfig `alloy:"metrics,block,optional"` + MultilineConfig *MultilineConfig `alloy:"multiline,block,optional"` + OutputConfig *OutputConfig `alloy:"output,block,optional"` + PackConfig *PackConfig `alloy:"pack,block,optional"` + RegexConfig *RegexConfig `alloy:"regex,block,optional"` + ReplaceConfig *ReplaceConfig `alloy:"replace,block,optional"` + StaticLabelsConfig *StaticLabelsConfig `alloy:"static_labels,block,optional"` + StructuredMetadata *LabelsConfig `alloy:"structured_metadata,block,optional"` + SamplingConfig *SamplingConfig `alloy:"sampling,block,optional"` + TemplateConfig *TemplateConfig `alloy:"template,block,optional"` + TenantConfig *TenantConfig `alloy:"tenant,block,optional"` + TimestampConfig *TimestampConfig `alloy:"timestamp,block,optional"` } var rateLimiter *rate.Limiter diff --git a/internal/component/loki/process/stages/pipeline_test.go b/internal/component/loki/process/stages/pipeline_test.go index d422cf2cc3..0fcf8917ff 100644 --- a/internal/component/loki/process/stages/pipeline_test.go +++ b/internal/component/loki/process/stages/pipeline_test.go @@ -22,7 +22,7 @@ import ( // Configs defines multiple StageConfigs as consequent blocks. type Configs struct { - Stages []StageConfig `river:"stage,enum,optional"` + Stages []StageConfig `alloy:"stage,enum,optional"` } func withInboundEntries(entries ...Entry) chan Entry { diff --git a/internal/component/loki/process/stages/regex.go b/internal/component/loki/process/stages/regex.go index bc4a3e0e57..ef3f28abf6 100644 --- a/internal/component/loki/process/stages/regex.go +++ b/internal/component/loki/process/stages/regex.go @@ -23,8 +23,8 @@ var ( // RegexConfig configures a processing stage uses regular expressions to // extract values from log lines into the shared values map. type RegexConfig struct { - Expression string `river:"expression,attr"` - Source *string `river:"source,attr,optional"` + Expression string `alloy:"expression,attr"` + Source *string `alloy:"source,attr,optional"` } // validateRegexConfig validates the config and return a regex diff --git a/internal/component/loki/process/stages/replace.go b/internal/component/loki/process/stages/replace.go index 8cbb6ce75e..266b5a5d9e 100644 --- a/internal/component/loki/process/stages/replace.go +++ b/internal/component/loki/process/stages/replace.go @@ -28,9 +28,9 @@ func init() { // ReplaceConfig contains a regexStage configuration type ReplaceConfig struct { - Expression string `river:"expression,attr"` - Source string `river:"source,attr,optional"` - Replace string `river:"replace,attr,optional"` + Expression string `alloy:"expression,attr"` + Source string `alloy:"source,attr,optional"` + Replace string `alloy:"replace,attr,optional"` } func getExpressionRegex(c ReplaceConfig) (*regexp.Regexp, error) { diff --git a/internal/component/loki/process/stages/sampling.go b/internal/component/loki/process/stages/sampling.go index 53bb6ad2e5..d2ef316535 100644 --- a/internal/component/loki/process/stages/sampling.go +++ b/internal/component/loki/process/stages/sampling.go @@ -22,8 +22,8 @@ var ( // SamplingConfig contains the configuration for a samplingStage type SamplingConfig struct { - DropReason *string `river:"drop_counter_reason,attr,optional"` - SamplingRate float64 `river:"rate,attr"` + DropReason *string `alloy:"drop_counter_reason,attr,optional"` + SamplingRate float64 `alloy:"rate,attr"` } func (s *SamplingConfig) SetToDefault() { diff --git a/internal/component/loki/process/stages/static_labels.go b/internal/component/loki/process/stages/static_labels.go index 8d1d2873f7..df8c5d244d 100644 --- a/internal/component/loki/process/stages/static_labels.go +++ b/internal/component/loki/process/stages/static_labels.go @@ -16,7 +16,7 @@ var ErrEmptyStaticLabelStageConfig = errors.New("static_labels stage config cann // StaticLabelsConfig contains a map of static labels to be set. type StaticLabelsConfig struct { - Values map[string]*string `river:"values,attr"` + Values map[string]*string `alloy:"values,attr"` } func newStaticLabelsStage(logger log.Logger, config StaticLabelsConfig) (Stage, error) { diff --git a/internal/component/loki/process/stages/template.go b/internal/component/loki/process/stages/template.go index 3da3a782e9..cf8c7ab50d 100644 --- a/internal/component/loki/process/stages/template.go +++ b/internal/component/loki/process/stages/template.go @@ -63,8 +63,8 @@ func init() { // TemplateConfig configures template value extraction. type TemplateConfig struct { - Source string `river:"source,attr"` - Template string `river:"template,attr"` + Source string `alloy:"source,attr"` + Template string `alloy:"template,attr"` } // validateTemplateConfig validates the templateStage config. diff --git a/internal/component/loki/process/stages/tenant.go b/internal/component/loki/process/stages/tenant.go index fab08ec479..a95cd2f1bc 100644 --- a/internal/component/loki/process/stages/tenant.go +++ b/internal/component/loki/process/stages/tenant.go @@ -26,9 +26,9 @@ type tenantStage struct { // TenantConfig configures a tenant stage. type TenantConfig struct { - Label string `river:"label,attr,optional"` - Source string `river:"source,attr,optional"` - Value string `river:"value,attr,optional"` + Label string `alloy:"label,attr,optional"` + Source string `alloy:"source,attr,optional"` + Value string `alloy:"value,attr,optional"` } // validateTenantConfig validates the tenant stage configuration diff --git a/internal/component/loki/process/stages/timestamp.go b/internal/component/loki/process/stages/timestamp.go index 7bb19c50e6..e7f8d12e98 100644 --- a/internal/component/loki/process/stages/timestamp.go +++ b/internal/component/loki/process/stages/timestamp.go @@ -44,11 +44,11 @@ var TimestampActionOnFailureOptions = []string{TimestampActionOnFailureSkip, Tim // TimestampConfig configures a processing stage for timestamp extraction. type TimestampConfig struct { - Source string `river:"source,attr"` - Format string `river:"format,attr"` - FallbackFormats []string `river:"fallback_formats,attr,optional"` - Location *string `river:"location,attr,optional"` - ActionOnFailure string `river:"action_on_failure,attr,optional"` + Source string `alloy:"source,attr"` + Format string `alloy:"format,attr"` + FallbackFormats []string `alloy:"fallback_formats,attr,optional"` + Location *string `alloy:"location,attr,optional"` + ActionOnFailure string `alloy:"action_on_failure,attr,optional"` } type parser func(string) (time.Time, error) diff --git a/internal/component/loki/relabel/relabel.go b/internal/component/loki/relabel/relabel.go index 1d79993dea..1da52e9d77 100644 --- a/internal/component/loki/relabel/relabel.go +++ b/internal/component/loki/relabel/relabel.go @@ -32,13 +32,13 @@ func init() { // component. type Arguments struct { // Where the relabeled metrics should be forwarded to. - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` // The relabelling rules to apply to each log entry before it's forwarded. - RelabelConfigs []*flow_relabel.Config `river:"rule,block,optional"` + RelabelConfigs []*flow_relabel.Config `alloy:"rule,block,optional"` // The maximum number of items to hold in the component's LRU cache. - MaxCacheSize int `river:"max_cache_size,attr,optional"` + MaxCacheSize int `alloy:"max_cache_size,attr,optional"` } // DefaultArguments provides the default arguments for the loki.relabel @@ -54,8 +54,8 @@ func (a *Arguments) SetToDefault() { // Exports holds values which are exported by the loki.relabel component. type Exports struct { - Receiver loki.LogsReceiver `river:"receiver,attr"` - Rules flow_relabel.Rules `river:"rules,attr"` + Receiver loki.LogsReceiver `alloy:"receiver,attr"` + Rules flow_relabel.Rules `alloy:"rules,attr"` } // Component implements the loki.relabel component. diff --git a/internal/component/loki/relabel/relabel_test.go b/internal/component/loki/relabel/relabel_test.go index 54a3c2f079..bb123fc2a6 100644 --- a/internal/component/loki/relabel/relabel_test.go +++ b/internal/component/loki/relabel/relabel_test.go @@ -45,7 +45,7 @@ func TestRelabeling(t *testing.T) { // an easy way to refer to a loki.LogsReceiver value for the forward_to // argument. type cfg struct { - Rcs []*flow_relabel.Config `river:"rule,block,optional"` + Rcs []*flow_relabel.Config `alloy:"rule,block,optional"` } var relabelConfigs cfg err := syntax.Unmarshal([]byte(rc), &relabelConfigs) @@ -108,7 +108,7 @@ func TestRelabeling(t *testing.T) { func BenchmarkRelabelComponent(b *testing.B) { type cfg struct { - Rcs []*flow_relabel.Config `river:"rule,block,optional"` + Rcs []*flow_relabel.Config `alloy:"rule,block,optional"` } var relabelConfigs cfg _ = syntax.Unmarshal([]byte(rc), &relabelConfigs) @@ -154,7 +154,7 @@ func BenchmarkRelabelComponent(b *testing.B) { func TestCache(t *testing.T) { type cfg struct { - Rcs []*flow_relabel.Config `river:"rule,block,optional"` + Rcs []*flow_relabel.Config `alloy:"rule,block,optional"` } var relabelConfigs cfg err := syntax.Unmarshal([]byte(rc), &relabelConfigs) diff --git a/internal/component/loki/rules/kubernetes/debug.go b/internal/component/loki/rules/kubernetes/debug.go index eb4f587ecd..ced336833f 100644 --- a/internal/component/loki/rules/kubernetes/debug.go +++ b/internal/component/loki/rules/kubernetes/debug.go @@ -3,21 +3,21 @@ package rules import "fmt" type DebugInfo struct { - Error string `river:"error,attr,optional"` - PrometheusRules []DebugK8sPrometheusRule `river:"prometheus_rule,block,optional"` - LokiRuleNamespaces []DebugLokiNamespace `river:"loki_rule_namespace,block,optional"` + Error string `alloy:"error,attr,optional"` + PrometheusRules []DebugK8sPrometheusRule `alloy:"prometheus_rule,block,optional"` + LokiRuleNamespaces []DebugLokiNamespace `alloy:"loki_rule_namespace,block,optional"` } type DebugK8sPrometheusRule struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - UID string `river:"uid,attr"` - NumRuleGroups int `river:"num_rule_groups,attr"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + UID string `alloy:"uid,attr"` + NumRuleGroups int `alloy:"num_rule_groups,attr"` } type DebugLokiNamespace struct { - Name string `river:"name,attr"` - NumRuleGroups int `river:"num_rule_groups,attr"` + Name string `alloy:"name,attr"` + NumRuleGroups int `alloy:"num_rule_groups,attr"` } func (c *Component) DebugInfo() interface{} { diff --git a/internal/component/loki/rules/kubernetes/types.go b/internal/component/loki/rules/kubernetes/types.go index b98db47196..1cb84f96ea 100644 --- a/internal/component/loki/rules/kubernetes/types.go +++ b/internal/component/loki/rules/kubernetes/types.go @@ -9,15 +9,15 @@ import ( ) type Arguments struct { - Address string `river:"address,attr"` - TenantID string `river:"tenant_id,attr,optional"` - UseLegacyRoutes bool `river:"use_legacy_routes,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - SyncInterval time.Duration `river:"sync_interval,attr,optional"` - LokiNameSpacePrefix string `river:"loki_namespace_prefix,attr,optional"` - - RuleSelector kubernetes.LabelSelector `river:"rule_selector,block,optional"` - RuleNamespaceSelector kubernetes.LabelSelector `river:"rule_namespace_selector,block,optional"` + Address string `alloy:"address,attr"` + TenantID string `alloy:"tenant_id,attr,optional"` + UseLegacyRoutes bool `alloy:"use_legacy_routes,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + SyncInterval time.Duration `alloy:"sync_interval,attr,optional"` + LokiNameSpacePrefix string `alloy:"loki_namespace_prefix,attr,optional"` + + RuleSelector kubernetes.LabelSelector `alloy:"rule_selector,block,optional"` + RuleNamespaceSelector kubernetes.LabelSelector `alloy:"rule_namespace_selector,block,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/loki/source/api/api.go b/internal/component/loki/source/api/api.go index 33159ab84b..cf3002ab65 100644 --- a/internal/component/loki/source/api/api.go +++ b/internal/component/loki/source/api/api.go @@ -29,11 +29,11 @@ func init() { } type Arguments struct { - Server *fnet.ServerConfig `river:",squash"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - Labels map[string]string `river:"labels,attr,optional"` - RelabelRules relabel.Rules `river:"relabel_rules,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` + Server *fnet.ServerConfig `alloy:",squash"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` + RelabelRules relabel.Rules `alloy:"relabel_rules,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/source/aws_firehose/component.go b/internal/component/loki/source/aws_firehose/component.go index cd23ceb6a8..7088056e2e 100644 --- a/internal/component/loki/source/aws_firehose/component.go +++ b/internal/component/loki/source/aws_firehose/component.go @@ -34,11 +34,11 @@ func init() { } type Arguments struct { - Server *fnet.ServerConfig `river:",squash"` - AccessKey alloytypes.Secret `river:"access_key,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` + Server *fnet.ServerConfig `alloy:",squash"` + AccessKey alloytypes.Secret `alloy:"access_key,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go b/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go index 1a35824c14..fe1c9b451e 100644 --- a/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go +++ b/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go @@ -33,26 +33,26 @@ func init() { // Arguments holds values which are used to configure the loki.source.azure_event_hubs component. type Arguments struct { - FullyQualifiedNamespace string `river:"fully_qualified_namespace,attr"` - EventHubs []string `river:"event_hubs,attr"` + FullyQualifiedNamespace string `alloy:"fully_qualified_namespace,attr"` + EventHubs []string `alloy:"event_hubs,attr"` - Authentication AzureEventHubsAuthentication `river:"authentication,block"` + Authentication AzureEventHubsAuthentication `alloy:"authentication,block"` - GroupID string `river:"group_id,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - DisallowCustomMessages bool `river:"disallow_custom_messages,attr,optional"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` - Labels map[string]string `river:"labels,attr,optional"` - Assignor string `river:"assignor,attr,optional"` + GroupID string `alloy:"group_id,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + DisallowCustomMessages bool `alloy:"disallow_custom_messages,attr,optional"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` + Assignor string `alloy:"assignor,attr,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` } // AzureEventHubsAuthentication describe the configuration for authentication with Azure Event Hub type AzureEventHubsAuthentication struct { - Mechanism string `river:"mechanism,attr"` - Scopes []string `river:"scopes,attr,optional"` - ConnectionString string `river:"connection_string,attr,optional"` + Mechanism string `alloy:"mechanism,attr"` + Scopes []string `alloy:"scopes,attr,optional"` + ConnectionString string `alloy:"connection_string,attr,optional"` } func getDefault() Arguments { diff --git a/internal/component/loki/source/cloudflare/cloudflare.go b/internal/component/loki/source/cloudflare/cloudflare.go index 718ef89e07..2fcdc62ff0 100644 --- a/internal/component/loki/source/cloudflare/cloudflare.go +++ b/internal/component/loki/source/cloudflare/cloudflare.go @@ -38,14 +38,14 @@ func init() { // Arguments holds values which are used to configure the // loki.source.cloudflare component. type Arguments struct { - APIToken alloytypes.Secret `river:"api_token,attr"` - ZoneID string `river:"zone_id,attr"` - Labels map[string]string `river:"labels,attr,optional"` - Workers int `river:"workers,attr,optional"` - PullRange time.Duration `river:"pull_range,attr,optional"` - FieldsType string `river:"fields_type,attr,optional"` - AdditionalFields []string `river:"additional_fields,attr,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + APIToken alloytypes.Secret `alloy:"api_token,attr"` + ZoneID string `alloy:"zone_id,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` + Workers int `alloy:"workers,attr,optional"` + PullRange time.Duration `alloy:"pull_range,attr,optional"` + FieldsType string `alloy:"fields_type,attr,optional"` + AdditionalFields []string `alloy:"additional_fields,attr,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` } // Convert returns a cloudflaretarget Config struct from the Arguments. @@ -196,6 +196,6 @@ func (c *Component) DebugInfo() interface{} { } type targetDebugInfo struct { - Ready bool `river:"ready,attr"` - Details map[string]string `river:"target_info,attr"` + Ready bool `alloy:"ready,attr"` + Details map[string]string `alloy:"target_info,attr"` } diff --git a/internal/component/loki/source/docker/docker.go b/internal/component/loki/source/docker/docker.go index d1b1430db7..809f8e1219 100644 --- a/internal/component/loki/source/docker/docker.go +++ b/internal/component/loki/source/docker/docker.go @@ -53,13 +53,13 @@ const ( // Arguments holds values which are used to configure the loki.source.docker // component. type Arguments struct { - Host string `river:"host,attr"` - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - Labels map[string]string `river:"labels,attr,optional"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` - HTTPClientConfig *types.HTTPClientConfig `river:"http_client_config,block,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` + Host string `alloy:"host,attr"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` + HTTPClientConfig *types.HTTPClientConfig `alloy:"http_client_config,block,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` } // GetDefaultArguments return an instance of Arguments with the optional fields @@ -328,13 +328,13 @@ func (c *Component) DebugInfo() interface{} { } type readerDebugInfo struct { - TargetsInfo []targetInfo `river:"targets_info,block"` + TargetsInfo []targetInfo `alloy:"targets_info,block"` } type targetInfo struct { - ID string `river:"id,attr"` - LastError string `river:"last_error,attr"` - Labels string `river:"labels,attr"` - IsRunning string `river:"is_running,attr"` - ReadOffset string `river:"read_offset,attr"` + ID string `alloy:"id,attr"` + LastError string `alloy:"last_error,attr"` + Labels string `alloy:"labels,attr"` + IsRunning string `alloy:"is_running,attr"` + ReadOffset string `alloy:"read_offset,attr"` } diff --git a/internal/component/loki/source/file/file.go b/internal/component/loki/source/file/file.go index 63598afe86..3c418d9981 100644 --- a/internal/component/loki/source/file/file.go +++ b/internal/component/loki/source/file/file.go @@ -39,17 +39,17 @@ const ( // Arguments holds values which are used to configure the loki.source.file // component. type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - Encoding string `river:"encoding,attr,optional"` - DecompressionConfig DecompressionConfig `river:"decompression,block,optional"` - FileWatch FileWatch `river:"file_watch,block,optional"` - TailFromEnd bool `river:"tail_from_end,attr,optional"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + Encoding string `alloy:"encoding,attr,optional"` + DecompressionConfig DecompressionConfig `alloy:"decompression,block,optional"` + FileWatch FileWatch `alloy:"file_watch,block,optional"` + TailFromEnd bool `alloy:"tail_from_end,attr,optional"` } type FileWatch struct { - MinPollFrequency time.Duration `river:"min_poll_frequency,attr,optional"` - MaxPollFrequency time.Duration `river:"max_poll_frequency,attr,optional"` + MinPollFrequency time.Duration `alloy:"min_poll_frequency,attr,optional"` + MaxPollFrequency time.Duration `alloy:"max_poll_frequency,attr,optional"` } var DefaultArguments = Arguments{ @@ -65,9 +65,9 @@ func (a *Arguments) SetToDefault() { } type DecompressionConfig struct { - Enabled bool `river:"enabled,attr"` - InitialDelay time.Duration `river:"initial_delay,attr,optional"` - Format CompressionFormat `river:"format,attr"` + Enabled bool `alloy:"enabled,attr"` + InitialDelay time.Duration `alloy:"initial_delay,attr,optional"` + Format CompressionFormat `alloy:"format,attr"` } var ( @@ -280,14 +280,14 @@ func (c *Component) DebugInfo() interface{} { } type readerDebugInfo struct { - TargetsInfo []targetInfo `river:"targets_info,block"` + TargetsInfo []targetInfo `alloy:"targets_info,block"` } type targetInfo struct { - Path string `river:"path,attr"` - Labels string `river:"labels,attr"` - IsRunning bool `river:"is_running,attr"` - ReadOffset int64 `river:"read_offset,attr"` + Path string `alloy:"path,attr"` + Labels string `alloy:"labels,attr"` + IsRunning bool `alloy:"is_running,attr"` + ReadOffset int64 `alloy:"read_offset,attr"` } // Returns the elements from set b which are missing from set a diff --git a/internal/component/loki/source/gcplog/gcplog.go b/internal/component/loki/source/gcplog/gcplog.go index 1d8c5aaa6f..f7ebd670ad 100644 --- a/internal/component/loki/source/gcplog/gcplog.go +++ b/internal/component/loki/source/gcplog/gcplog.go @@ -34,10 +34,10 @@ func init() { // Arguments holds values which are used to configure the loki.source.gcplog // component. type Arguments struct { - PullTarget *gcptypes.PullConfig `river:"pull,block,optional"` - PushTarget *gcptypes.PushConfig `river:"push,block,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` + PullTarget *gcptypes.PullConfig `alloy:"pull,block,optional"` + PushTarget *gcptypes.PushConfig `alloy:"push,block,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -171,5 +171,5 @@ func (c *Component) DebugInfo() interface{} { } type targetDebugInfo struct { - Details map[string]string `river:"target_info,attr"` + Details map[string]string `alloy:"target_info,attr"` } diff --git a/internal/component/loki/source/gcplog/gcptypes/gcptypes.go b/internal/component/loki/source/gcplog/gcptypes/gcptypes.go index 3008c7b0d9..dad7d8e0a9 100644 --- a/internal/component/loki/source/gcplog/gcptypes/gcptypes.go +++ b/internal/component/loki/source/gcplog/gcptypes/gcptypes.go @@ -9,20 +9,20 @@ import ( // PullConfig configures a GCPLog target with the 'pull' strategy. type PullConfig struct { - ProjectID string `river:"project_id,attr"` - Subscription string `river:"subscription,attr"` - Labels map[string]string `river:"labels,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - UseFullLine bool `river:"use_full_line,attr,optional"` + ProjectID string `alloy:"project_id,attr"` + Subscription string `alloy:"subscription,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + UseFullLine bool `alloy:"use_full_line,attr,optional"` } // PushConfig configures a GCPLog target with the 'push' strategy. type PushConfig struct { - Server *fnet.ServerConfig `river:",squash"` - PushTimeout time.Duration `river:"push_timeout,attr,optional"` - Labels map[string]string `river:"labels,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - UseFullLine bool `river:"use_full_line,attr,optional"` + Server *fnet.ServerConfig `alloy:",squash"` + PushTimeout time.Duration `alloy:"push_timeout,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + UseFullLine bool `alloy:"use_full_line,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/source/gelf/gelf.go b/internal/component/loki/source/gelf/gelf.go index c1a1815779..ea889322d3 100644 --- a/internal/component/loki/source/gelf/gelf.go +++ b/internal/component/loki/source/gelf/gelf.go @@ -92,10 +92,10 @@ func (c *Component) Update(args component.Arguments) error { // Arguments are the arguments for the component. type Arguments struct { // ListenAddress only supports UDP. - ListenAddress string `river:"listen_address,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` - Receivers []loki.LogsReceiver `river:"forward_to,attr"` + ListenAddress string `alloy:"listen_address,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` + Receivers []loki.LogsReceiver `alloy:"forward_to,attr"` } func defaultArgs() Arguments { diff --git a/internal/component/loki/source/heroku/heroku.go b/internal/component/loki/source/heroku/heroku.go index 9acf470109..d551b1cf80 100644 --- a/internal/component/loki/source/heroku/heroku.go +++ b/internal/component/loki/source/heroku/heroku.go @@ -33,11 +33,11 @@ func init() { // Arguments holds values which are used to configure the loki.source.heroku // component. type Arguments struct { - Server *fnet.ServerConfig `river:",squash"` - Labels map[string]string `river:"labels,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` + Server *fnet.ServerConfig `alloy:",squash"` + Labels map[string]string `alloy:"labels,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -187,8 +187,8 @@ func (c *Component) DebugInfo() interface{} { } type readerDebugInfo struct { - Ready bool `river:"ready,attr"` - Address string `river:"address,attr"` + Ready bool `alloy:"ready,attr"` + Address string `alloy:"address,attr"` } func changed(prev, next any) bool { diff --git a/internal/component/loki/source/journal/types.go b/internal/component/loki/source/journal/types.go index 7ba03adab0..648f7e7cfd 100644 --- a/internal/component/loki/source/journal/types.go +++ b/internal/component/loki/source/journal/types.go @@ -9,13 +9,13 @@ import ( // Arguments are the arguments for the component. type Arguments struct { - FormatAsJson bool `river:"format_as_json,attr,optional"` - MaxAge time.Duration `river:"max_age,attr,optional"` - Path string `river:"path,attr,optional"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` - Matches string `river:"matches,attr,optional"` - Receivers []loki.LogsReceiver `river:"forward_to,attr"` - Labels map[string]string `river:"labels,attr,optional"` + FormatAsJson bool `alloy:"format_as_json,attr,optional"` + MaxAge time.Duration `alloy:"max_age,attr,optional"` + Path string `alloy:"path,attr,optional"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` + Matches string `alloy:"matches,attr,optional"` + Receivers []loki.LogsReceiver `alloy:"forward_to,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` } func defaultArgs() Arguments { diff --git a/internal/component/loki/source/kafka/kafka.go b/internal/component/loki/source/kafka/kafka.go index 5ac0240545..a22c3141a5 100644 --- a/internal/component/loki/source/kafka/kafka.go +++ b/internal/component/loki/source/kafka/kafka.go @@ -32,39 +32,39 @@ func init() { // Arguments holds values which are used to configure the loki.source.kafka // component. type Arguments struct { - Brokers []string `river:"brokers,attr"` - Topics []string `river:"topics,attr"` - GroupID string `river:"group_id,attr,optional"` - Assignor string `river:"assignor,attr,optional"` - Version string `river:"version,attr,optional"` - Authentication KafkaAuthentication `river:"authentication,block,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - Labels map[string]string `river:"labels,attr,optional"` - - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` + Brokers []string `alloy:"brokers,attr"` + Topics []string `alloy:"topics,attr"` + GroupID string `alloy:"group_id,attr,optional"` + Assignor string `alloy:"assignor,attr,optional"` + Version string `alloy:"version,attr,optional"` + Authentication KafkaAuthentication `alloy:"authentication,block,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` + + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` } // KafkaAuthentication describe the configuration for authentication with Kafka brokers type KafkaAuthentication struct { - Type string `river:"type,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` - SASLConfig KafkaSASLConfig `river:"sasl_config,block,optional"` + Type string `alloy:"type,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` + SASLConfig KafkaSASLConfig `alloy:"sasl_config,block,optional"` } // KafkaSASLConfig describe the SASL configuration for authentication with Kafka brokers type KafkaSASLConfig struct { - Mechanism string `river:"mechanism,attr,optional"` - User string `river:"user,attr,optional"` - Password alloytypes.Secret `river:"password,attr,optional"` - UseTLS bool `river:"use_tls,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` - OAuthConfig OAuthConfigConfig `river:"oauth_config,block,optional"` + Mechanism string `alloy:"mechanism,attr,optional"` + User string `alloy:"user,attr,optional"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + UseTLS bool `alloy:"use_tls,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` + OAuthConfig OAuthConfigConfig `alloy:"oauth_config,block,optional"` } type OAuthConfigConfig struct { - TokenProvider string `river:"token_provider,attr"` - Scopes []string `river:"scopes,attr"` + TokenProvider string `alloy:"token_provider,attr"` + Scopes []string `alloy:"scopes,attr"` } // DefaultArguments provides the default arguments for a kafka component. diff --git a/internal/component/loki/source/kubernetes/kubernetes.go b/internal/component/loki/source/kubernetes/kubernetes.go index 577f362cb5..012e9082a8 100644 --- a/internal/component/loki/source/kubernetes/kubernetes.go +++ b/internal/component/loki/source/kubernetes/kubernetes.go @@ -38,13 +38,13 @@ func init() { // Arguments holds values which are used to configure the loki.source.kubernetes // component. type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` // Client settings to connect to Kubernetes. - Client commonk8s.ClientArguments `river:"client,block,optional"` + Client commonk8s.ClientArguments `alloy:"client,block,optional"` - Clustering cluster.ComponentBlock `river:"clustering,block,optional"` + Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"` } // DefaultArguments holds default settings for loki.source.kubernetes. @@ -269,14 +269,14 @@ func (c *Component) DebugInfo() interface{} { // DebugInfo represents debug information for loki.source.kubernetes. type DebugInfo struct { - Targets []DebugInfoTarget `river:"target,block,optional"` + Targets []DebugInfoTarget `alloy:"target,block,optional"` } // DebugInfoTarget is debug information for an individual target being tailed // for logs. type DebugInfoTarget struct { - Labels map[string]string `river:"labels,attr,optional"` - DiscoveryLabels map[string]string `river:"discovery_labels,attr,optional"` - LastError string `river:"last_error,attr,optional"` - UpdateTime time.Time `river:"update_time,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` + DiscoveryLabels map[string]string `alloy:"discovery_labels,attr,optional"` + LastError string `alloy:"last_error,attr,optional"` + UpdateTime time.Time `alloy:"update_time,attr,optional"` } diff --git a/internal/component/loki/source/kubernetes_events/event_controller.go b/internal/component/loki/source/kubernetes_events/event_controller.go index d3416178a7..1a1bd4fdf4 100644 --- a/internal/component/loki/source/kubernetes_events/event_controller.go +++ b/internal/component/loki/source/kubernetes_events/event_controller.go @@ -344,6 +344,6 @@ func (ctrl *eventController) DebugInfo() controllerInfo { } type controllerInfo struct { - Namespace string `river:"namespace,attr"` - LastTimestamp time.Time `river:"last_event_timestamp,attr"` + Namespace string `alloy:"namespace,attr"` + LastTimestamp time.Time `alloy:"last_event_timestamp,attr"` } diff --git a/internal/component/loki/source/kubernetes_events/kubernetes_events.go b/internal/component/loki/source/kubernetes_events/kubernetes_events.go index 8c52be0507..0f860d789b 100644 --- a/internal/component/loki/source/kubernetes_events/kubernetes_events.go +++ b/internal/component/loki/source/kubernetes_events/kubernetes_events.go @@ -41,14 +41,14 @@ func init() { // Arguments holds values which are used to configure the // loki.source.kubernetes_events component. type Arguments struct { - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` - JobName string `river:"job_name,attr,optional"` - Namespaces []string `river:"namespaces,attr,optional"` - LogFormat string `river:"log_format,attr,optional"` + JobName string `alloy:"job_name,attr,optional"` + Namespaces []string `alloy:"namespaces,attr,optional"` + LogFormat string `alloy:"log_format,attr,optional"` // Client settings to connect to Kubernetes. - Client kubernetes.ClientArguments `river:"client,block,optional"` + Client kubernetes.ClientArguments `alloy:"client,block,optional"` } // DefaultArguments holds default settings for loki.source.kubernetes_events. @@ -248,7 +248,7 @@ func getNamespaces(args Arguments) []string { // DebugInfo implements [component.DebugComponent]. func (c *Component) DebugInfo() interface{} { type Info struct { - Controllers []controllerInfo `river:"event_controller,block,optional"` + Controllers []controllerInfo `alloy:"event_controller,block,optional"` } var info Info diff --git a/internal/component/loki/source/podlogs/podlogs.go b/internal/component/loki/source/podlogs/podlogs.go index 2577f8c18a..94323cc16a 100644 --- a/internal/component/loki/source/podlogs/podlogs.go +++ b/internal/component/loki/source/podlogs/podlogs.go @@ -40,15 +40,15 @@ func init() { // Arguments holds values which are used to configure the loki.source.podlogs // component. type Arguments struct { - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` // Client settings to connect to Kubernetes. - Client commonk8s.ClientArguments `river:"client,block,optional"` + Client commonk8s.ClientArguments `alloy:"client,block,optional"` - Selector config.LabelSelector `river:"selector,block,optional"` - NamespaceSelector config.LabelSelector `river:"namespace_selector,block,optional"` + Selector config.LabelSelector `alloy:"selector,block,optional"` + NamespaceSelector config.LabelSelector `alloy:"namespace_selector,block,optional"` - Clustering cluster.ComponentBlock `river:"clustering,block,optional"` + Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"` } // DefaultArguments holds default settings for loki.source.kubernetes. @@ -326,6 +326,6 @@ func (c *Component) DebugInfo() interface{} { // DebugInfo stores debug information for loki.source.podlogs. type DebugInfo struct { - DiscoveredPodLogs []DiscoveredPodLogs `river:"pod_logs,block"` - Targets []kubernetes.DebugInfoTarget `river:"target,block,optional"` + DiscoveredPodLogs []DiscoveredPodLogs `alloy:"pod_logs,block"` + Targets []kubernetes.DebugInfoTarget `alloy:"target,block,optional"` } diff --git a/internal/component/loki/source/podlogs/reconciler.go b/internal/component/loki/source/podlogs/reconciler.go index 0ece93eec1..7f79807b6f 100644 --- a/internal/component/loki/source/podlogs/reconciler.go +++ b/internal/component/loki/source/podlogs/reconciler.go @@ -361,24 +361,24 @@ func podReady(pod *corev1.Pod) model.LabelValue { } type DiscoveredPodLogs struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - LastReconcile time.Time `river:"last_reconcile,attr,optional"` - ReconcileError string `river:"reconcile_error,attr,optional"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + LastReconcile time.Time `alloy:"last_reconcile,attr,optional"` + ReconcileError string `alloy:"reconcile_error,attr,optional"` - Pods []DiscoveredPod `river:"pod,block"` + Pods []DiscoveredPod `alloy:"pod,block"` } type DiscoveredPod struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - ReconcileError string `river:"reconcile_error,attr,optional"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + ReconcileError string `alloy:"reconcile_error,attr,optional"` - Containers []DiscoveredContainer `river:"container,block"` + Containers []DiscoveredContainer `alloy:"container,block"` } type DiscoveredContainer struct { - DiscoveredLabels map[string]string `river:"discovered_labels,attr"` - Labels map[string]string `river:"labels,attr"` - ReconcileError string `river:"reconcile_error,attr,optional"` + DiscoveredLabels map[string]string `alloy:"discovered_labels,attr"` + Labels map[string]string `alloy:"labels,attr"` + ReconcileError string `alloy:"reconcile_error,attr,optional"` } diff --git a/internal/component/loki/source/syslog/syslog.go b/internal/component/loki/source/syslog/syslog.go index f207c68dde..296a75453c 100644 --- a/internal/component/loki/source/syslog/syslog.go +++ b/internal/component/loki/source/syslog/syslog.go @@ -29,9 +29,9 @@ func init() { // Arguments holds values which are used to configure the loki.source.syslog // component. type Arguments struct { - SyslogListeners []ListenerConfig `river:"listener,block"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - RelabelRules flow_relabel.Rules `river:"relabel_rules,attr,optional"` + SyslogListeners []ListenerConfig `alloy:"listener,block"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + RelabelRules flow_relabel.Rules `alloy:"relabel_rules,attr,optional"` } // Component implements the loki.source.syslog component. @@ -146,14 +146,14 @@ func (c *Component) DebugInfo() interface{} { } type readerDebugInfo struct { - ListenersInfo []listenerInfo `river:"listeners_info,attr"` + ListenersInfo []listenerInfo `alloy:"listeners_info,attr"` } type listenerInfo struct { - Type string `river:"type,attr"` - Ready bool `river:"ready,attr"` - ListenAddress string `river:"listen_address,attr"` - Labels string `river:"labels,attr"` + Type string `alloy:"type,attr"` + Ready bool `alloy:"ready,attr"` + ListenAddress string `alloy:"listen_address,attr"` + Labels string `alloy:"labels,attr"` } func listenersChanged(prev, next []ListenerConfig) bool { diff --git a/internal/component/loki/source/syslog/types.go b/internal/component/loki/source/syslog/types.go index 461404f241..afc617ac32 100644 --- a/internal/component/loki/source/syslog/types.go +++ b/internal/component/loki/source/syslog/types.go @@ -12,15 +12,15 @@ import ( // ListenerConfig defines a syslog listener. type ListenerConfig struct { - ListenAddress string `river:"address,attr"` - ListenProtocol string `river:"protocol,attr,optional"` - IdleTimeout time.Duration `river:"idle_timeout,attr,optional"` - LabelStructuredData bool `river:"label_structured_data,attr,optional"` - Labels map[string]string `river:"labels,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - UseRFC5424Message bool `river:"use_rfc5424_message,attr,optional"` - MaxMessageLength int `river:"max_message_length,attr,optional"` - TLSConfig config.TLSConfig `river:"tls_config,block,optional"` + ListenAddress string `alloy:"address,attr"` + ListenProtocol string `alloy:"protocol,attr,optional"` + IdleTimeout time.Duration `alloy:"idle_timeout,attr,optional"` + LabelStructuredData bool `alloy:"label_structured_data,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + UseRFC5424Message bool `alloy:"use_rfc5424_message,attr,optional"` + MaxMessageLength int `alloy:"max_message_length,attr,optional"` + TLSConfig config.TLSConfig `alloy:"tls_config,block,optional"` } // DefaultListenerConfig provides the default arguments for a syslog listener. diff --git a/internal/component/loki/source/windowsevent/arguments.go b/internal/component/loki/source/windowsevent/arguments.go index 8c26ed1e1e..eff4af2889 100644 --- a/internal/component/loki/source/windowsevent/arguments.go +++ b/internal/component/loki/source/windowsevent/arguments.go @@ -13,17 +13,17 @@ import ( // Arguments holds values which are used to configure the loki.source.windowsevent // component. type Arguments struct { - Locale int `river:"locale,attr,optional"` - EventLogName string `river:"eventlog_name,attr,optional"` - XPathQuery string `river:"xpath_query,attr,optional"` - BookmarkPath string `river:"bookmark_path,attr,optional"` - PollInterval time.Duration `river:"poll_interval,attr,optional"` - ExcludeEventData bool `river:"exclude_event_data,attr,optional"` - ExcludeUserdata bool `river:"exclude_user_data,attr,optional"` - ExcludeEventMessage bool `river:"exclude_event_message,attr,optional"` - UseIncomingTimestamp bool `river:"use_incoming_timestamp,attr,optional"` - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` - Labels map[string]string `river:"labels,attr,optional"` + Locale int `alloy:"locale,attr,optional"` + EventLogName string `alloy:"eventlog_name,attr,optional"` + XPathQuery string `alloy:"xpath_query,attr,optional"` + BookmarkPath string `alloy:"bookmark_path,attr,optional"` + PollInterval time.Duration `alloy:"poll_interval,attr,optional"` + ExcludeEventData bool `alloy:"exclude_event_data,attr,optional"` + ExcludeUserdata bool `alloy:"exclude_user_data,attr,optional"` + ExcludeEventMessage bool `alloy:"exclude_event_message,attr,optional"` + UseIncomingTimestamp bool `alloy:"use_incoming_timestamp,attr,optional"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` + Labels map[string]string `alloy:"labels,attr,optional"` } func defaultArgs() Arguments { diff --git a/internal/component/loki/write/types.go b/internal/component/loki/write/types.go index 766f521d6b..9c73c88fde 100644 --- a/internal/component/loki/write/types.go +++ b/internal/component/loki/write/types.go @@ -17,19 +17,19 @@ import ( // EndpointOptions describes an individual location to send logs to. type EndpointOptions struct { - Name string `river:"name,attr,optional"` - URL string `river:"url,attr"` - BatchWait time.Duration `river:"batch_wait,attr,optional"` - BatchSize units.Base2Bytes `river:"batch_size,attr,optional"` - RemoteTimeout time.Duration `river:"remote_timeout,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - MinBackoff time.Duration `river:"min_backoff_period,attr,optional"` // start backoff at this level - MaxBackoff time.Duration `river:"max_backoff_period,attr,optional"` // increase exponentially to this level - MaxBackoffRetries int `river:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries - TenantID string `river:"tenant_id,attr,optional"` - RetryOnHTTP429 bool `river:"retry_on_http_429,attr,optional"` - HTTPClientConfig *types.HTTPClientConfig `river:",squash"` - QueueConfig QueueConfig `river:"queue_config,block,optional"` + Name string `alloy:"name,attr,optional"` + URL string `alloy:"url,attr"` + BatchWait time.Duration `alloy:"batch_wait,attr,optional"` + BatchSize units.Base2Bytes `alloy:"batch_size,attr,optional"` + RemoteTimeout time.Duration `alloy:"remote_timeout,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + MinBackoff time.Duration `alloy:"min_backoff_period,attr,optional"` // start backoff at this level + MaxBackoff time.Duration `alloy:"max_backoff_period,attr,optional"` // increase exponentially to this level + MaxBackoffRetries int `alloy:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries + TenantID string `alloy:"tenant_id,attr,optional"` + RetryOnHTTP429 bool `alloy:"retry_on_http_429,attr,optional"` + HTTPClientConfig *types.HTTPClientConfig `alloy:",squash"` + QueueConfig QueueConfig `alloy:"queue_config,block,optional"` } // GetDefaultEndpointOptions defines the default settings for sending logs to a @@ -74,8 +74,8 @@ func (r *EndpointOptions) Validate() error { // QueueConfig controls how the queue logs remote write client is configured. Note that this client is only used when the // loki.write component has WAL support enabled. type QueueConfig struct { - Capacity units.Base2Bytes `river:"capacity,attr,optional"` - DrainTimeout time.Duration `river:"drain_timeout,attr,optional"` + Capacity units.Base2Bytes `alloy:"capacity,attr,optional"` + DrainTimeout time.Duration `alloy:"drain_timeout,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/loki/write/write.go b/internal/component/loki/write/write.go index 1d057bafc8..59b1d8560f 100644 --- a/internal/component/loki/write/write.go +++ b/internal/component/loki/write/write.go @@ -31,20 +31,20 @@ func init() { // Arguments holds values which are used to configure the loki.write component. type Arguments struct { - Endpoints []EndpointOptions `river:"endpoint,block,optional"` - ExternalLabels map[string]string `river:"external_labels,attr,optional"` - MaxStreams int `river:"max_streams,attr,optional"` - WAL WalArguments `river:"wal,block,optional"` + Endpoints []EndpointOptions `alloy:"endpoint,block,optional"` + ExternalLabels map[string]string `alloy:"external_labels,attr,optional"` + MaxStreams int `alloy:"max_streams,attr,optional"` + WAL WalArguments `alloy:"wal,block,optional"` } // WalArguments holds the settings for configuring the Write-Ahead Log (WAL) used // by the underlying remote write client. type WalArguments struct { - Enabled bool `river:"enabled,attr,optional"` - MaxSegmentAge time.Duration `river:"max_segment_age,attr,optional"` - MinReadFrequency time.Duration `river:"min_read_frequency,attr,optional"` - MaxReadFrequency time.Duration `river:"max_read_frequency,attr,optional"` - DrainTimeout time.Duration `river:"drain_timeout,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + MaxSegmentAge time.Duration `alloy:"max_segment_age,attr,optional"` + MinReadFrequency time.Duration `alloy:"min_read_frequency,attr,optional"` + MaxReadFrequency time.Duration `alloy:"max_read_frequency,attr,optional"` + DrainTimeout time.Duration `alloy:"drain_timeout,attr,optional"` } func (wa *WalArguments) Validate() error { @@ -69,7 +69,7 @@ func (wa *WalArguments) SetToDefault() { // Exports holds the receiver that is used to send log entries to the // loki.write component. type Exports struct { - Receiver loki.LogsReceiver `river:"receiver,attr"` + Receiver loki.LogsReceiver `alloy:"receiver,attr"` } var ( diff --git a/internal/component/mimir/rules/kubernetes/debug.go b/internal/component/mimir/rules/kubernetes/debug.go index 59b5103858..00828739c7 100644 --- a/internal/component/mimir/rules/kubernetes/debug.go +++ b/internal/component/mimir/rules/kubernetes/debug.go @@ -3,21 +3,21 @@ package rules import "fmt" type DebugInfo struct { - Error string `river:"error,attr,optional"` - PrometheusRules []DebugK8sPrometheusRule `river:"prometheus_rule,block,optional"` - MimirRuleNamespaces []DebugMimirNamespace `river:"mimir_rule_namespace,block,optional"` + Error string `alloy:"error,attr,optional"` + PrometheusRules []DebugK8sPrometheusRule `alloy:"prometheus_rule,block,optional"` + MimirRuleNamespaces []DebugMimirNamespace `alloy:"mimir_rule_namespace,block,optional"` } type DebugK8sPrometheusRule struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - UID string `river:"uid,attr"` - NumRuleGroups int `river:"num_rule_groups,attr"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + UID string `alloy:"uid,attr"` + NumRuleGroups int `alloy:"num_rule_groups,attr"` } type DebugMimirNamespace struct { - Name string `river:"name,attr"` - NumRuleGroups int `river:"num_rule_groups,attr"` + Name string `alloy:"name,attr"` + NumRuleGroups int `alloy:"num_rule_groups,attr"` } func (c *Component) DebugInfo() interface{} { diff --git a/internal/component/mimir/rules/kubernetes/types.go b/internal/component/mimir/rules/kubernetes/types.go index 564d6b4f0e..701751a1db 100644 --- a/internal/component/mimir/rules/kubernetes/types.go +++ b/internal/component/mimir/rules/kubernetes/types.go @@ -9,16 +9,16 @@ import ( ) type Arguments struct { - Address string `river:"address,attr"` - TenantID string `river:"tenant_id,attr,optional"` - UseLegacyRoutes bool `river:"use_legacy_routes,attr,optional"` - PrometheusHTTPPrefix string `river:"prometheus_http_prefix,attr,optional"` - HTTPClientConfig config.HTTPClientConfig `river:",squash"` - SyncInterval time.Duration `river:"sync_interval,attr,optional"` - MimirNameSpacePrefix string `river:"mimir_namespace_prefix,attr,optional"` - - RuleSelector kubernetes.LabelSelector `river:"rule_selector,block,optional"` - RuleNamespaceSelector kubernetes.LabelSelector `river:"rule_namespace_selector,block,optional"` + Address string `alloy:"address,attr"` + TenantID string `alloy:"tenant_id,attr,optional"` + UseLegacyRoutes bool `alloy:"use_legacy_routes,attr,optional"` + PrometheusHTTPPrefix string `alloy:"prometheus_http_prefix,attr,optional"` + HTTPClientConfig config.HTTPClientConfig `alloy:",squash"` + SyncInterval time.Duration `alloy:"sync_interval,attr,optional"` + MimirNameSpacePrefix string `alloy:"mimir_namespace_prefix,attr,optional"` + + RuleSelector kubernetes.LabelSelector `alloy:"rule_selector,block,optional"` + RuleNamespaceSelector kubernetes.LabelSelector `alloy:"rule_namespace_selector,block,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/otelcol/auth/auth.go b/internal/component/otelcol/auth/auth.go index e608546d11..f1211c2e6f 100644 --- a/internal/component/otelcol/auth/auth.go +++ b/internal/component/otelcol/auth/auth.go @@ -45,7 +45,7 @@ type Arguments interface { type Exports struct { // Handler is the managed component. Handler is updated any time the // extension is updated. - Handler Handler `river:"handler,attr"` + Handler Handler `alloy:"handler,attr"` } // Handler combines an extension with its ID. diff --git a/internal/component/otelcol/auth/basic/basic.go b/internal/component/otelcol/auth/basic/basic.go index 6ccec98a5d..8432724832 100644 --- a/internal/component/otelcol/auth/basic/basic.go +++ b/internal/component/otelcol/auth/basic/basic.go @@ -30,8 +30,8 @@ func init() { type Arguments struct { // TODO(rfratto): should we support htpasswd? - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` } var _ auth.Arguments = Arguments{} diff --git a/internal/component/otelcol/auth/bearer/bearer.go b/internal/component/otelcol/auth/bearer/bearer.go index 7e31dc05ed..43813c48b5 100644 --- a/internal/component/otelcol/auth/bearer/bearer.go +++ b/internal/component/otelcol/auth/bearer/bearer.go @@ -29,8 +29,8 @@ func init() { // Arguments configures the otelcol.auth.bearer component. type Arguments struct { // Do not include the "filename" attribute - users should use local.file instead. - Scheme string `river:"scheme,attr,optional"` - Token alloytypes.Secret `river:"token,attr"` + Scheme string `alloy:"scheme,attr,optional"` + Token alloytypes.Secret `alloy:"token,attr"` } var _ auth.Arguments = Arguments{} diff --git a/internal/component/otelcol/auth/headers/headers.go b/internal/component/otelcol/auth/headers/headers.go index 4eb48e5aa1..f79f8506ca 100644 --- a/internal/component/otelcol/auth/headers/headers.go +++ b/internal/component/otelcol/auth/headers/headers.go @@ -32,7 +32,7 @@ func init() { // Arguments configures the otelcol.auth.headers component. type Arguments struct { - Headers []Header `river:"header,block,optional"` + Headers []Header `alloy:"header,block,optional"` } var _ auth.Arguments = Arguments{} @@ -132,10 +132,10 @@ func (a *Action) UnmarshalText(text []byte) error { // Header is an individual Header to send along with requests. type Header struct { - Key string `river:"key,attr"` - Value *alloytypes.OptionalSecret `river:"value,attr,optional"` - FromContext *string `river:"from_context,attr,optional"` - Action Action `river:"action,attr,optional"` + Key string `alloy:"key,attr"` + Value *alloytypes.OptionalSecret `alloy:"value,attr,optional"` + FromContext *string `alloy:"from_context,attr,optional"` + Action Action `alloy:"action,attr,optional"` } var _ syntax.Defaulter = &Header{} diff --git a/internal/component/otelcol/auth/oauth2/oauth2.go b/internal/component/otelcol/auth/oauth2/oauth2.go index b67deaed89..438096c4a4 100644 --- a/internal/component/otelcol/auth/oauth2/oauth2.go +++ b/internal/component/otelcol/auth/oauth2/oauth2.go @@ -31,15 +31,15 @@ func init() { // Arguments configures the otelcol.auth.oauth2 component. type Arguments struct { - ClientID string `river:"client_id,attr,optional"` - ClientIDFile string `river:"client_id_file,attr,optional"` - ClientSecret alloytypes.Secret `river:"client_secret,attr,optional"` - ClientSecretFile string `river:"client_secret_file,attr,optional"` - TokenURL string `river:"token_url,attr"` - EndpointParams url.Values `river:"endpoint_params,attr,optional"` - Scopes []string `river:"scopes,attr,optional"` - TLSSetting otelcol.TLSClientArguments `river:"tls,block,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` + ClientID string `alloy:"client_id,attr,optional"` + ClientIDFile string `alloy:"client_id_file,attr,optional"` + ClientSecret alloytypes.Secret `alloy:"client_secret,attr,optional"` + ClientSecretFile string `alloy:"client_secret_file,attr,optional"` + TokenURL string `alloy:"token_url,attr"` + EndpointParams url.Values `alloy:"endpoint_params,attr,optional"` + Scopes []string `alloy:"scopes,attr,optional"` + TLSSetting otelcol.TLSClientArguments `alloy:"tls,block,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } var _ auth.Arguments = Arguments{} diff --git a/internal/component/otelcol/auth/sigv4/sigv4.go b/internal/component/otelcol/auth/sigv4/sigv4.go index 431b059aa6..e40f08352a 100644 --- a/internal/component/otelcol/auth/sigv4/sigv4.go +++ b/internal/component/otelcol/auth/sigv4/sigv4.go @@ -25,9 +25,9 @@ func init() { // Arguments configures the otelcol.auth.sigv4 component. type Arguments struct { - Region string `river:"region,attr,optional"` - Service string `river:"service,attr,optional"` - AssumeRole AssumeRole `river:"assume_role,block,optional"` + Region string `alloy:"region,attr,optional"` + Service string `alloy:"service,attr,optional"` + AssumeRole AssumeRole `alloy:"assume_role,block,optional"` } var ( @@ -67,9 +67,9 @@ func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.I // AssumeRole replicates sigv4authextension.Config.AssumeRole type AssumeRole struct { - ARN string `river:"arn,attr,optional"` - SessionName string `river:"session_name,attr,optional"` - STSRegion string `river:"sts_region,attr,optional"` + ARN string `alloy:"arn,attr,optional"` + SessionName string `alloy:"session_name,attr,optional"` + STSRegion string `alloy:"sts_region,attr,optional"` } // Convert converts args into the upstream type. diff --git a/internal/component/otelcol/config_attraction.go b/internal/component/otelcol/config_attraction.go index 908acb523c..b009397112 100644 --- a/internal/component/otelcol/config_attraction.go +++ b/internal/component/otelcol/config_attraction.go @@ -18,11 +18,11 @@ func (actions AttrActionKeyValueSlice) Convert() []interface{} { type AttrActionKeyValue struct { // Key specifies the attribute to act upon. // This is a required field. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // Value specifies the value to populate for the key. // The type of the value is inferred from the configuration. - Value interface{} `river:"value,attr,optional"` + Value interface{} `alloy:"value,attr,optional"` // A regex pattern must be specified for the action EXTRACT. // It uses the attribute specified by `key' to extract values from @@ -32,22 +32,22 @@ type AttrActionKeyValue struct { // Note: All subexpressions must have a name. // Note: The value type of the source key must be a string. If it isn't, // no extraction will occur. - RegexPattern string `river:"pattern,attr,optional"` + RegexPattern string `alloy:"pattern,attr,optional"` // FromAttribute specifies the attribute to use to populate // the value. If the attribute doesn't exist, no action is performed. - FromAttribute string `river:"from_attribute,attr,optional"` + FromAttribute string `alloy:"from_attribute,attr,optional"` // FromContext specifies the context value to use to populate // the value. The values would be searched in client.Info.Metadata. // If the key doesn't exist, no action is performed. // If the key has multiple values the values will be joined with `;` separator. - FromContext string `river:"from_context,attr,optional"` + FromContext string `alloy:"from_context,attr,optional"` // ConvertedType specifies the target type of an attribute to be converted // If the key doesn't exist, no action is performed. // If the value cannot be converted, the original value will be left as-is - ConvertedType string `river:"converted_type,attr,optional"` + ConvertedType string `alloy:"converted_type,attr,optional"` // Action specifies the type of action to perform. // The set of values are {INSERT, UPDATE, UPSERT, DELETE, HASH}. @@ -72,7 +72,7 @@ type AttrActionKeyValue struct { // already exists, it will be overridden. // CONVERT - converts the type of an existing attribute, if convertable // This is a required field. - Action string `river:"action,attr"` + Action string `alloy:"action,attr"` } // Convert converts args into the upstream type. diff --git a/internal/component/otelcol/config_debug_metrics.go b/internal/component/otelcol/config_debug_metrics.go index c0a47a9d08..977dc6177e 100644 --- a/internal/component/otelcol/config_debug_metrics.go +++ b/internal/component/otelcol/config_debug_metrics.go @@ -2,7 +2,7 @@ package otelcol // DebugMetricsArguments configures internal metrics of the components type DebugMetricsArguments struct { - DisableHighCardinalityMetrics bool `river:"disable_high_cardinality_metrics,attr,optional"` + DisableHighCardinalityMetrics bool `alloy:"disable_high_cardinality_metrics,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/otelcol/config_filter.go b/internal/component/otelcol/config_filter.go index 826f876971..ae2b7fa2e9 100644 --- a/internal/component/otelcol/config_filter.go +++ b/internal/component/otelcol/config_filter.go @@ -15,15 +15,15 @@ import ( // If both 'include' and 'exclude' are specified, the 'include' properties are checked // before the 'exclude' properties. type MatchConfig struct { - Include *MatchProperties `river:"include,block,optional"` - Exclude *MatchProperties `river:"exclude,block,optional"` + Include *MatchProperties `alloy:"include,block,optional"` + Exclude *MatchProperties `alloy:"exclude,block,optional"` } // MatchProperties specifies the set of properties in a spans/log/metric to match // against and if the input data should be included or excluded from the processor. type MatchProperties struct { - MatchType string `river:"match_type,attr"` - RegexpConfig *RegexpConfig `river:"regexp,block,optional"` + MatchType string `alloy:"match_type,attr"` + RegexpConfig *RegexpConfig `alloy:"regexp,block,optional"` // Note: For spans, one of Services, SpanNames, Attributes, Resources, or Libraries must be specified with a // non-empty value for a valid configuration. @@ -35,41 +35,41 @@ type MatchProperties struct { // Services specify the list of items to match service name against. // A match occurs if the span's service name matches at least one item in this list. - Services []string `river:"services,attr,optional"` + Services []string `alloy:"services,attr,optional"` // SpanNames specify the list of items to match span name against. // A match occurs if the span name matches at least one item in this list. - SpanNames []string `river:"span_names,attr,optional"` + SpanNames []string `alloy:"span_names,attr,optional"` // LogBodies is a list of strings that the LogRecord's body field must match against. - LogBodies []string `river:"log_bodies,attr,optional"` + LogBodies []string `alloy:"log_bodies,attr,optional"` // LogSeverityTexts is a list of strings that the LogRecord's severity text field must match against. - LogSeverityTexts []string `river:"log_severity_texts,attr,optional"` + LogSeverityTexts []string `alloy:"log_severity_texts,attr,optional"` // LogSeverity defines how to match against a log record's SeverityNumber, if defined. - LogSeverity *LogSeverityNumberMatchProperties `river:"log_severity,block,optional"` + LogSeverity *LogSeverityNumberMatchProperties `alloy:"log_severity,block,optional"` // MetricNames is a list of strings to match metric name against. // A match occurs if metric name matches at least one item in the list. - MetricNames []string `river:"metric_names,attr,optional"` + MetricNames []string `alloy:"metric_names,attr,optional"` // Attributes specifies the list of attributes to match against. // All of these attributes must match exactly for a match to occur. // Only match_type=strict is allowed if "attributes" are specified. - Attributes []Attribute `river:"attribute,block,optional"` + Attributes []Attribute `alloy:"attribute,block,optional"` // Resources specify the list of items to match the resources against. // A match occurs if the data's resources match at least one item in this list. - Resources []Attribute `river:"resource,block,optional"` + Resources []Attribute `alloy:"resource,block,optional"` // Libraries specify the list of items to match the implementation library against. // A match occurs if the span's implementation library matches at least one item in this list. - Libraries []InstrumentationLibrary `river:"library,block,optional"` + Libraries []InstrumentationLibrary `alloy:"library,block,optional"` // SpanKinds specify the list of items to match the span kind against. // A match occurs if the span's span kind matches at least one item in this list. - SpanKinds []string `river:"span_kinds,attr,optional"` + SpanKinds []string `alloy:"span_kinds,attr,optional"` } // Convert converts args into the upstream type. @@ -157,10 +157,10 @@ func convertInstrumentationLibrariesSlice(libs []InstrumentationLibrary) []inter type RegexpConfig struct { // CacheEnabled determines whether match results are LRU cached to make subsequent matches faster. // Cache size is unlimited unless CacheMaxNumEntries is also specified. - CacheEnabled bool `river:"cache_enabled,attr,optional"` + CacheEnabled bool `alloy:"cache_enabled,attr,optional"` // CacheMaxNumEntries is the max number of entries of the LRU cache that stores match results. // CacheMaxNumEntries is ignored if CacheEnabled is false. - CacheMaxNumEntries int `river:"cache_max_num_entries,attr,optional"` + CacheMaxNumEntries int `alloy:"cache_max_num_entries,attr,optional"` } func (args RegexpConfig) convert() map[string]interface{} { @@ -173,11 +173,11 @@ func (args RegexpConfig) convert() map[string]interface{} { // Attribute specifies the attribute key and optional value to match against. type Attribute struct { // Key specifies the attribute key. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // Values specifies the value to match against. // If it is not set, any value will match. - Value interface{} `river:"value,attr,optional"` + Value interface{} `alloy:"value,attr,optional"` } func (args Attribute) convert() map[string]interface{} { @@ -189,7 +189,7 @@ func (args Attribute) convert() map[string]interface{} { // InstrumentationLibrary specifies the instrumentation library and optional version to match against. type InstrumentationLibrary struct { - Name string `river:"name,attr"` + Name string `alloy:"name,attr"` // version match // expected actual match // nil yes @@ -198,7 +198,7 @@ type InstrumentationLibrary struct { // 1 no // 1 no // 1 1 yes - Version *string `river:"version,attr,optional"` + Version *string `alloy:"version,attr,optional"` } func (args InstrumentationLibrary) convert() map[string]interface{} { @@ -216,11 +216,11 @@ func (args InstrumentationLibrary) convert() map[string]interface{} { type LogSeverityNumberMatchProperties struct { // Min is the lowest severity that may be matched. // e.g. if this is plog.SeverityNumberInfo, INFO, WARN, ERROR, and FATAL logs will match. - Min SeverityLevel `river:"min,attr"` + Min SeverityLevel `alloy:"min,attr"` // MatchUndefined controls whether logs with "undefined" severity matches. // If this is true, entries with undefined severity will match. - MatchUndefined bool `river:"match_undefined,attr"` + MatchUndefined bool `alloy:"match_undefined,attr"` } func (args LogSeverityNumberMatchProperties) convert() (map[string]interface{}, error) { diff --git a/internal/component/otelcol/config_grpc.go b/internal/component/otelcol/config_grpc.go index da6cca47ed..8d45332554 100644 --- a/internal/component/otelcol/config_grpc.go +++ b/internal/component/otelcol/config_grpc.go @@ -18,17 +18,17 @@ const DefaultBalancerName = "pick_first" // GRPCServerArguments holds shared gRPC settings for components which launch // gRPC servers. type GRPCServerArguments struct { - Endpoint string `river:"endpoint,attr,optional"` - Transport string `river:"transport,attr,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` + Transport string `alloy:"transport,attr,optional"` - TLS *TLSServerArguments `river:"tls,block,optional"` + TLS *TLSServerArguments `alloy:"tls,block,optional"` - MaxRecvMsgSize units.Base2Bytes `river:"max_recv_msg_size,attr,optional"` - MaxConcurrentStreams uint32 `river:"max_concurrent_streams,attr,optional"` - ReadBufferSize units.Base2Bytes `river:"read_buffer_size,attr,optional"` - WriteBufferSize units.Base2Bytes `river:"write_buffer_size,attr,optional"` + MaxRecvMsgSize units.Base2Bytes `alloy:"max_recv_msg_size,attr,optional"` + MaxConcurrentStreams uint32 `alloy:"max_concurrent_streams,attr,optional"` + ReadBufferSize units.Base2Bytes `alloy:"read_buffer_size,attr,optional"` + WriteBufferSize units.Base2Bytes `alloy:"write_buffer_size,attr,optional"` - Keepalive *KeepaliveServerArguments `river:"keepalive,block,optional"` + Keepalive *KeepaliveServerArguments `alloy:"keepalive,block,optional"` // TODO(rfratto): auth // @@ -38,7 +38,7 @@ type GRPCServerArguments struct { // We will need to generally figure out how we want to provide common // authentication extensions to all of our components. - IncludeMetadata bool `river:"include_metadata,attr,optional"` + IncludeMetadata bool `alloy:"include_metadata,attr,optional"` } // Convert converts args into the upstream type. @@ -69,8 +69,8 @@ func (args *GRPCServerArguments) Convert() *otelconfiggrpc.GRPCServerSettings { // KeepaliveServerArguments holds shared keepalive settings for components // which launch servers. type KeepaliveServerArguments struct { - ServerParameters *KeepaliveServerParamaters `river:"server_parameters,block,optional"` - EnforcementPolicy *KeepaliveEnforcementPolicy `river:"enforcement_policy,block,optional"` + ServerParameters *KeepaliveServerParamaters `alloy:"server_parameters,block,optional"` + EnforcementPolicy *KeepaliveEnforcementPolicy `alloy:"enforcement_policy,block,optional"` } // Convert converts args into the upstream type. @@ -88,11 +88,11 @@ func (args *KeepaliveServerArguments) Convert() *otelconfiggrpc.KeepaliveServerC // KeepaliveServerParamaters holds shared keepalive settings for components // which launch servers. type KeepaliveServerParamaters struct { - MaxConnectionIdle time.Duration `river:"max_connection_idle,attr,optional"` - MaxConnectionAge time.Duration `river:"max_connection_age,attr,optional"` - MaxConnectionAgeGrace time.Duration `river:"max_connection_age_grace,attr,optional"` - Time time.Duration `river:"time,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` + MaxConnectionIdle time.Duration `alloy:"max_connection_idle,attr,optional"` + MaxConnectionAge time.Duration `alloy:"max_connection_age,attr,optional"` + MaxConnectionAgeGrace time.Duration `alloy:"max_connection_age_grace,attr,optional"` + Time time.Duration `alloy:"time,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } // Convert converts args into the upstream type. @@ -113,8 +113,8 @@ func (args *KeepaliveServerParamaters) Convert() *otelconfiggrpc.KeepaliveServer // KeepaliveEnforcementPolicy holds shared keepalive settings for components // which launch servers. type KeepaliveEnforcementPolicy struct { - MinTime time.Duration `river:"min_time,attr,optional"` - PermitWithoutStream bool `river:"permit_without_stream,attr,optional"` + MinTime time.Duration `alloy:"min_time,attr,optional"` + PermitWithoutStream bool `alloy:"permit_without_stream,attr,optional"` } // Convert converts args into the upstream type. @@ -134,23 +134,23 @@ func (args *KeepaliveEnforcementPolicy) Convert() *otelconfiggrpc.KeepaliveEnfor // NOTE: When changing this structure, note that similar structures such as // loadbalancing.GRPCClientArguments may also need to be changed. type GRPCClientArguments struct { - Endpoint string `river:"endpoint,attr"` + Endpoint string `alloy:"endpoint,attr"` - Compression CompressionType `river:"compression,attr,optional"` + Compression CompressionType `alloy:"compression,attr,optional"` - TLS TLSClientArguments `river:"tls,block,optional"` - Keepalive *KeepaliveClientArguments `river:"keepalive,block,optional"` + TLS TLSClientArguments `alloy:"tls,block,optional"` + Keepalive *KeepaliveClientArguments `alloy:"keepalive,block,optional"` - ReadBufferSize units.Base2Bytes `river:"read_buffer_size,attr,optional"` - WriteBufferSize units.Base2Bytes `river:"write_buffer_size,attr,optional"` - WaitForReady bool `river:"wait_for_ready,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - BalancerName string `river:"balancer_name,attr,optional"` - Authority string `river:"authority,attr,optional"` + ReadBufferSize units.Base2Bytes `alloy:"read_buffer_size,attr,optional"` + WriteBufferSize units.Base2Bytes `alloy:"write_buffer_size,attr,optional"` + WaitForReady bool `alloy:"wait_for_ready,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + BalancerName string `alloy:"balancer_name,attr,optional"` + Authority string `alloy:"authority,attr,optional"` // Auth is a binding to an otelcol.auth.* component extension which handles // authentication. - Auth *auth.Handler `river:"auth,attr,optional"` + Auth *auth.Handler `alloy:"auth,attr,optional"` } // Convert converts args into the upstream type. @@ -207,9 +207,9 @@ func (args *GRPCClientArguments) Extensions() map[otelcomponent.ID]otelextension // KeepaliveClientArguments holds shared keepalive settings for components // which launch clients. type KeepaliveClientArguments struct { - PingWait time.Duration `river:"ping_wait,attr,optional"` - PingResponseTimeout time.Duration `river:"ping_response_timeout,attr,optional"` - PingWithoutStream bool `river:"ping_without_stream,attr,optional"` + PingWait time.Duration `alloy:"ping_wait,attr,optional"` + PingResponseTimeout time.Duration `alloy:"ping_response_timeout,attr,optional"` + PingWithoutStream bool `alloy:"ping_without_stream,attr,optional"` } // Convert converts args into the upstream type. diff --git a/internal/component/otelcol/config_http.go b/internal/component/otelcol/config_http.go index f94da5cd84..934a2a488c 100644 --- a/internal/component/otelcol/config_http.go +++ b/internal/component/otelcol/config_http.go @@ -15,11 +15,11 @@ import ( // HTTPServerArguments holds shared settings for components which launch HTTP // servers. type HTTPServerArguments struct { - Endpoint string `river:"endpoint,attr,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` - TLS *TLSServerArguments `river:"tls,block,optional"` + TLS *TLSServerArguments `alloy:"tls,block,optional"` - CORS *CORSArguments `river:"cors,block,optional"` + CORS *CORSArguments `alloy:"cors,block,optional"` // TODO(rfratto): auth // @@ -29,8 +29,8 @@ type HTTPServerArguments struct { // We will need to generally figure out how we want to provide common // authentication extensions to all of our components. - MaxRequestBodySize units.Base2Bytes `river:"max_request_body_size,attr,optional"` - IncludeMetadata bool `river:"include_metadata,attr,optional"` + MaxRequestBodySize units.Base2Bytes `alloy:"max_request_body_size,attr,optional"` + IncludeMetadata bool `alloy:"include_metadata,attr,optional"` } // Convert converts args into the upstream type. @@ -51,10 +51,10 @@ func (args *HTTPServerArguments) Convert() *otelconfighttp.HTTPServerSettings { // CORSArguments holds shared CORS settings for components which launch HTTP // servers. type CORSArguments struct { - AllowedOrigins []string `river:"allowed_origins,attr,optional"` - AllowedHeaders []string `river:"allowed_headers,attr,optional"` + AllowedOrigins []string `alloy:"allowed_origins,attr,optional"` + AllowedHeaders []string `alloy:"allowed_headers,attr,optional"` - MaxAge int `river:"max_age,attr,optional"` + MaxAge int `alloy:"max_age,attr,optional"` } // Convert converts args into the upstream type. @@ -74,26 +74,26 @@ func (args *CORSArguments) Convert() *otelconfighttp.CORSSettings { // HTTPClientArguments holds shared HTTP settings for components which launch // HTTP clients. type HTTPClientArguments struct { - Endpoint string `river:"endpoint,attr"` + Endpoint string `alloy:"endpoint,attr"` - Compression CompressionType `river:"compression,attr,optional"` + Compression CompressionType `alloy:"compression,attr,optional"` - TLS TLSClientArguments `river:"tls,block,optional"` + TLS TLSClientArguments `alloy:"tls,block,optional"` - ReadBufferSize units.Base2Bytes `river:"read_buffer_size,attr,optional"` - WriteBufferSize units.Base2Bytes `river:"write_buffer_size,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` + ReadBufferSize units.Base2Bytes `alloy:"read_buffer_size,attr,optional"` + WriteBufferSize units.Base2Bytes `alloy:"write_buffer_size,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` // CustomRoundTripper func(next http.RoundTripper) (http.RoundTripper, error) TODO (@tpaschalis) - MaxIdleConns *int `river:"max_idle_conns,attr,optional"` - MaxIdleConnsPerHost *int `river:"max_idle_conns_per_host,attr,optional"` - MaxConnsPerHost *int `river:"max_conns_per_host,attr,optional"` - IdleConnTimeout *time.Duration `river:"idle_conn_timeout,attr,optional"` - DisableKeepAlives bool `river:"disable_keep_alives,attr,optional"` + MaxIdleConns *int `alloy:"max_idle_conns,attr,optional"` + MaxIdleConnsPerHost *int `alloy:"max_idle_conns_per_host,attr,optional"` + MaxConnsPerHost *int `alloy:"max_conns_per_host,attr,optional"` + IdleConnTimeout *time.Duration `alloy:"idle_conn_timeout,attr,optional"` + DisableKeepAlives bool `alloy:"disable_keep_alives,attr,optional"` // Auth is a binding to an otelcol.auth.* component extension which handles // authentication. - Auth *auth.Handler `river:"auth,attr,optional"` + Auth *auth.Handler `alloy:"auth,attr,optional"` } // Convert converts args into the upstream type. diff --git a/internal/component/otelcol/config_k8s.go b/internal/component/otelcol/config_k8s.go index b20407fd41..546d851ef1 100644 --- a/internal/component/otelcol/config_k8s.go +++ b/internal/component/otelcol/config_k8s.go @@ -15,10 +15,10 @@ type KubernetesAPIConfig struct { // (for no auth), `serviceAccount` (to use the standard service account // token provided to the agent pod), or `kubeConfig` to use credentials // from `~/.kube/config`. - AuthType string `river:"auth_type,attr,optional"` + AuthType string `alloy:"auth_type,attr,optional"` // When using auth_type `kubeConfig`, override the current context. - Context string `river:"context,attr,optional"` + Context string `alloy:"context,attr,optional"` } // Validate returns an error if the config is invalid. diff --git a/internal/component/otelcol/config_queue.go b/internal/component/otelcol/config_queue.go index a15a7983b8..e3ed5e35ea 100644 --- a/internal/component/otelcol/config_queue.go +++ b/internal/component/otelcol/config_queue.go @@ -9,9 +9,9 @@ import ( // QueueArguments holds shared settings for components which can queue // requests. type QueueArguments struct { - Enabled bool `river:"enabled,attr,optional"` - NumConsumers int `river:"num_consumers,attr,optional"` - QueueSize int `river:"queue_size,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + NumConsumers int `alloy:"num_consumers,attr,optional"` + QueueSize int `alloy:"queue_size,attr,optional"` // TODO(rfratto): queues can send to persistent storage through an extension. } diff --git a/internal/component/otelcol/config_retry.go b/internal/component/otelcol/config_retry.go index df2fb07720..284ddd58a8 100644 --- a/internal/component/otelcol/config_retry.go +++ b/internal/component/otelcol/config_retry.go @@ -11,12 +11,12 @@ import ( // RetryArguments holds shared settings for components which can retry // requests. type RetryArguments struct { - Enabled bool `river:"enabled,attr,optional"` - InitialInterval time.Duration `river:"initial_interval,attr,optional"` - RandomizationFactor float64 `river:"randomization_factor,attr,optional"` - Multiplier float64 `river:"multiplier,attr,optional"` - MaxInterval time.Duration `river:"max_interval,attr,optional"` - MaxElapsedTime time.Duration `river:"max_elapsed_time,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + InitialInterval time.Duration `alloy:"initial_interval,attr,optional"` + RandomizationFactor float64 `alloy:"randomization_factor,attr,optional"` + Multiplier float64 `alloy:"multiplier,attr,optional"` + MaxInterval time.Duration `alloy:"max_interval,attr,optional"` + MaxElapsedTime time.Duration `alloy:"max_elapsed_time,attr,optional"` } var ( diff --git a/internal/component/otelcol/config_scrape.go b/internal/component/otelcol/config_scrape.go index 60f30ae946..24b18d2347 100644 --- a/internal/component/otelcol/config_scrape.go +++ b/internal/component/otelcol/config_scrape.go @@ -16,9 +16,9 @@ var ( // ScraperControllerArguments defines common settings for a scraper controller // configuration. type ScraperControllerArguments struct { - CollectionInterval time.Duration `river:"collection_interval,attr,optional"` - InitialDelay time.Duration `river:"initial_delay,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` + CollectionInterval time.Duration `alloy:"collection_interval,attr,optional"` + InitialDelay time.Duration `alloy:"initial_delay,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } // DefaultScraperControllerArguments holds default settings for ScraperControllerArguments. diff --git a/internal/component/otelcol/config_tls.go b/internal/component/otelcol/config_tls.go index 04a3dbd653..b3f6091cc8 100644 --- a/internal/component/otelcol/config_tls.go +++ b/internal/component/otelcol/config_tls.go @@ -12,9 +12,9 @@ import ( // TLSServerArguments holds shared TLS settings for components which launch // servers with TLS. type TLSServerArguments struct { - TLSSetting TLSSetting `river:",squash"` + TLSSetting TLSSetting `alloy:",squash"` - ClientCAFile string `river:"client_ca_file,attr,optional"` + ClientCAFile string `alloy:"client_ca_file,attr,optional"` } // Convert converts args into the upstream type. @@ -32,11 +32,11 @@ func (args *TLSServerArguments) Convert() *otelconfigtls.TLSServerSetting { // TLSClientArguments holds shared TLS settings for components which launch // TLS clients. type TLSClientArguments struct { - TLSSetting TLSSetting `river:",squash"` + TLSSetting TLSSetting `alloy:",squash"` - Insecure bool `river:"insecure,attr,optional"` - InsecureSkipVerify bool `river:"insecure_skip_verify,attr,optional"` - ServerName string `river:"server_name,attr,optional"` + Insecure bool `alloy:"insecure,attr,optional"` + InsecureSkipVerify bool `alloy:"insecure_skip_verify,attr,optional"` + ServerName string `alloy:"server_name,attr,optional"` } // Convert converts args into the upstream type. @@ -54,15 +54,15 @@ func (args *TLSClientArguments) Convert() *otelconfigtls.TLSClientSetting { } type TLSSetting struct { - CA string `river:"ca_pem,attr,optional"` - CAFile string `river:"ca_file,attr,optional"` - Cert string `river:"cert_pem,attr,optional"` - CertFile string `river:"cert_file,attr,optional"` - Key alloytypes.Secret `river:"key_pem,attr,optional"` - KeyFile string `river:"key_file,attr,optional"` - MinVersion string `river:"min_version,attr,optional"` - MaxVersion string `river:"max_version,attr,optional"` - ReloadInterval time.Duration `river:"reload_interval,attr,optional"` + CA string `alloy:"ca_pem,attr,optional"` + CAFile string `alloy:"ca_file,attr,optional"` + Cert string `alloy:"cert_pem,attr,optional"` + CertFile string `alloy:"cert_file,attr,optional"` + Key alloytypes.Secret `alloy:"key_pem,attr,optional"` + KeyFile string `alloy:"key_file,attr,optional"` + MinVersion string `alloy:"min_version,attr,optional"` + MaxVersion string `alloy:"max_version,attr,optional"` + ReloadInterval time.Duration `alloy:"reload_interval,attr,optional"` } func (args *TLSSetting) Convert() *otelconfigtls.TLSSetting { diff --git a/internal/component/otelcol/connector/host_info/host_info.go b/internal/component/otelcol/connector/host_info/host_info.go index 5a32e297d4..c756b80bfd 100644 --- a/internal/component/otelcol/connector/host_info/host_info.go +++ b/internal/component/otelcol/connector/host_info/host_info.go @@ -30,11 +30,11 @@ func init() { // Arguments configures the otelcol.connector.host_info component. type Arguments struct { - HostIdentifiers []string `river:"host_identifiers,attr,optional"` - MetricsFlushInterval time.Duration `river:"metrics_flush_interval,attr,optional"` + HostIdentifiers []string `alloy:"host_identifiers,attr,optional"` + MetricsFlushInterval time.Duration `alloy:"metrics_flush_interval,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/connector/servicegraph/servicegraph.go b/internal/component/otelcol/connector/servicegraph/servicegraph.go index 30f43c6dd9..1d0298f45a 100644 --- a/internal/component/otelcol/connector/servicegraph/servicegraph.go +++ b/internal/component/otelcol/connector/servicegraph/servicegraph.go @@ -32,7 +32,7 @@ func init() { // Arguments configures the otelcol.connector.servicegraph component. type Arguments struct { // LatencyHistogramBuckets is the list of durations representing latency histogram buckets. - LatencyHistogramBuckets []time.Duration `river:"latency_histogram_buckets,attr,optional"` + LatencyHistogramBuckets []time.Duration `alloy:"latency_histogram_buckets,attr,optional"` // Dimensions defines the list of additional dimensions on top of the provided: // - client @@ -41,28 +41,28 @@ type Arguments struct { // - connection_type // The dimensions will be fetched from the span's attributes. Examples of some conventionally used attributes: // https://github.com/open-telemetry/opentelemetry-collector/blob/main/model/semconv/opentelemetry.go. - Dimensions []string `river:"dimensions,attr,optional"` + Dimensions []string `alloy:"dimensions,attr,optional"` // Store contains the config for the in-memory store used to find requests between services by pairing spans. - Store StoreConfig `river:"store,block,optional"` + Store StoreConfig `alloy:"store,block,optional"` // CacheLoop defines how often to clean the cache of stale series. - CacheLoop time.Duration `river:"cache_loop,attr,optional"` + CacheLoop time.Duration `alloy:"cache_loop,attr,optional"` // StoreExpirationLoop defines how often to expire old entries from the store. - StoreExpirationLoop time.Duration `river:"store_expiration_loop,attr,optional"` + StoreExpirationLoop time.Duration `alloy:"store_expiration_loop,attr,optional"` // VirtualNodePeerAttributes the list of attributes need to match, the higher the front, the higher the priority. //TODO: Add VirtualNodePeerAttributes when it's no longer controlled by // the "processor.servicegraph.virtualNode" feature gate. - // VirtualNodePeerAttributes []string `river:"virtual_node_peer_attributes,attr,optional"` + // VirtualNodePeerAttributes []string `alloy:"virtual_node_peer_attributes,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } type StoreConfig struct { // MaxItems is the maximum number of items to keep in the store. - MaxItems int `river:"max_items,attr,optional"` + MaxItems int `alloy:"max_items,attr,optional"` // TTL is the time to live for items in the store. - TTL time.Duration `river:"ttl,attr,optional"` + TTL time.Duration `alloy:"ttl,attr,optional"` } func (sc *StoreConfig) SetToDefault() { diff --git a/internal/component/otelcol/connector/spanlogs/spanlogs.go b/internal/component/otelcol/connector/spanlogs/spanlogs.go index a6622090b9..bc749c02d8 100644 --- a/internal/component/otelcol/connector/spanlogs/spanlogs.go +++ b/internal/component/otelcol/connector/spanlogs/spanlogs.go @@ -29,25 +29,25 @@ func init() { // Arguments configures the otelcol.connector.spanlogs component. type Arguments struct { - Spans bool `river:"spans,attr,optional"` - Roots bool `river:"roots,attr,optional"` - Processes bool `river:"processes,attr,optional"` - SpanAttributes []string `river:"span_attributes,attr,optional"` - ProcessAttributes []string `river:"process_attributes,attr,optional"` - Overrides OverrideConfig `river:"overrides,block,optional"` - Labels []string `river:"labels,attr,optional"` + Spans bool `alloy:"spans,attr,optional"` + Roots bool `alloy:"roots,attr,optional"` + Processes bool `alloy:"processes,attr,optional"` + SpanAttributes []string `alloy:"span_attributes,attr,optional"` + ProcessAttributes []string `alloy:"process_attributes,attr,optional"` + Overrides OverrideConfig `alloy:"overrides,block,optional"` + Labels []string `alloy:"labels,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } type OverrideConfig struct { - LogsTag string `river:"logs_instance_tag,attr,optional"` - ServiceKey string `river:"service_key,attr,optional"` - SpanNameKey string `river:"span_name_key,attr,optional"` - StatusKey string `river:"status_key,attr,optional"` - DurationKey string `river:"duration_key,attr,optional"` - TraceIDKey string `river:"trace_id_key,attr,optional"` + LogsTag string `alloy:"logs_instance_tag,attr,optional"` + ServiceKey string `alloy:"service_key,attr,optional"` + SpanNameKey string `alloy:"span_name_key,attr,optional"` + StatusKey string `alloy:"status_key,attr,optional"` + DurationKey string `alloy:"duration_key,attr,optional"` + TraceIDKey string `alloy:"trace_id_key,attr,optional"` } var ( diff --git a/internal/component/otelcol/connector/spanmetrics/spanmetrics.go b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go index 1c3b8f313e..4de3a55f12 100644 --- a/internal/component/otelcol/connector/spanmetrics/spanmetrics.go +++ b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go @@ -38,28 +38,28 @@ type Arguments struct { // - status.code // The dimensions will be fetched from the span's attributes. Examples of some conventionally used attributes: // https://github.com/open-telemetry/opentelemetry-collector/blob/main/model/semconv/opentelemetry.go. - Dimensions []Dimension `river:"dimension,block,optional"` - ExcludeDimensions []string `river:"exclude_dimensions,attr,optional"` + Dimensions []Dimension `alloy:"dimension,block,optional"` + ExcludeDimensions []string `alloy:"exclude_dimensions,attr,optional"` // DimensionsCacheSize defines the size of cache for storing Dimensions, which helps to avoid cache memory growing // indefinitely over the lifetime of the collector. - DimensionsCacheSize int `river:"dimensions_cache_size,attr,optional"` + DimensionsCacheSize int `alloy:"dimensions_cache_size,attr,optional"` - AggregationTemporality string `river:"aggregation_temporality,attr,optional"` + AggregationTemporality string `alloy:"aggregation_temporality,attr,optional"` - Histogram HistogramConfig `river:"histogram,block"` + Histogram HistogramConfig `alloy:"histogram,block"` // MetricsEmitInterval is the time period between when metrics are flushed or emitted to the downstream components. - MetricsFlushInterval time.Duration `river:"metrics_flush_interval,attr,optional"` + MetricsFlushInterval time.Duration `alloy:"metrics_flush_interval,attr,optional"` // Namespace is the namespace of the metrics emitted by the connector. - Namespace string `river:"namespace,attr,optional"` + Namespace string `alloy:"namespace,attr,optional"` // Exemplars defines the configuration for exemplars. - Exemplars ExemplarsConfig `river:"exemplars,block,optional"` + Exemplars ExemplarsConfig `alloy:"exemplars,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/connector/spanmetrics/types.go b/internal/component/otelcol/connector/spanmetrics/types.go index a604efaab8..96e6dcc7cb 100644 --- a/internal/component/otelcol/connector/spanmetrics/types.go +++ b/internal/component/otelcol/connector/spanmetrics/types.go @@ -12,8 +12,8 @@ import ( // Dimension defines the dimension name and optional default value if the Dimension is missing from a span attribute. type Dimension struct { - Name string `river:"name,attr"` - Default *string `river:"default,attr,optional"` + Name string `alloy:"name,attr"` + Default *string `alloy:"default,attr,optional"` } func (d Dimension) Convert() spanmetricsconnector.Dimension { @@ -56,10 +56,10 @@ func ConvertMetricUnit(unit string) (map[string]interface{}, error) { } type HistogramConfig struct { - Disable bool `river:"disable,attr,optional"` - Unit string `river:"unit,attr,optional"` - Exponential *ExponentialHistogramConfig `river:"exponential,block,optional"` - Explicit *ExplicitHistogramConfig `river:"explicit,block,optional"` + Disable bool `alloy:"disable,attr,optional"` + Unit string `alloy:"unit,attr,optional"` + Exponential *ExponentialHistogramConfig `alloy:"exponential,block,optional"` + Explicit *ExplicitHistogramConfig `alloy:"explicit,block,optional"` } var ( @@ -123,7 +123,7 @@ func (hc HistogramConfig) Convert() (*spanmetricsconnector.HistogramConfig, erro } type ExemplarsConfig struct { - Enabled bool `river:"enabled,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` } func (ec ExemplarsConfig) Convert() *spanmetricsconnector.ExemplarsConfig { @@ -133,7 +133,7 @@ func (ec ExemplarsConfig) Convert() *spanmetricsconnector.ExemplarsConfig { } type ExponentialHistogramConfig struct { - MaxSize int32 `river:"max_size,attr,optional"` + MaxSize int32 `alloy:"max_size,attr,optional"` } var ( @@ -163,7 +163,7 @@ func (ehc ExponentialHistogramConfig) Convert() *spanmetricsconnector.Exponentia type ExplicitHistogramConfig struct { // Buckets is the list of durations representing explicit histogram buckets. - Buckets []time.Duration `river:"buckets,attr,optional"` + Buckets []time.Duration `alloy:"buckets,attr,optional"` } var ( diff --git a/internal/component/otelcol/consumer.go b/internal/component/otelcol/consumer.go index edb0fb4fbc..c7a385ba6f 100644 --- a/internal/component/otelcol/consumer.go +++ b/internal/component/otelcol/consumer.go @@ -18,13 +18,13 @@ type Consumer interface { // It is expected to use ConsumerArguments as a block within the top-level // arguments block for a component. type ConsumerArguments struct { - Metrics []Consumer `river:"metrics,attr,optional"` - Logs []Consumer `river:"logs,attr,optional"` - Traces []Consumer `river:"traces,attr,optional"` + Metrics []Consumer `alloy:"metrics,attr,optional"` + Logs []Consumer `alloy:"logs,attr,optional"` + Traces []Consumer `alloy:"traces,attr,optional"` } // ConsumerExports is a common Exports type for Flow components which are // otelcol processors or otelcol exporters. type ConsumerExports struct { - Input Consumer `river:"input,attr"` + Input Consumer `alloy:"input,attr"` } diff --git a/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go b/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go index ab9536ea5b..70bad94765 100644 --- a/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go +++ b/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go @@ -41,12 +41,12 @@ func init() { // Arguments configures the otelcol.exporter.loadbalancing component. type Arguments struct { - Protocol Protocol `river:"protocol,block"` - Resolver ResolverSettings `river:"resolver,block"` - RoutingKey string `river:"routing_key,attr,optional"` + Protocol Protocol `alloy:"protocol,block"` + Resolver ResolverSettings `alloy:"resolver,block"` + RoutingKey string `alloy:"routing_key,attr,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` } var ( @@ -91,7 +91,7 @@ func (args Arguments) Convert() (otelcomponent.Config, error) { // Protocol holds the individual protocol-specific settings. Only OTLP is supported at the moment. type Protocol struct { - OTLP OtlpConfig `river:"otlp,block"` + OTLP OtlpConfig `alloy:"otlp,block"` } func (protocol Protocol) Convert() loadbalancingexporter.Protocol { @@ -102,12 +102,12 @@ func (protocol Protocol) Convert() loadbalancingexporter.Protocol { // OtlpConfig defines the config for an OTLP exporter type OtlpConfig struct { - Timeout time.Duration `river:"timeout,attr,optional"` - Queue otelcol.QueueArguments `river:"queue,block,optional"` - Retry otelcol.RetryArguments `river:"retry,block,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + Queue otelcol.QueueArguments `alloy:"queue,block,optional"` + Retry otelcol.RetryArguments `alloy:"retry,block,optional"` // Most of the time, the user will not have to set anything in the client block. // However, the block should not be "optional" so that the defaults are populated. - Client GRPCClientArguments `river:"client,block"` + Client GRPCClientArguments `alloy:"client,block"` } func (oc *OtlpConfig) SetToDefault() { @@ -132,9 +132,9 @@ func (oc OtlpConfig) Convert() otlpexporter.Config { // ResolverSettings defines the configurations for the backend resolver type ResolverSettings struct { - Static *StaticResolver `river:"static,block,optional"` - DNS *DNSResolver `river:"dns,block,optional"` - Kubernetes *KubernetesResolver `river:"kubernetes,block,optional"` + Static *StaticResolver `alloy:"static,block,optional"` + DNS *DNSResolver `alloy:"dns,block,optional"` + Kubernetes *KubernetesResolver `alloy:"kubernetes,block,optional"` } func (resolverSettings ResolverSettings) Convert() loadbalancingexporter.ResolverSettings { @@ -160,7 +160,7 @@ func (resolverSettings ResolverSettings) Convert() loadbalancingexporter.Resolve // StaticResolver defines the configuration for the resolver providing a fixed list of backends type StaticResolver struct { - Hostnames []string `river:"hostnames,attr"` + Hostnames []string `alloy:"hostnames,attr"` } func (staticResolver StaticResolver) Convert() loadbalancingexporter.StaticResolver { @@ -171,10 +171,10 @@ func (staticResolver StaticResolver) Convert() loadbalancingexporter.StaticResol // DNSResolver defines the configuration for the DNS resolver type DNSResolver struct { - Hostname string `river:"hostname,attr"` - Port string `river:"port,attr,optional"` - Interval time.Duration `river:"interval,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` + Hostname string `alloy:"hostname,attr"` + Port string `alloy:"port,attr,optional"` + Interval time.Duration `alloy:"interval,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } var _ syntax.Defaulter = &DNSResolver{} @@ -202,8 +202,8 @@ func (dnsResolver *DNSResolver) Convert() loadbalancingexporter.DNSResolver { // KubernetesResolver defines the configuration for the k8s resolver type KubernetesResolver struct { - Service string `river:"service,attr"` - Ports []int32 `river:"ports,attr,optional"` + Service string `alloy:"service,attr"` + Ports []int32 `alloy:"ports,attr,optional"` } var _ syntax.Defaulter = &KubernetesResolver{} @@ -240,21 +240,21 @@ func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments { // GRPCClientArguments is the same as otelcol.GRPCClientArguments, but without an "endpoint" attribute type GRPCClientArguments struct { - Compression otelcol.CompressionType `river:"compression,attr,optional"` + Compression otelcol.CompressionType `alloy:"compression,attr,optional"` - TLS otelcol.TLSClientArguments `river:"tls,block,optional"` - Keepalive *otelcol.KeepaliveClientArguments `river:"keepalive,block,optional"` + TLS otelcol.TLSClientArguments `alloy:"tls,block,optional"` + Keepalive *otelcol.KeepaliveClientArguments `alloy:"keepalive,block,optional"` - ReadBufferSize units.Base2Bytes `river:"read_buffer_size,attr,optional"` - WriteBufferSize units.Base2Bytes `river:"write_buffer_size,attr,optional"` - WaitForReady bool `river:"wait_for_ready,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - BalancerName string `river:"balancer_name,attr,optional"` - Authority string `river:"authority,attr,optional"` + ReadBufferSize units.Base2Bytes `alloy:"read_buffer_size,attr,optional"` + WriteBufferSize units.Base2Bytes `alloy:"write_buffer_size,attr,optional"` + WaitForReady bool `alloy:"wait_for_ready,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + BalancerName string `alloy:"balancer_name,attr,optional"` + Authority string `alloy:"authority,attr,optional"` // Auth is a binding to an otelcol.auth.* component extension which handles // authentication. - Auth *auth.Handler `river:"auth,attr,optional"` + Auth *auth.Handler `alloy:"auth,attr,optional"` } var _ syntax.Defaulter = &GRPCClientArguments{} diff --git a/internal/component/otelcol/exporter/logging/logging.go b/internal/component/otelcol/exporter/logging/logging.go index 1e08fe2104..3e09afa09d 100644 --- a/internal/component/otelcol/exporter/logging/logging.go +++ b/internal/component/otelcol/exporter/logging/logging.go @@ -28,12 +28,12 @@ func init() { // Arguments configures the otelcol.exporter.logging component. type Arguments struct { - Verbosity configtelemetry.Level `river:"verbosity,attr,optional"` - SamplingInitial int `river:"sampling_initial,attr,optional"` - SamplingThereafter int `river:"sampling_thereafter,attr,optional"` + Verbosity configtelemetry.Level `alloy:"verbosity,attr,optional"` + SamplingInitial int `alloy:"sampling_initial,attr,optional"` + SamplingThereafter int `alloy:"sampling_thereafter,attr,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` } var _ exporter.Arguments = Arguments{} diff --git a/internal/component/otelcol/exporter/loki/loki.go b/internal/component/otelcol/exporter/loki/loki.go index 058173760c..5809d7edfc 100644 --- a/internal/component/otelcol/exporter/loki/loki.go +++ b/internal/component/otelcol/exporter/loki/loki.go @@ -28,7 +28,7 @@ func init() { // Arguments configures the otelcol.exporter.loki component. type Arguments struct { - ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` + ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"` } // Component is the otelcol.exporter.loki component. diff --git a/internal/component/otelcol/exporter/otlp/otlp.go b/internal/component/otelcol/exporter/otlp/otlp.go index a86aec2219..cd46c29901 100644 --- a/internal/component/otelcol/exporter/otlp/otlp.go +++ b/internal/component/otelcol/exporter/otlp/otlp.go @@ -30,15 +30,15 @@ func init() { // Arguments configures the otelcol.exporter.otlp component. type Arguments struct { - Timeout time.Duration `river:"timeout,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` - Queue otelcol.QueueArguments `river:"sending_queue,block,optional"` - Retry otelcol.RetryArguments `river:"retry_on_failure,block,optional"` + Queue otelcol.QueueArguments `alloy:"sending_queue,block,optional"` + Retry otelcol.RetryArguments `alloy:"retry_on_failure,block,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` - Client GRPCClientArguments `river:"client,block"` + Client GRPCClientArguments `alloy:"client,block"` } var _ exporter.Arguments = Arguments{} diff --git a/internal/component/otelcol/exporter/otlphttp/otlphttp.go b/internal/component/otelcol/exporter/otlphttp/otlphttp.go index a5c4dbe1de..6457d379ca 100644 --- a/internal/component/otelcol/exporter/otlphttp/otlphttp.go +++ b/internal/component/otelcol/exporter/otlphttp/otlphttp.go @@ -30,20 +30,20 @@ func init() { // Arguments configures the otelcol.exporter.otlphttp component. type Arguments struct { - Client HTTPClientArguments `river:"client,block"` - Queue otelcol.QueueArguments `river:"sending_queue,block,optional"` - Retry otelcol.RetryArguments `river:"retry_on_failure,block,optional"` + Client HTTPClientArguments `alloy:"client,block"` + Queue otelcol.QueueArguments `alloy:"sending_queue,block,optional"` + Retry otelcol.RetryArguments `alloy:"retry_on_failure,block,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // The URLs to send metrics/logs/traces to. If omitted the exporter will // use Client.Endpoint by appending "/v1/metrics", "/v1/logs" or // "/v1/traces", respectively. If set, these settings override // Client.Endpoint for the corresponding signal. - TracesEndpoint string `river:"traces_endpoint,attr,optional"` - MetricsEndpoint string `river:"metrics_endpoint,attr,optional"` - LogsEndpoint string `river:"logs_endpoint,attr,optional"` + TracesEndpoint string `alloy:"traces_endpoint,attr,optional"` + MetricsEndpoint string `alloy:"metrics_endpoint,attr,optional"` + LogsEndpoint string `alloy:"logs_endpoint,attr,optional"` } var _ exporter.Arguments = Arguments{} diff --git a/internal/component/otelcol/exporter/prometheus/prometheus.go b/internal/component/otelcol/exporter/prometheus/prometheus.go index 630f341af6..f85f566bb0 100644 --- a/internal/component/otelcol/exporter/prometheus/prometheus.go +++ b/internal/component/otelcol/exporter/prometheus/prometheus.go @@ -33,13 +33,13 @@ func init() { // Arguments configures the otelcol.exporter.prometheus component. type Arguments struct { - IncludeTargetInfo bool `river:"include_target_info,attr,optional"` - IncludeScopeInfo bool `river:"include_scope_info,attr,optional"` - IncludeScopeLabels bool `river:"include_scope_labels,attr,optional"` - GCFrequency time.Duration `river:"gc_frequency,attr,optional"` - ForwardTo []storage.Appendable `river:"forward_to,attr"` - AddMetricSuffixes bool `river:"add_metric_suffixes,attr,optional"` - ResourceToTelemetryConversion bool `river:"resource_to_telemetry_conversion,attr,optional"` + IncludeTargetInfo bool `alloy:"include_target_info,attr,optional"` + IncludeScopeInfo bool `alloy:"include_scope_info,attr,optional"` + IncludeScopeLabels bool `alloy:"include_scope_labels,attr,optional"` + GCFrequency time.Duration `alloy:"gc_frequency,attr,optional"` + ForwardTo []storage.Appendable `alloy:"forward_to,attr"` + AddMetricSuffixes bool `alloy:"add_metric_suffixes,attr,optional"` + ResourceToTelemetryConversion bool `alloy:"resource_to_telemetry_conversion,attr,optional"` } // DefaultArguments holds defaults values. diff --git a/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go index 3b4b5a7689..815e734a82 100644 --- a/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go +++ b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go @@ -39,17 +39,17 @@ type ( // Arguments configures the otelcol.extension.jaegerremotesampling component. type Arguments struct { - GRPC *GRPCServerArguments `river:"grpc,block,optional"` - HTTP *HTTPServerArguments `river:"http,block,optional"` + GRPC *GRPCServerArguments `alloy:"grpc,block,optional"` + HTTP *HTTPServerArguments `alloy:"http,block,optional"` - Source ArgumentsSource `river:"source,block"` + Source ArgumentsSource `alloy:"source,block"` } type ArgumentsSource struct { - Content string `river:"content,attr,optional"` - Remote *GRPCClientArguments `river:"remote,block,optional"` - File string `river:"file,attr,optional"` - ReloadInterval time.Duration `river:"reload_interval,attr,optional"` + Content string `alloy:"content,attr,optional"` + Remote *GRPCClientArguments `alloy:"remote,block,optional"` + File string `alloy:"file,attr,optional"` + ReloadInterval time.Duration `alloy:"reload_interval,attr,optional"` } var ( diff --git a/internal/component/otelcol/processor/attributes/attributes.go b/internal/component/otelcol/processor/attributes/attributes.go index fb7139c388..0f0cef5771 100644 --- a/internal/component/otelcol/processor/attributes/attributes.go +++ b/internal/component/otelcol/processor/attributes/attributes.go @@ -31,14 +31,14 @@ func init() { // Arguments configures the otelcol.processor.attributes component. type Arguments struct { // Pre-processing filtering to include/exclude data from the processor. - Match otelcol.MatchConfig `river:",squash"` + Match otelcol.MatchConfig `alloy:",squash"` // Actions performed on the input data in the order specified in the config. // Example actions are "insert", "update", "upsert", "delete", "hash". - Actions otelcol.AttrActionKeyValueSlice `river:"action,block,optional"` + Actions otelcol.AttrActionKeyValueSlice `alloy:"action,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/batch/batch.go b/internal/component/otelcol/processor/batch/batch.go index 1d79cca1f0..3f659fb6bd 100644 --- a/internal/component/otelcol/processor/batch/batch.go +++ b/internal/component/otelcol/processor/batch/batch.go @@ -30,14 +30,14 @@ func init() { // Arguments configures the otelcol.processor.batch component. type Arguments struct { - Timeout time.Duration `river:"timeout,attr,optional"` - SendBatchSize uint32 `river:"send_batch_size,attr,optional"` - SendBatchMaxSize uint32 `river:"send_batch_max_size,attr,optional"` - MetadataKeys []string `river:"metadata_keys,attr,optional"` - MetadataCardinalityLimit uint32 `river:"metadata_cardinality_limit,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + SendBatchSize uint32 `alloy:"send_batch_size,attr,optional"` + SendBatchMaxSize uint32 `alloy:"send_batch_max_size,attr,optional"` + MetadataKeys []string `alloy:"metadata_keys,attr,optional"` + MetadataCardinalityLimit uint32 `alloy:"metadata_cardinality_limit,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/discovery/discovery.go b/internal/component/otelcol/processor/discovery/discovery.go index 2607ada090..24de52597a 100644 --- a/internal/component/otelcol/processor/discovery/discovery.go +++ b/internal/component/otelcol/processor/discovery/discovery.go @@ -32,12 +32,12 @@ func init() { // Arguments configures the otelcol.processor.discovery component. type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - OperationType string `river:"operation_type,attr,optional"` - PodAssociations []string `river:"pod_associations,attr,optional"` + Targets []discovery.Target `alloy:"targets,attr"` + OperationType string `alloy:"operation_type,attr,optional"` + PodAssociations []string `alloy:"pod_associations,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/filter/filter.go b/internal/component/otelcol/processor/filter/filter.go index ef0915d364..64c01d15b6 100644 --- a/internal/component/otelcol/processor/filter/filter.go +++ b/internal/component/otelcol/processor/filter/filter.go @@ -28,13 +28,13 @@ func init() { type Arguments struct { // ErrorMode determines how the processor reacts to errors that occur while processing a statement. - ErrorMode ottl.ErrorMode `river:"error_mode,attr,optional"` - Traces TraceConfig `river:"traces,block,optional"` - Metrics MetricConfig `river:"metrics,block,optional"` - Logs LogConfig `river:"logs,block,optional"` + ErrorMode ottl.ErrorMode `alloy:"error_mode,attr,optional"` + Traces TraceConfig `alloy:"traces,block,optional"` + Metrics MetricConfig `alloy:"metrics,block,optional"` + Logs LogConfig `alloy:"logs,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/filter/types.go b/internal/component/otelcol/processor/filter/types.go index 0752930abf..559e84e296 100644 --- a/internal/component/otelcol/processor/filter/types.go +++ b/internal/component/otelcol/processor/filter/types.go @@ -1,16 +1,16 @@ package filter type TraceConfig struct { - Span []string `river:"span,attr,optional"` - SpanEvent []string `river:"spanevent,attr,optional"` + Span []string `alloy:"span,attr,optional"` + SpanEvent []string `alloy:"spanevent,attr,optional"` } type MetricConfig struct { - Metric []string `river:"metric,attr,optional"` - Datapoint []string `river:"datapoint,attr,optional"` + Metric []string `alloy:"metric,attr,optional"` + Datapoint []string `alloy:"datapoint,attr,optional"` } type LogConfig struct { - LogRecord []string `river:"log_record,attr,optional"` + LogRecord []string `alloy:"log_record,attr,optional"` } func (args *TraceConfig) convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/k8sattributes/k8sattributes.go b/internal/component/otelcol/processor/k8sattributes/k8sattributes.go index 082fc6d51a..c5805c525d 100644 --- a/internal/component/otelcol/processor/k8sattributes/k8sattributes.go +++ b/internal/component/otelcol/processor/k8sattributes/k8sattributes.go @@ -32,15 +32,15 @@ var ( // Arguments configures the otelcol.processor.k8sattributes component. type Arguments struct { - AuthType string `river:"auth_type,attr,optional"` - Passthrough bool `river:"passthrough,attr,optional"` - ExtractConfig ExtractConfig `river:"extract,block,optional"` - Filter FilterConfig `river:"filter,block,optional"` - PodAssociations PodAssociationSlice `river:"pod_association,block,optional"` - Exclude ExcludeConfig `river:"exclude,block,optional"` + AuthType string `alloy:"auth_type,attr,optional"` + Passthrough bool `alloy:"passthrough,attr,optional"` + ExtractConfig ExtractConfig `alloy:"extract,block,optional"` + Filter FilterConfig `alloy:"filter,block,optional"` + PodAssociations PodAssociationSlice `alloy:"pod_association,block,optional"` + Exclude ExcludeConfig `alloy:"exclude,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/otelcol/processor/k8sattributes/types.go b/internal/component/otelcol/processor/k8sattributes/types.go index d44d8f5828..8977caa880 100644 --- a/internal/component/otelcol/processor/k8sattributes/types.go +++ b/internal/component/otelcol/processor/k8sattributes/types.go @@ -1,11 +1,11 @@ package k8sattributes type FieldExtractConfig struct { - TagName string `river:"tag_name,attr,optional"` - Key string `river:"key,attr,optional"` - KeyRegex string `river:"key_regex,attr,optional"` - Regex string `river:"regex,attr,optional"` - From string `river:"from,attr,optional"` + TagName string `alloy:"tag_name,attr,optional"` + Key string `alloy:"key,attr,optional"` + KeyRegex string `alloy:"key_regex,attr,optional"` + Regex string `alloy:"regex,attr,optional"` + From string `alloy:"from,attr,optional"` } func (args FieldExtractConfig) convert() map[string]interface{} { @@ -19,9 +19,9 @@ func (args FieldExtractConfig) convert() map[string]interface{} { } type ExtractConfig struct { - Metadata []string `river:"metadata,attr,optional"` - Annotations []FieldExtractConfig `river:"annotation,block,optional"` - Labels []FieldExtractConfig `river:"label,block,optional"` + Metadata []string `alloy:"metadata,attr,optional"` + Annotations []FieldExtractConfig `alloy:"annotation,block,optional"` + Labels []FieldExtractConfig `alloy:"label,block,optional"` } func (args ExtractConfig) convert() map[string]interface{} { @@ -44,9 +44,9 @@ func (args ExtractConfig) convert() map[string]interface{} { } type FieldFilterConfig struct { - Key string `river:"key,attr"` - Value string `river:"value,attr"` - Op string `river:"op,attr,optional"` + Key string `alloy:"key,attr"` + Value string `alloy:"value,attr"` + Op string `alloy:"op,attr,optional"` } func (args FieldFilterConfig) convert() map[string]interface{} { @@ -58,10 +58,10 @@ func (args FieldFilterConfig) convert() map[string]interface{} { } type FilterConfig struct { - Node string `river:"node,attr,optional"` - Namespace string `river:"namespace,attr,optional"` - Fields []FieldFilterConfig `river:"field,block,optional"` - Labels []FieldFilterConfig `river:"label,block,optional"` + Node string `alloy:"node,attr,optional"` + Namespace string `alloy:"namespace,attr,optional"` + Fields []FieldFilterConfig `alloy:"field,block,optional"` + Labels []FieldFilterConfig `alloy:"label,block,optional"` } func (args FilterConfig) convert() map[string]interface{} { @@ -97,7 +97,7 @@ func (args FilterConfig) convert() map[string]interface{} { } type PodAssociation struct { - Sources []PodAssociationSource `river:"source,block"` + Sources []PodAssociationSource `alloy:"source,block"` } func (args PodAssociation) convert() []map[string]interface{} { @@ -111,8 +111,8 @@ func (args PodAssociation) convert() []map[string]interface{} { } type PodAssociationSource struct { - From string `river:"from,attr"` - Name string `river:"name,attr,optional"` + From string `alloy:"from,attr"` + Name string `alloy:"name,attr,optional"` } func (args PodAssociationSource) convert() map[string]interface{} { @@ -137,11 +137,11 @@ func (args PodAssociationSlice) convert() []map[string]interface{} { } type ExcludeConfig struct { - Pods []ExcludePodConfig `river:"pod,block,optional"` + Pods []ExcludePodConfig `alloy:"pod,block,optional"` } type ExcludePodConfig struct { - Name string `river:"name,attr"` + Name string `alloy:"name,attr"` } func (args ExcludePodConfig) convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/memorylimiter/memorylimiter.go b/internal/component/otelcol/processor/memorylimiter/memorylimiter.go index ee6cc47492..745409749c 100644 --- a/internal/component/otelcol/processor/memorylimiter/memorylimiter.go +++ b/internal/component/otelcol/processor/memorylimiter/memorylimiter.go @@ -31,14 +31,14 @@ func init() { // Arguments configures the otelcol.processor.memory_limiter component. type Arguments struct { - CheckInterval time.Duration `river:"check_interval,attr"` - MemoryLimit units.Base2Bytes `river:"limit,attr,optional"` - MemorySpikeLimit units.Base2Bytes `river:"spike_limit,attr,optional"` - MemoryLimitPercentage uint32 `river:"limit_percentage,attr,optional"` - MemorySpikePercentage uint32 `river:"spike_limit_percentage,attr,optional"` + CheckInterval time.Duration `alloy:"check_interval,attr"` + MemoryLimit units.Base2Bytes `alloy:"limit,attr,optional"` + MemorySpikeLimit units.Base2Bytes `alloy:"spike_limit,attr,optional"` + MemoryLimitPercentage uint32 `alloy:"limit_percentage,attr,optional"` + MemorySpikePercentage uint32 `alloy:"spike_limit_percentage,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go index ca33f9792f..e23d183818 100644 --- a/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go +++ b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go @@ -28,14 +28,14 @@ func init() { // Arguments configures the otelcol.processor.probabilistic_sampler component. type Arguments struct { - SamplingPercentage float32 `river:"sampling_percentage,attr,optional"` - HashSeed uint32 `river:"hash_seed,attr,optional"` - AttributeSource string `river:"attribute_source,attr,optional"` - FromAttribute string `river:"from_attribute,attr,optional"` - SamplingPriority string `river:"sampling_priority,attr,optional"` + SamplingPercentage float32 `alloy:"sampling_percentage,attr,optional"` + HashSeed uint32 `alloy:"hash_seed,attr,optional"` + AttributeSource string `alloy:"attribute_source,attr,optional"` + FromAttribute string `alloy:"from_attribute,attr,optional"` + SamplingPriority string `alloy:"sampling_priority,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go index 41ccdf00b9..ac8a772da9 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go @@ -11,8 +11,8 @@ const Name = "ec2" type Config struct { // Tags is a list of regex's to match ec2 instance tag keys that users want // to add as resource attributes to processed data - Tags []string `river:"tags,attr,optional"` - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + Tags []string `alloy:"tags,attr,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -46,15 +46,15 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config to enable and disable resource attributes. type ResourceAttributesConfig struct { - CloudAccountID rac.ResourceAttributeConfig `river:"cloud.account.id,block,optional"` - CloudAvailabilityZone rac.ResourceAttributeConfig `river:"cloud.availability_zone,block,optional"` - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - HostID rac.ResourceAttributeConfig `river:"host.id,block,optional"` - HostImageID rac.ResourceAttributeConfig `river:"host.image.id,block,optional"` - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` - HostType rac.ResourceAttributeConfig `river:"host.type,block,optional"` + CloudAccountID rac.ResourceAttributeConfig `alloy:"cloud.account.id,block,optional"` + CloudAvailabilityZone rac.ResourceAttributeConfig `alloy:"cloud.availability_zone,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + HostID rac.ResourceAttributeConfig `alloy:"host.id,block,optional"` + HostImageID rac.ResourceAttributeConfig `alloy:"host.image.id,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` + HostType rac.ResourceAttributeConfig `alloy:"host.type,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go index 101941f223..e9c8a43506 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go @@ -8,7 +8,7 @@ import ( const Name = "ecs" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -50,20 +50,20 @@ func (args *Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for ecs resource attributes. type ResourceAttributesConfig struct { - AwsEcsClusterArn rac.ResourceAttributeConfig `river:"aws.ecs.cluster.arn,block,optional"` - AwsEcsLaunchtype rac.ResourceAttributeConfig `river:"aws.ecs.launchtype,block,optional"` - AwsEcsTaskArn rac.ResourceAttributeConfig `river:"aws.ecs.task.arn,block,optional"` - AwsEcsTaskFamily rac.ResourceAttributeConfig `river:"aws.ecs.task.family,block,optional"` - AwsEcsTaskRevision rac.ResourceAttributeConfig `river:"aws.ecs.task.revision,block,optional"` - AwsLogGroupArns rac.ResourceAttributeConfig `river:"aws.log.group.arns,block,optional"` - AwsLogGroupNames rac.ResourceAttributeConfig `river:"aws.log.group.names,block,optional"` - AwsLogStreamArns rac.ResourceAttributeConfig `river:"aws.log.stream.arns,block,optional"` - AwsLogStreamNames rac.ResourceAttributeConfig `river:"aws.log.stream.names,block,optional"` - CloudAccountID rac.ResourceAttributeConfig `river:"cloud.account.id,block,optional"` - CloudAvailabilityZone rac.ResourceAttributeConfig `river:"cloud.availability_zone,block,optional"` - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` + AwsEcsClusterArn rac.ResourceAttributeConfig `alloy:"aws.ecs.cluster.arn,block,optional"` + AwsEcsLaunchtype rac.ResourceAttributeConfig `alloy:"aws.ecs.launchtype,block,optional"` + AwsEcsTaskArn rac.ResourceAttributeConfig `alloy:"aws.ecs.task.arn,block,optional"` + AwsEcsTaskFamily rac.ResourceAttributeConfig `alloy:"aws.ecs.task.family,block,optional"` + AwsEcsTaskRevision rac.ResourceAttributeConfig `alloy:"aws.ecs.task.revision,block,optional"` + AwsLogGroupArns rac.ResourceAttributeConfig `alloy:"aws.log.group.arns,block,optional"` + AwsLogGroupNames rac.ResourceAttributeConfig `alloy:"aws.log.group.names,block,optional"` + AwsLogStreamArns rac.ResourceAttributeConfig `alloy:"aws.log.stream.arns,block,optional"` + AwsLogStreamNames rac.ResourceAttributeConfig `alloy:"aws.log.stream.names,block,optional"` + CloudAccountID rac.ResourceAttributeConfig `alloy:"cloud.account.id,block,optional"` + CloudAvailabilityZone rac.ResourceAttributeConfig `alloy:"cloud.availability_zone,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go index e3bc1c962d..c44b42a639 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go @@ -8,7 +8,7 @@ import ( const Name = "eks" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -34,8 +34,8 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for eks resource attributes. type ResourceAttributesConfig struct { - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go index 2593f17c6f..3500bc8b33 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go @@ -8,7 +8,7 @@ import ( const Name = "elasticbeanstalk" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -37,11 +37,11 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for elastic_beanstalk resource attributes. type ResourceAttributesConfig struct { - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - DeploymentEnvironment rac.ResourceAttributeConfig `river:"deployment.environment,block,optional"` - ServiceInstanceID rac.ResourceAttributeConfig `river:"service.instance.id,block,optional"` - ServiceVersion rac.ResourceAttributeConfig `river:"service.version,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + DeploymentEnvironment rac.ResourceAttributeConfig `alloy:"deployment.environment,block,optional"` + ServiceInstanceID rac.ResourceAttributeConfig `alloy:"service.instance.id,block,optional"` + ServiceVersion rac.ResourceAttributeConfig `alloy:"service.version,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go index b10990c6c3..6f185d9b2d 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go @@ -8,7 +8,7 @@ import ( const Name = "lambda" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -41,15 +41,15 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for lambda resource attributes. type ResourceAttributesConfig struct { - AwsLogGroupNames rac.ResourceAttributeConfig `river:"aws.log.group.names,block,optional"` - AwsLogStreamNames rac.ResourceAttributeConfig `river:"aws.log.stream.names,block,optional"` - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - FaasInstance rac.ResourceAttributeConfig `river:"faas.instance,block,optional"` - FaasMaxMemory rac.ResourceAttributeConfig `river:"faas.max_memory,block,optional"` - FaasName rac.ResourceAttributeConfig `river:"faas.name,block,optional"` - FaasVersion rac.ResourceAttributeConfig `river:"faas.version,block,optional"` + AwsLogGroupNames rac.ResourceAttributeConfig `alloy:"aws.log.group.names,block,optional"` + AwsLogStreamNames rac.ResourceAttributeConfig `alloy:"aws.log.stream.names,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + FaasInstance rac.ResourceAttributeConfig `alloy:"faas.instance,block,optional"` + FaasMaxMemory rac.ResourceAttributeConfig `alloy:"faas.max_memory,block,optional"` + FaasName rac.ResourceAttributeConfig `alloy:"faas.name,block,optional"` + FaasVersion rac.ResourceAttributeConfig `alloy:"faas.version,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go b/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go index a38838e3d0..656875bd27 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go @@ -8,7 +8,7 @@ import ( const Name = "aks" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -34,8 +34,8 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for aks resource attributes. type ResourceAttributesConfig struct { - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go b/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go index 30a40298b4..871ea577ac 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go @@ -8,7 +8,7 @@ import ( const Name = "azure" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -42,16 +42,16 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for azure resource attributes. type ResourceAttributesConfig struct { - AzureResourcegroupName rac.ResourceAttributeConfig `river:"azure.resourcegroup.name,block,optional"` - AzureVMName rac.ResourceAttributeConfig `river:"azure.vm.name,block,optional"` - AzureVMScalesetName rac.ResourceAttributeConfig `river:"azure.vm.scaleset.name,block,optional"` - AzureVMSize rac.ResourceAttributeConfig `river:"azure.vm.size,block,optional"` - CloudAccountID rac.ResourceAttributeConfig `river:"cloud.account.id,block,optional"` - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - HostID rac.ResourceAttributeConfig `river:"host.id,block,optional"` - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` + AzureResourcegroupName rac.ResourceAttributeConfig `alloy:"azure.resourcegroup.name,block,optional"` + AzureVMName rac.ResourceAttributeConfig `alloy:"azure.vm.name,block,optional"` + AzureVMScalesetName rac.ResourceAttributeConfig `alloy:"azure.vm.scaleset.name,block,optional"` + AzureVMSize rac.ResourceAttributeConfig `alloy:"azure.vm.size,block,optional"` + CloudAccountID rac.ResourceAttributeConfig `alloy:"cloud.account.id,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + HostID rac.ResourceAttributeConfig `alloy:"host.id,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go b/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go index f35f8f8002..b9c6b20886 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go @@ -14,32 +14,32 @@ const Name = "consul" // See `consul.go#NewDetector` for more information. type Config struct { // Address is the address of the Consul server - Address string `river:"address,attr,optional"` + Address string `alloy:"address,attr,optional"` // Datacenter to use. If not provided, the default agent datacenter is used. - Datacenter string `river:"datacenter,attr,optional"` + Datacenter string `alloy:"datacenter,attr,optional"` // Token is used to provide a per-request ACL token which overrides the // agent's default (empty) token. Token is only required if // [Consul's ACL System](https://www.consul.io/docs/security/acl/acl-system) // is enabled. - Token alloytypes.Secret `river:"token,attr,optional"` + Token alloytypes.Secret `alloy:"token,attr,optional"` // TokenFile is not necessary in River because users can use the local.file // Flow component instead. // - // TokenFile string `river:"token_file"` + // TokenFile string `alloy:"token_file"` // Namespace is the name of the namespace to send along for the request // when no other Namespace is present in the QueryOptions - Namespace string `river:"namespace,attr,optional"` + Namespace string `alloy:"namespace,attr,optional"` // Allowlist of [Consul Metadata](https://www.consul.io/docs/agent/options#node_meta) // keys to use as resource attributes. - MetaLabels []string `river:"meta,attr,optional"` + MetaLabels []string `alloy:"meta,attr,optional"` // ResourceAttributes configuration for Consul detector - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -80,9 +80,9 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for consul resource attributes. type ResourceAttributesConfig struct { - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - HostID rac.ResourceAttributeConfig `river:"host.id,block,optional"` - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + HostID rac.ResourceAttributeConfig `alloy:"host.id,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` } func (r *ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go b/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go index a0b2828fe0..badceabdbe 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go @@ -8,7 +8,7 @@ import ( const Name = "docker" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -34,8 +34,8 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for docker resource attributes. type ResourceAttributesConfig struct { - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` - OsType rac.ResourceAttributeConfig `river:"os.type,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` + OsType rac.ResourceAttributeConfig `alloy:"os.type,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go b/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go index 85ebffb55e..da95652600 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go @@ -8,7 +8,7 @@ import ( const Name = "gcp" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -49,23 +49,23 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for gcp resource attributes. type ResourceAttributesConfig struct { - CloudAccountID rac.ResourceAttributeConfig `river:"cloud.account.id,block,optional"` - CloudAvailabilityZone rac.ResourceAttributeConfig `river:"cloud.availability_zone,block,optional"` - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - FaasID rac.ResourceAttributeConfig `river:"faas.id,block,optional"` - FaasInstance rac.ResourceAttributeConfig `river:"faas.instance,block,optional"` - FaasName rac.ResourceAttributeConfig `river:"faas.name,block,optional"` - FaasVersion rac.ResourceAttributeConfig `river:"faas.version,block,optional"` - GcpCloudRunJobExecution rac.ResourceAttributeConfig `river:"gcp.cloud_run.job.execution,block,optional"` - GcpCloudRunJobTaskIndex rac.ResourceAttributeConfig `river:"gcp.cloud_run.job.task_index,block,optional"` - GcpGceInstanceHostname rac.ResourceAttributeConfig `river:"gcp.gce.instance.hostname,block,optional"` - GcpGceInstanceName rac.ResourceAttributeConfig `river:"gcp.gce.instance.name,block,optional"` - HostID rac.ResourceAttributeConfig `river:"host.id,block,optional"` - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` - HostType rac.ResourceAttributeConfig `river:"host.type,block,optional"` - K8sClusterName rac.ResourceAttributeConfig `river:"k8s.cluster.name,block,optional"` + CloudAccountID rac.ResourceAttributeConfig `alloy:"cloud.account.id,block,optional"` + CloudAvailabilityZone rac.ResourceAttributeConfig `alloy:"cloud.availability_zone,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + FaasID rac.ResourceAttributeConfig `alloy:"faas.id,block,optional"` + FaasInstance rac.ResourceAttributeConfig `alloy:"faas.instance,block,optional"` + FaasName rac.ResourceAttributeConfig `alloy:"faas.name,block,optional"` + FaasVersion rac.ResourceAttributeConfig `alloy:"faas.version,block,optional"` + GcpCloudRunJobExecution rac.ResourceAttributeConfig `alloy:"gcp.cloud_run.job.execution,block,optional"` + GcpCloudRunJobTaskIndex rac.ResourceAttributeConfig `alloy:"gcp.cloud_run.job.task_index,block,optional"` + GcpGceInstanceHostname rac.ResourceAttributeConfig `alloy:"gcp.gce.instance.hostname,block,optional"` + GcpGceInstanceName rac.ResourceAttributeConfig `alloy:"gcp.gce.instance.name,block,optional"` + HostID rac.ResourceAttributeConfig `alloy:"host.id,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` + HostType rac.ResourceAttributeConfig `alloy:"host.type,block,optional"` + K8sClusterName rac.ResourceAttributeConfig `alloy:"k8s.cluster.name,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go b/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go index a5e36ff14b..3420a4df07 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go @@ -8,7 +8,7 @@ import ( const Name = "heroku" type Config struct { - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -40,14 +40,14 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for heroku resource attributes. type ResourceAttributesConfig struct { - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - HerokuAppID rac.ResourceAttributeConfig `river:"heroku.app.id,block,optional"` - HerokuDynoID rac.ResourceAttributeConfig `river:"heroku.dyno.id,block,optional"` - HerokuReleaseCommit rac.ResourceAttributeConfig `river:"heroku.release.commit,block,optional"` - HerokuReleaseCreationTimestamp rac.ResourceAttributeConfig `river:"heroku.release.creation_timestamp,block,optional"` - ServiceInstanceID rac.ResourceAttributeConfig `river:"service.instance.id,block,optional"` - ServiceName rac.ResourceAttributeConfig `river:"service.name,block,optional"` - ServiceVersion rac.ResourceAttributeConfig `river:"service.version,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + HerokuAppID rac.ResourceAttributeConfig `alloy:"heroku.app.id,block,optional"` + HerokuDynoID rac.ResourceAttributeConfig `alloy:"heroku.dyno.id,block,optional"` + HerokuReleaseCommit rac.ResourceAttributeConfig `alloy:"heroku.release.commit,block,optional"` + HerokuReleaseCreationTimestamp rac.ResourceAttributeConfig `alloy:"heroku.release.creation_timestamp,block,optional"` + ServiceInstanceID rac.ResourceAttributeConfig `alloy:"service.instance.id,block,optional"` + ServiceName rac.ResourceAttributeConfig `alloy:"service.name,block,optional"` + ServiceVersion rac.ResourceAttributeConfig `alloy:"service.version,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go b/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go index c0922acdfd..7e4c365862 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go @@ -9,7 +9,7 @@ import ( const Name = "kubernetes_node" type Config struct { - KubernetesAPIConfig otelcol.KubernetesAPIConfig `river:",squash"` + KubernetesAPIConfig otelcol.KubernetesAPIConfig `alloy:",squash"` // NodeFromEnv can be used to extract the node name from an environment // variable. The value must be the name of the environment variable. // This is useful when the node where an Agent will run on cannot be @@ -29,8 +29,8 @@ type Config struct { // the agent is running on. // // More on downward API here: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ - NodeFromEnvVar string `river:"node_from_env_var,attr,optional"` - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + NodeFromEnvVar string `alloy:"node_from_env_var,attr,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } var DefaultArguments = Config{ @@ -63,8 +63,8 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for k8snode resource attributes. type ResourceAttributesConfig struct { - K8sNodeName rac.ResourceAttributeConfig `river:"k8s.node.name,block,optional"` - K8sNodeUID rac.ResourceAttributeConfig `river:"k8s.node.uid,block,optional"` + K8sNodeName rac.ResourceAttributeConfig `alloy:"k8s.node.name,block,optional"` + K8sNodeUID rac.ResourceAttributeConfig `alloy:"k8s.node.uid,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go b/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go index 4c53dcc74e..3e6e38af5a 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go @@ -12,16 +12,16 @@ const Name = "openshift" // See `openshift.go#NewDetector` for more information. type Config struct { // Address is the address of the openshift api server - Address string `river:"address,attr,optional"` + Address string `alloy:"address,attr,optional"` // Token is used to identify against the openshift api server - Token string `river:"token,attr,optional"` + Token string `alloy:"token,attr,optional"` // TLSSettings contains TLS configurations that are specific to client // connection used to communicate with the Openshift API. - TLSSettings otelcol.TLSClientArguments `river:"tls,block,optional"` + TLSSettings otelcol.TLSClientArguments `alloy:"tls,block,optional"` - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } // DefaultArguments holds default settings for Config. @@ -52,10 +52,10 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for openshift resource attributes. type ResourceAttributesConfig struct { - CloudPlatform rac.ResourceAttributeConfig `river:"cloud.platform,block,optional"` - CloudProvider rac.ResourceAttributeConfig `river:"cloud.provider,block,optional"` - CloudRegion rac.ResourceAttributeConfig `river:"cloud.region,block,optional"` - K8sClusterName rac.ResourceAttributeConfig `river:"k8s.cluster.name,block,optional"` + CloudPlatform rac.ResourceAttributeConfig `alloy:"cloud.platform,block,optional"` + CloudProvider rac.ResourceAttributeConfig `alloy:"cloud.provider,block,optional"` + CloudRegion rac.ResourceAttributeConfig `alloy:"cloud.region,block,optional"` + K8sClusterName rac.ResourceAttributeConfig `alloy:"k8s.cluster.name,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go b/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go index ff5540a2f5..2af8a4b40f 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go @@ -2,7 +2,7 @@ package resource_attribute_config // Configures whether a resource attribute should be enabled or not. type ResourceAttributeConfig struct { - Enabled bool `river:"enabled,attr"` + Enabled bool `alloy:"enabled,attr"` } func (r ResourceAttributeConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/internal/system/config.go b/internal/component/otelcol/processor/resourcedetection/internal/system/config.go index 4ab51788a1..8c90539a33 100644 --- a/internal/component/otelcol/processor/resourcedetection/internal/system/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/system/config.go @@ -14,9 +14,9 @@ type Config struct { // The HostnameSources is a priority list of sources from which hostname will be fetched. // In case of the error in fetching hostname from source, // the next source from the list will be considered. - HostnameSources []string `river:"hostname_sources,attr,optional"` + HostnameSources []string `alloy:"hostname_sources,attr,optional"` - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } var _ syntax.Defaulter = (*Config)(nil) @@ -63,17 +63,17 @@ func (args Config) Convert() map[string]interface{} { // ResourceAttributesConfig provides config for system resource attributes. type ResourceAttributesConfig struct { - HostArch rac.ResourceAttributeConfig `river:"host.arch,block,optional"` - HostCPUCacheL2Size rac.ResourceAttributeConfig `river:"host.cpu.cache.l2.size,block,optional"` - HostCPUFamily rac.ResourceAttributeConfig `river:"host.cpu.family,block,optional"` - HostCPUModelID rac.ResourceAttributeConfig `river:"host.cpu.model.id,block,optional"` - HostCPUModelName rac.ResourceAttributeConfig `river:"host.cpu.model.name,block,optional"` - HostCPUStepping rac.ResourceAttributeConfig `river:"host.cpu.stepping,block,optional"` - HostCPUVendorID rac.ResourceAttributeConfig `river:"host.cpu.vendor.id,block,optional"` - HostID rac.ResourceAttributeConfig `river:"host.id,block,optional"` - HostName rac.ResourceAttributeConfig `river:"host.name,block,optional"` - OsDescription rac.ResourceAttributeConfig `river:"os.description,block,optional"` - OsType rac.ResourceAttributeConfig `river:"os.type,block,optional"` + HostArch rac.ResourceAttributeConfig `alloy:"host.arch,block,optional"` + HostCPUCacheL2Size rac.ResourceAttributeConfig `alloy:"host.cpu.cache.l2.size,block,optional"` + HostCPUFamily rac.ResourceAttributeConfig `alloy:"host.cpu.family,block,optional"` + HostCPUModelID rac.ResourceAttributeConfig `alloy:"host.cpu.model.id,block,optional"` + HostCPUModelName rac.ResourceAttributeConfig `alloy:"host.cpu.model.name,block,optional"` + HostCPUStepping rac.ResourceAttributeConfig `alloy:"host.cpu.stepping,block,optional"` + HostCPUVendorID rac.ResourceAttributeConfig `alloy:"host.cpu.vendor.id,block,optional"` + HostID rac.ResourceAttributeConfig `alloy:"host.id,block,optional"` + HostName rac.ResourceAttributeConfig `alloy:"host.name,block,optional"` + OsDescription rac.ResourceAttributeConfig `alloy:"os.description,block,optional"` + OsType rac.ResourceAttributeConfig `alloy:"os.type,block,optional"` } func (r ResourceAttributesConfig) Convert() map[string]interface{} { diff --git a/internal/component/otelcol/processor/resourcedetection/resourcedetection.go b/internal/component/otelcol/processor/resourcedetection/resourcedetection.go index 8a6a8a8f61..7e5d617163 100644 --- a/internal/component/otelcol/processor/resourcedetection/resourcedetection.go +++ b/internal/component/otelcol/processor/resourcedetection/resourcedetection.go @@ -47,19 +47,19 @@ func init() { type Arguments struct { // Detectors is an ordered list of named detectors that should be // run to attempt to detect resource information. - Detectors []string `river:"detectors,attr,optional"` + Detectors []string `alloy:"detectors,attr,optional"` // Override indicates whether any existing resource attributes // should be overridden or preserved. Defaults to true. - Override bool `river:"override,attr,optional"` + Override bool `alloy:"override,attr,optional"` // DetectorConfig is a list of settings specific to all detectors - DetectorConfig DetectorConfig `river:",squash"` + DetectorConfig DetectorConfig `alloy:",squash"` // HTTP client settings for the detector // Timeout default is 5s - Timeout time.Duration `river:"timeout,attr,optional"` - // Client otelcol.HTTPClientArguments `river:",squash"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + // Client otelcol.HTTPClientArguments `alloy:",squash"` //TODO: Uncomment this later, and remove Timeout? // Can we just get away with a timeout, or do we need all the http client settings? // It seems that HTTP client settings are only used in the ec2 detection via ClientFromContext. @@ -68,52 +68,52 @@ type Arguments struct { // We'd have to mention that they're only for a very specific use case. // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } // DetectorConfig contains user-specified configurations unique to all individual detectors type DetectorConfig struct { // EC2Config contains user-specified configurations for the EC2 detector - EC2Config ec2.Config `river:"ec2,block,optional"` + EC2Config ec2.Config `alloy:"ec2,block,optional"` // ECSConfig contains user-specified configurations for the ECS detector - ECSConfig ecs.Config `river:"ecs,block,optional"` + ECSConfig ecs.Config `alloy:"ecs,block,optional"` // EKSConfig contains user-specified configurations for the EKS detector - EKSConfig eks.Config `river:"eks,block,optional"` + EKSConfig eks.Config `alloy:"eks,block,optional"` // Elasticbeanstalk contains user-specified configurations for the elasticbeanstalk detector - ElasticbeanstalkConfig elasticbeanstalk.Config `river:"elasticbeanstalk,block,optional"` + ElasticbeanstalkConfig elasticbeanstalk.Config `alloy:"elasticbeanstalk,block,optional"` // Lambda contains user-specified configurations for the lambda detector - LambdaConfig lambda.Config `river:"lambda,block,optional"` + LambdaConfig lambda.Config `alloy:"lambda,block,optional"` // Azure contains user-specified configurations for the azure detector - AzureConfig azure.Config `river:"azure,block,optional"` + AzureConfig azure.Config `alloy:"azure,block,optional"` // Aks contains user-specified configurations for the aks detector - AksConfig aks.Config `river:"aks,block,optional"` + AksConfig aks.Config `alloy:"aks,block,optional"` // ConsulConfig contains user-specified configurations for the Consul detector - ConsulConfig consul.Config `river:"consul,block,optional"` + ConsulConfig consul.Config `alloy:"consul,block,optional"` // DockerConfig contains user-specified configurations for the docker detector - DockerConfig docker.Config `river:"docker,block,optional"` + DockerConfig docker.Config `alloy:"docker,block,optional"` // GcpConfig contains user-specified configurations for the gcp detector - GcpConfig gcp.Config `river:"gcp,block,optional"` + GcpConfig gcp.Config `alloy:"gcp,block,optional"` // HerokuConfig contains user-specified configurations for the heroku detector - HerokuConfig heroku.Config `river:"heroku,block,optional"` + HerokuConfig heroku.Config `alloy:"heroku,block,optional"` // SystemConfig contains user-specified configurations for the System detector - SystemConfig system.Config `river:"system,block,optional"` + SystemConfig system.Config `alloy:"system,block,optional"` // OpenShift contains user-specified configurations for the Openshift detector - OpenShiftConfig openshift.Config `river:"openshift,block,optional"` + OpenShiftConfig openshift.Config `alloy:"openshift,block,optional"` // KubernetesNode contains user-specified configurations for the K8SNode detector - KubernetesNodeConfig k8snode.Config `river:"kubernetes_node,block,optional"` + KubernetesNodeConfig k8snode.Config `alloy:"kubernetes_node,block,optional"` } func (dc *DetectorConfig) SetToDefault() { diff --git a/internal/component/otelcol/processor/span/span.go b/internal/component/otelcol/processor/span/span.go index 9c1fb5ef30..57e4884709 100644 --- a/internal/component/otelcol/processor/span/span.go +++ b/internal/component/otelcol/processor/span/span.go @@ -31,16 +31,16 @@ func init() { // Arguments configures the otelcol.processor.span component. type Arguments struct { - Match otelcol.MatchConfig `river:",squash"` + Match otelcol.MatchConfig `alloy:",squash"` // Name specifies the components required to re-name a span. - Name Name `river:"name,block,optional"` + Name Name `alloy:"name,block,optional"` // SetStatus specifies status which should be set for this span. - SetStatus *Status `river:"status,block,optional"` + SetStatus *Status `alloy:"status,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( @@ -132,15 +132,15 @@ type Name struct { // will occur. // Note: The new span name is constructed in order of the `from_attributes` // specified in the configuration. This field is required and cannot be empty. - FromAttributes []string `river:"from_attributes,attr,optional"` + FromAttributes []string `alloy:"from_attributes,attr,optional"` // Separator is the string used to separate attributes values in the new // span name. If no value is set, no separator is used between attribute // values. Used with FromAttributes only. - Separator string `river:"separator,attr,optional"` + Separator string `alloy:"separator,attr,optional"` // ToAttributes specifies a configuration to extract attributes from span name. - ToAttributes *ToAttributes `river:"to_attributes,block,optional"` + ToAttributes *ToAttributes `alloy:"to_attributes,block,optional"` } func (n *Name) Convert() *spanprocessor.Name { @@ -167,12 +167,12 @@ type ToAttributes struct { // already exist in the span then they will be overwritten. The process is repeated // for all rules in the order they are specified. Each subsequent rule works on the // span name that is the output after processing the previous rule. - Rules []string `river:"rules,attr"` + Rules []string `alloy:"rules,attr"` // BreakAfterMatch specifies if processing of rules should stop after the first // match. If it is false rule processing will continue to be performed over the // modified span name. - BreakAfterMatch bool `river:"break_after_match,attr,optional"` + BreakAfterMatch bool `alloy:"break_after_match,attr,optional"` } // DefaultArguments holds default settings for Arguments. @@ -203,10 +203,10 @@ func (ta *ToAttributes) Convert() *spanprocessor.ToAttributes { type Status struct { // Code is one of three values "Ok" or "Error" or "Unset". Please check: // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status - Code string `river:"code,attr"` + Code string `alloy:"code,attr"` // Description is an optional field documenting Error statuses. - Description string `river:"description,attr,optional"` + Description string `alloy:"description,attr,optional"` } var ( diff --git a/internal/component/otelcol/processor/tail_sampling/tail_sampling.go b/internal/component/otelcol/processor/tail_sampling/tail_sampling.go index c06fd3a0a8..9eb6c627dc 100644 --- a/internal/component/otelcol/processor/tail_sampling/tail_sampling.go +++ b/internal/component/otelcol/processor/tail_sampling/tail_sampling.go @@ -30,12 +30,12 @@ func init() { // Arguments configures the otelcol.processor.tail_sampling component. type Arguments struct { - PolicyCfgs []PolicyConfig `river:"policy,block"` - DecisionWait time.Duration `river:"decision_wait,attr,optional"` - NumTraces uint64 `river:"num_traces,attr,optional"` - ExpectedNewTracesPerSec uint64 `river:"expected_new_traces_per_sec,attr,optional"` + PolicyCfgs []PolicyConfig `alloy:"policy,block"` + DecisionWait time.Duration `alloy:"decision_wait,attr,optional"` + NumTraces uint64 `alloy:"num_traces,attr,optional"` + ExpectedNewTracesPerSec uint64 `alloy:"expected_new_traces_per_sec,attr,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/processor/tail_sampling/types.go b/internal/component/otelcol/processor/tail_sampling/types.go index 36c97adca2..3c35a36189 100644 --- a/internal/component/otelcol/processor/tail_sampling/types.go +++ b/internal/component/otelcol/processor/tail_sampling/types.go @@ -12,13 +12,13 @@ import ( ) type PolicyConfig struct { - SharedPolicyConfig SharedPolicyConfig `river:",squash"` + SharedPolicyConfig SharedPolicyConfig `alloy:",squash"` // Configs for defining composite policy - CompositeConfig CompositeConfig `river:"composite,block,optional"` + CompositeConfig CompositeConfig `alloy:"composite,block,optional"` // Configs for defining and policy - AndConfig AndConfig `river:"and,block,optional"` + AndConfig AndConfig `alloy:"and,block,optional"` } func (policyConfig PolicyConfig) Convert() tsp.PolicyCfg { @@ -46,25 +46,25 @@ func (policyConfig PolicyConfig) Convert() tsp.PolicyCfg { // This cannot currently have a Convert() because tsp.sharedPolicyCfg isn't public type SharedPolicyConfig struct { - Name string `river:"name,attr"` - Type string `river:"type,attr"` - LatencyConfig LatencyConfig `river:"latency,block,optional"` - NumericAttributeConfig NumericAttributeConfig `river:"numeric_attribute,block,optional"` - ProbabilisticConfig ProbabilisticConfig `river:"probabilistic,block,optional"` - StatusCodeConfig StatusCodeConfig `river:"status_code,block,optional"` - StringAttributeConfig StringAttributeConfig `river:"string_attribute,block,optional"` - RateLimitingConfig RateLimitingConfig `river:"rate_limiting,block,optional"` - SpanCountConfig SpanCountConfig `river:"span_count,block,optional"` - BooleanAttributeConfig BooleanAttributeConfig `river:"boolean_attribute,block,optional"` - OttlConditionConfig OttlConditionConfig `river:"ottl_condition,block,optional"` - TraceStateConfig TraceStateConfig `river:"trace_state,block,optional"` + Name string `alloy:"name,attr"` + Type string `alloy:"type,attr"` + LatencyConfig LatencyConfig `alloy:"latency,block,optional"` + NumericAttributeConfig NumericAttributeConfig `alloy:"numeric_attribute,block,optional"` + ProbabilisticConfig ProbabilisticConfig `alloy:"probabilistic,block,optional"` + StatusCodeConfig StatusCodeConfig `alloy:"status_code,block,optional"` + StringAttributeConfig StringAttributeConfig `alloy:"string_attribute,block,optional"` + RateLimitingConfig RateLimitingConfig `alloy:"rate_limiting,block,optional"` + SpanCountConfig SpanCountConfig `alloy:"span_count,block,optional"` + BooleanAttributeConfig BooleanAttributeConfig `alloy:"boolean_attribute,block,optional"` + OttlConditionConfig OttlConditionConfig `alloy:"ottl_condition,block,optional"` + TraceStateConfig TraceStateConfig `alloy:"trace_state,block,optional"` } // LatencyConfig holds the configurable settings to create a latency filter sampling policy // evaluator type LatencyConfig struct { // ThresholdMs in milliseconds. - ThresholdMs int64 `river:"threshold_ms,attr"` + ThresholdMs int64 `alloy:"threshold_ms,attr"` } func (latencyConfig LatencyConfig) Convert() tsp.LatencyCfg { @@ -77,15 +77,15 @@ func (latencyConfig LatencyConfig) Convert() tsp.LatencyCfg { // sampling policy evaluator. type NumericAttributeConfig struct { // Tag that the filter is going to be matching against. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // MinValue is the minimum value of the attribute to be considered a match. - MinValue int64 `river:"min_value,attr"` + MinValue int64 `alloy:"min_value,attr"` // MaxValue is the maximum value of the attribute to be considered a match. - MaxValue int64 `river:"max_value,attr"` + MaxValue int64 `alloy:"max_value,attr"` // InvertMatch indicates that values must not match against attribute values. // If InvertMatch is true and Values is equal to '123', all other values will be sampled except '123'. // Also, if the specified Key does not match any resource or span attributes, data will be sampled. - InvertMatch bool `river:"invert_match,attr,optional"` + InvertMatch bool `alloy:"invert_match,attr,optional"` } func (numericAttributeConfig NumericAttributeConfig) Convert() tsp.NumericAttributeCfg { @@ -103,10 +103,10 @@ type ProbabilisticConfig struct { // HashSalt allows one to configure the hashing salts. This is important in scenarios where multiple layers of collectors // have different sampling rates: if they use the same salt all passing one layer may pass the other even if they have // different sampling rates, configuring different salts avoids that. - HashSalt string `river:"hash_salt,attr,optional"` + HashSalt string `alloy:"hash_salt,attr,optional"` // SamplingPercentage is the percentage rate at which traces are going to be sampled. Defaults to zero, i.e.: no sample. // Values greater or equal 100 are treated as "sample all traces". - SamplingPercentage float64 `river:"sampling_percentage,attr"` + SamplingPercentage float64 `alloy:"sampling_percentage,attr"` } func (probabilisticConfig ProbabilisticConfig) Convert() tsp.ProbabilisticCfg { @@ -119,7 +119,7 @@ func (probabilisticConfig ProbabilisticConfig) Convert() tsp.ProbabilisticCfg { // StatusCodeConfig holds the configurable settings to create a status code filter sampling // policy evaluator. type StatusCodeConfig struct { - StatusCodes []string `river:"status_codes,attr"` + StatusCodes []string `alloy:"status_codes,attr"` } func (statusCodeConfig StatusCodeConfig) Convert() tsp.StatusCodeCfg { @@ -132,20 +132,20 @@ func (statusCodeConfig StatusCodeConfig) Convert() tsp.StatusCodeCfg { // sampling policy evaluator. type StringAttributeConfig struct { // Tag that the filter is going to be matching against. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // Values indicate the set of values or regular expressions to use when matching against attribute values. // StringAttribute Policy will apply exact value match on Values unless EnabledRegexMatching is true. - Values []string `river:"values,attr"` + Values []string `alloy:"values,attr"` // EnabledRegexMatching determines whether match attribute values by regexp string. - EnabledRegexMatching bool `river:"enabled_regex_matching,attr,optional"` + EnabledRegexMatching bool `alloy:"enabled_regex_matching,attr,optional"` // CacheMaxSize is the maximum number of attribute entries of LRU Cache that stores the matched result // from the regular expressions defined in Values. // CacheMaxSize will not be used if EnabledRegexMatching is set to false. - CacheMaxSize int `river:"cache_max_size,attr,optional"` + CacheMaxSize int `alloy:"cache_max_size,attr,optional"` // InvertMatch indicates that values or regular expressions must not match against attribute values. // If InvertMatch is true and Values is equal to 'acme', all other values will be sampled except 'acme'. // Also, if the specified Key does not match on any resource or span attributes, data will be sampled. - InvertMatch bool `river:"invert_match,attr,optional"` + InvertMatch bool `alloy:"invert_match,attr,optional"` } func (stringAttributeConfig StringAttributeConfig) Convert() tsp.StringAttributeCfg { @@ -162,7 +162,7 @@ func (stringAttributeConfig StringAttributeConfig) Convert() tsp.StringAttribute // sampling policy evaluator. type RateLimitingConfig struct { // SpansPerSecond sets the limit on the maximum nuber of spans that can be processed each second. - SpansPerSecond int64 `river:"spans_per_second,attr"` + SpansPerSecond int64 `alloy:"spans_per_second,attr"` } func (rateLimitingConfig RateLimitingConfig) Convert() tsp.RateLimitingCfg { @@ -175,8 +175,8 @@ func (rateLimitingConfig RateLimitingConfig) Convert() tsp.RateLimitingCfg { // sampling policy evaluator type SpanCountConfig struct { // Minimum number of spans in a Trace - MinSpans int32 `river:"min_spans,attr"` - MaxSpans int32 `river:"max_spans,attr,optional"` + MinSpans int32 `alloy:"min_spans,attr"` + MaxSpans int32 `alloy:"max_spans,attr,optional"` } func (spanCountConfig SpanCountConfig) Convert() tsp.SpanCountCfg { @@ -190,10 +190,10 @@ func (spanCountConfig SpanCountConfig) Convert() tsp.SpanCountCfg { // sampling policy evaluator. type BooleanAttributeConfig struct { // Tag that the filter is going to be matching against. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // Value indicate the bool value, either true or false to use when matching against attribute values. // BooleanAttribute Policy will apply exact value match on Value - Value bool `river:"value,attr"` + Value bool `alloy:"value,attr"` } func (booleanAttributeConfig BooleanAttributeConfig) Convert() tsp.BooleanAttributeCfg { @@ -264,9 +264,9 @@ func (e *ErrorMode) UnmarshalText(text []byte) error { // OttlConditionConfig holds the configurable setting to create a OTTL condition filter // sampling policy evaluator. type OttlConditionConfig struct { - ErrorMode ErrorMode `river:"error_mode,attr"` - SpanConditions []string `river:"span,attr,optional"` - SpanEventConditions []string `river:"spanevent,attr,optional"` + ErrorMode ErrorMode `alloy:"error_mode,attr"` + SpanConditions []string `alloy:"span,attr,optional"` + SpanEventConditions []string `alloy:"spanevent,attr,optional"` } func (ottlConditionConfig OttlConditionConfig) Convert() tsp.OTTLConditionCfg { @@ -279,9 +279,9 @@ func (ottlConditionConfig OttlConditionConfig) Convert() tsp.OTTLConditionCfg { type TraceStateConfig struct { // Tag that the filter is going to be matching against. - Key string `river:"key,attr"` + Key string `alloy:"key,attr"` // Values indicate the set of values to use when matching against trace_state values. - Values []string `river:"values,attr"` + Values []string `alloy:"values,attr"` } func (traceStateConfig TraceStateConfig) Convert() tsp.TraceStateCfg { @@ -294,10 +294,10 @@ func (traceStateConfig TraceStateConfig) Convert() tsp.TraceStateCfg { // CompositeConfig holds the configurable settings to create a composite // sampling policy evaluator. type CompositeConfig struct { - MaxTotalSpansPerSecond int64 `river:"max_total_spans_per_second,attr"` - PolicyOrder []string `river:"policy_order,attr"` - SubPolicyCfg []CompositeSubPolicyConfig `river:"composite_sub_policy,block,optional"` - RateAllocation []RateAllocationConfig `river:"rate_allocation,block,optional"` + MaxTotalSpansPerSecond int64 `alloy:"max_total_spans_per_second,attr"` + PolicyOrder []string `alloy:"policy_order,attr"` + SubPolicyCfg []CompositeSubPolicyConfig `alloy:"composite_sub_policy,block,optional"` + RateAllocation []RateAllocationConfig `alloy:"rate_allocation,block,optional"` } func (compositeConfig CompositeConfig) Convert() tsp.CompositeCfg { @@ -321,10 +321,10 @@ func (compositeConfig CompositeConfig) Convert() tsp.CompositeCfg { // CompositeSubPolicyConfig holds the common configuration to all policies under composite policy. type CompositeSubPolicyConfig struct { - SharedPolicyConfig SharedPolicyConfig `river:",squash"` + SharedPolicyConfig SharedPolicyConfig `alloy:",squash"` // Configs for and policy evaluator. - AndConfig AndConfig `river:"and,block,optional"` + AndConfig AndConfig `alloy:"and,block,optional"` } func (compositeSubPolicyConfig CompositeSubPolicyConfig) Convert() tsp.CompositeSubPolicyCfg { @@ -351,8 +351,8 @@ func (compositeSubPolicyConfig CompositeSubPolicyConfig) Convert() tsp.Composite // RateAllocationConfig used within composite policy type RateAllocationConfig struct { - Policy string `river:"policy,attr"` - Percent int64 `river:"percent,attr"` + Policy string `alloy:"policy,attr"` + Percent int64 `alloy:"percent,attr"` } func (rateAllocationConfig RateAllocationConfig) Convert() tsp.RateAllocationCfg { @@ -363,7 +363,7 @@ func (rateAllocationConfig RateAllocationConfig) Convert() tsp.RateAllocationCfg } type AndConfig struct { - SubPolicyConfig []AndSubPolicyConfig `river:"and_sub_policy,block"` + SubPolicyConfig []AndSubPolicyConfig `alloy:"and_sub_policy,block"` } func (andConfig AndConfig) Convert() tsp.AndCfg { @@ -379,7 +379,7 @@ func (andConfig AndConfig) Convert() tsp.AndCfg { // AndSubPolicyConfig holds the common configuration to all policies under and policy. type AndSubPolicyConfig struct { - SharedPolicyConfig SharedPolicyConfig `river:",squash"` + SharedPolicyConfig SharedPolicyConfig `alloy:",squash"` } func (andSubPolicyConfig AndSubPolicyConfig) Convert() tsp.AndSubPolicyCfg { diff --git a/internal/component/otelcol/processor/transform/transform.go b/internal/component/otelcol/processor/transform/transform.go index aabae21e4c..3dd62edb7f 100644 --- a/internal/component/otelcol/processor/transform/transform.go +++ b/internal/component/otelcol/processor/transform/transform.go @@ -56,20 +56,20 @@ func (c *ContextID) UnmarshalText(text []byte) error { type ContextStatementsSlice []ContextStatements type ContextStatements struct { - Context ContextID `river:"context,attr"` - Statements []string `river:"statements,attr"` + Context ContextID `alloy:"context,attr"` + Statements []string `alloy:"statements,attr"` } // Arguments configures the otelcol.processor.transform component. type Arguments struct { // ErrorMode determines how the processor reacts to errors that occur while processing a statement. - ErrorMode ottl.ErrorMode `river:"error_mode,attr,optional"` - TraceStatements ContextStatementsSlice `river:"trace_statements,block,optional"` - MetricStatements ContextStatementsSlice `river:"metric_statements,block,optional"` - LogStatements ContextStatementsSlice `river:"log_statements,block,optional"` + ErrorMode ottl.ErrorMode `alloy:"error_mode,attr,optional"` + TraceStatements ContextStatementsSlice `alloy:"trace_statements,block,optional"` + MetricStatements ContextStatementsSlice `alloy:"metric_statements,block,optional"` + LogStatements ContextStatementsSlice `alloy:"log_statements,block,optional"` // Output configures where to send processed data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var ( diff --git a/internal/component/otelcol/receiver/jaeger/jaeger.go b/internal/component/otelcol/receiver/jaeger/jaeger.go index c7817cc68a..81d11952b8 100644 --- a/internal/component/otelcol/receiver/jaeger/jaeger.go +++ b/internal/component/otelcol/receiver/jaeger/jaeger.go @@ -31,13 +31,13 @@ func init() { // Arguments configures the otelcol.receiver.jaeger component. type Arguments struct { - Protocols ProtocolsArguments `river:"protocols,block"` + Protocols ProtocolsArguments `alloy:"protocols,block"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var _ receiver.Arguments = Arguments{} @@ -91,14 +91,14 @@ func (args Arguments) NextConsumers() *otelcol.ConsumerArguments { // ProtocolsArguments configures protocols for otelcol.receiver.jaeger to // listen on. type ProtocolsArguments struct { - GRPC *GRPC `river:"grpc,block,optional"` - ThriftHTTP *ThriftHTTP `river:"thrift_http,block,optional"` - ThriftBinary *ThriftBinary `river:"thrift_binary,block,optional"` - ThriftCompact *ThriftCompact `river:"thrift_compact,block,optional"` + GRPC *GRPC `alloy:"grpc,block,optional"` + ThriftHTTP *ThriftHTTP `alloy:"thrift_http,block,optional"` + ThriftBinary *ThriftBinary `alloy:"thrift_binary,block,optional"` + ThriftCompact *ThriftCompact `alloy:"thrift_compact,block,optional"` } type GRPC struct { - GRPCServerArguments *otelcol.GRPCServerArguments `river:",squash"` + GRPCServerArguments *otelcol.GRPCServerArguments `alloy:",squash"` } // SetToDefault implements river.Defaulter. @@ -121,7 +121,7 @@ func (args *GRPC) Convert() *otelconfiggrpc.GRPCServerSettings { } type ThriftHTTP struct { - HTTPServerArguments *otelcol.HTTPServerArguments `river:",squash"` + HTTPServerArguments *otelcol.HTTPServerArguments `alloy:",squash"` } // SetToDefault implements river.Defaulter. @@ -144,11 +144,11 @@ func (args *ThriftHTTP) Convert() *otelconfighttp.HTTPServerSettings { // ProtocolUDP configures a UDP server. type ProtocolUDP struct { - Endpoint string `river:"endpoint,attr,optional"` - QueueSize int `river:"queue_size,attr,optional"` - MaxPacketSize units.Base2Bytes `river:"max_packet_size,attr,optional"` - Workers int `river:"workers,attr,optional"` - SocketBufferSize units.Base2Bytes `river:"socket_buffer_size,attr,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` + QueueSize int `alloy:"queue_size,attr,optional"` + MaxPacketSize units.Base2Bytes `alloy:"max_packet_size,attr,optional"` + Workers int `alloy:"workers,attr,optional"` + SocketBufferSize units.Base2Bytes `alloy:"socket_buffer_size,attr,optional"` } // Convert converts proto into the upstream type. @@ -170,7 +170,7 @@ func (proto *ProtocolUDP) Convert() *jaegerreceiver.ProtocolUDP { // ThriftCompact wraps ProtocolUDP and provides additional behavior. type ThriftCompact struct { - ProtocolUDP *ProtocolUDP `river:",squash"` + ProtocolUDP *ProtocolUDP `alloy:",squash"` } // SetToDefault implements river.Defaulter. @@ -196,7 +196,7 @@ func (args *ThriftCompact) Convert() *jaegerreceiver.ProtocolUDP { // ThriftCompact wraps ProtocolUDP and provides additional behavior. type ThriftBinary struct { - ProtocolUDP *ProtocolUDP `river:",squash"` + ProtocolUDP *ProtocolUDP `alloy:",squash"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/otelcol/receiver/kafka/kafka.go b/internal/component/otelcol/receiver/kafka/kafka.go index 109add84a1..aa1a3e4e52 100644 --- a/internal/component/otelcol/receiver/kafka/kafka.go +++ b/internal/component/otelcol/receiver/kafka/kafka.go @@ -31,25 +31,25 @@ func init() { // Arguments configures the otelcol.receiver.kafka component. type Arguments struct { - Brokers []string `river:"brokers,attr"` - ProtocolVersion string `river:"protocol_version,attr"` - Topic string `river:"topic,attr,optional"` - Encoding string `river:"encoding,attr,optional"` - GroupID string `river:"group_id,attr,optional"` - ClientID string `river:"client_id,attr,optional"` - InitialOffset string `river:"initial_offset,attr,optional"` - - Authentication AuthenticationArguments `river:"authentication,block,optional"` - Metadata MetadataArguments `river:"metadata,block,optional"` - AutoCommit AutoCommitArguments `river:"autocommit,block,optional"` - MessageMarking MessageMarkingArguments `river:"message_marking,block,optional"` - HeaderExtraction HeaderExtraction `river:"header_extraction,block,optional"` + Brokers []string `alloy:"brokers,attr"` + ProtocolVersion string `alloy:"protocol_version,attr"` + Topic string `alloy:"topic,attr,optional"` + Encoding string `alloy:"encoding,attr,optional"` + GroupID string `alloy:"group_id,attr,optional"` + ClientID string `alloy:"client_id,attr,optional"` + InitialOffset string `alloy:"initial_offset,attr,optional"` + + Authentication AuthenticationArguments `alloy:"authentication,block,optional"` + Metadata MetadataArguments `alloy:"metadata,block,optional"` + AutoCommit AutoCommitArguments `alloy:"autocommit,block,optional"` + MessageMarking MessageMarkingArguments `alloy:"message_marking,block,optional"` + HeaderExtraction HeaderExtraction `alloy:"header_extraction,block,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var _ receiver.Arguments = Arguments{} @@ -118,10 +118,10 @@ func (args Arguments) NextConsumers() *otelcol.ConsumerArguments { // AuthenticationArguments configures how to authenticate to the Kafka broker. type AuthenticationArguments struct { - Plaintext *PlaintextArguments `river:"plaintext,block,optional"` - SASL *SASLArguments `river:"sasl,block,optional"` - TLS *otelcol.TLSClientArguments `river:"tls,block,optional"` - Kerberos *KerberosArguments `river:"kerberos,block,optional"` + Plaintext *PlaintextArguments `alloy:"plaintext,block,optional"` + SASL *SASLArguments `alloy:"sasl,block,optional"` + TLS *otelcol.TLSClientArguments `alloy:"tls,block,optional"` + Kerberos *KerberosArguments `alloy:"kerberos,block,optional"` } // Convert converts args into the upstream type. @@ -150,8 +150,8 @@ func (args AuthenticationArguments) Convert() map[string]interface{} { // PlaintextArguments configures plaintext authentication against the Kafka // broker. type PlaintextArguments struct { - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` } // Convert converts args into the upstream type. @@ -164,11 +164,11 @@ func (args PlaintextArguments) Convert() map[string]interface{} { // SASLArguments configures SASL authentication against the Kafka broker. type SASLArguments struct { - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` - Mechanism string `river:"mechanism,attr"` - Version int `river:"version,attr,optional"` - AWSMSK AWSMSKArguments `river:"aws_msk,block,optional"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` + Mechanism string `alloy:"mechanism,attr"` + Version int `alloy:"version,attr,optional"` + AWSMSK AWSMSKArguments `alloy:"aws_msk,block,optional"` } // Convert converts args into the upstream type. @@ -185,8 +185,8 @@ func (args SASLArguments) Convert() map[string]interface{} { // AWSMSKArguments exposes additional SASL authentication measures required to // use the AWS_MSK_IAM mechanism. type AWSMSKArguments struct { - Region string `river:"region,attr"` - BrokerAddr string `river:"broker_addr,attr"` + Region string `alloy:"region,attr"` + BrokerAddr string `alloy:"broker_addr,attr"` } // Convert converts args into the upstream type. @@ -200,13 +200,13 @@ func (args AWSMSKArguments) Convert() map[string]interface{} { // KerberosArguments configures Kerberos authentication against the Kafka // broker. type KerberosArguments struct { - ServiceName string `river:"service_name,attr,optional"` - Realm string `river:"realm,attr,optional"` - UseKeyTab bool `river:"use_keytab,attr,optional"` - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr,optional"` - ConfigPath string `river:"config_file,attr,optional"` - KeyTabPath string `river:"keytab_file,attr,optional"` + ServiceName string `alloy:"service_name,attr,optional"` + Realm string `alloy:"realm,attr,optional"` + UseKeyTab bool `alloy:"use_keytab,attr,optional"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr,optional"` + ConfigPath string `alloy:"config_file,attr,optional"` + KeyTabPath string `alloy:"keytab_file,attr,optional"` } // Convert converts args into the upstream type. @@ -225,8 +225,8 @@ func (args KerberosArguments) Convert() map[string]interface{} { // MetadataArguments configures how the otelcol.receiver.kafka component will // retrieve metadata from the Kafka broker. type MetadataArguments struct { - IncludeAllTopics bool `river:"include_all_topics,attr,optional"` - Retry MetadataRetryArguments `river:"retry,block,optional"` + IncludeAllTopics bool `alloy:"include_all_topics,attr,optional"` + Retry MetadataRetryArguments `alloy:"retry,block,optional"` } func (args *MetadataArguments) SetToDefault() { @@ -251,8 +251,8 @@ func (args MetadataArguments) Convert() kafkaexporter.Metadata { // Kafka broker. Retrying is useful to avoid race conditions when the Kafka // broker is starting at the same time as the otelcol.receiver.kafka component. type MetadataRetryArguments struct { - MaxRetries int `river:"max_retries,attr,optional"` - Backoff time.Duration `river:"backoff,attr,optional"` + MaxRetries int `alloy:"max_retries,attr,optional"` + Backoff time.Duration `alloy:"backoff,attr,optional"` } // Convert converts args into the upstream type. @@ -266,8 +266,8 @@ func (args MetadataRetryArguments) Convert() kafkaexporter.MetadataRetry { // AutoCommitArguments configures how to automatically commit updated topic // offsets back to the Kafka broker. type AutoCommitArguments struct { - Enable bool `river:"enable,attr,optional"` - Interval time.Duration `river:"interval,attr,optional"` + Enable bool `alloy:"enable,attr,optional"` + Interval time.Duration `alloy:"interval,attr,optional"` } func (args *AutoCommitArguments) SetToDefault() { @@ -287,8 +287,8 @@ func (args AutoCommitArguments) Convert() kafkareceiver.AutoCommit { // MessageMarkingArguments configures when Kafka messages are marked as read. type MessageMarkingArguments struct { - AfterExecution bool `river:"after_execution,attr,optional"` - IncludeUnsuccessful bool `river:"include_unsuccessful,attr,optional"` + AfterExecution bool `alloy:"after_execution,attr,optional"` + IncludeUnsuccessful bool `alloy:"include_unsuccessful,attr,optional"` } func (args *MessageMarkingArguments) SetToDefault() { @@ -307,8 +307,8 @@ func (args MessageMarkingArguments) Convert() kafkareceiver.MessageMarking { } type HeaderExtraction struct { - ExtractHeaders bool `river:"extract_headers,attr,optional"` - Headers []string `river:"headers,attr,optional"` + ExtractHeaders bool `alloy:"extract_headers,attr,optional"` + Headers []string `alloy:"headers,attr,optional"` } func (h *HeaderExtraction) SetToDefault() { diff --git a/internal/component/otelcol/receiver/loki/loki.go b/internal/component/otelcol/receiver/loki/loki.go index 6904409399..7ff2e594c1 100644 --- a/internal/component/otelcol/receiver/loki/loki.go +++ b/internal/component/otelcol/receiver/loki/loki.go @@ -37,13 +37,13 @@ var hintAttributes = "loki.attribute.labels" // Arguments configures the otelcol.receiver.loki component. type Arguments struct { // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } // Exports holds the receiver that is used to send log entries to the // loki.write component. type Exports struct { - Receiver loki.LogsReceiver `river:"receiver,attr"` + Receiver loki.LogsReceiver `alloy:"receiver,attr"` } // Component is the otelcol.receiver.loki component. diff --git a/internal/component/otelcol/receiver/opencensus/opencensus.go b/internal/component/otelcol/receiver/opencensus/opencensus.go index 2de11c2578..64ed1f25ba 100644 --- a/internal/component/otelcol/receiver/opencensus/opencensus.go +++ b/internal/component/otelcol/receiver/opencensus/opencensus.go @@ -27,15 +27,15 @@ func init() { // Arguments configures the otelcol.receiver.opencensus component. type Arguments struct { - CorsAllowedOrigins []string `river:"cors_allowed_origins,attr,optional"` + CorsAllowedOrigins []string `alloy:"cors_allowed_origins,attr,optional"` - GRPC otelcol.GRPCServerArguments `river:",squash"` + GRPC otelcol.GRPCServerArguments `alloy:",squash"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var _ receiver.Arguments = Arguments{} diff --git a/internal/component/otelcol/receiver/otlp/otlp.go b/internal/component/otelcol/receiver/otlp/otlp.go index 9beb1f7ca3..55863fadee 100644 --- a/internal/component/otelcol/receiver/otlp/otlp.go +++ b/internal/component/otelcol/receiver/otlp/otlp.go @@ -30,27 +30,27 @@ func init() { // Arguments configures the otelcol.receiver.otlp component. type Arguments struct { - GRPC *GRPCServerArguments `river:"grpc,block,optional"` - HTTP *HTTPConfigArguments `river:"http,block,optional"` + GRPC *GRPCServerArguments `alloy:"grpc,block,optional"` + HTTP *HTTPConfigArguments `alloy:"http,block,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } type HTTPConfigArguments struct { - HTTPServerArguments *otelcol.HTTPServerArguments `river:",squash"` + HTTPServerArguments *otelcol.HTTPServerArguments `alloy:",squash"` // The URL path to receive traces on. If omitted "/v1/traces" will be used. - TracesURLPath string `river:"traces_url_path,attr,optional"` + TracesURLPath string `alloy:"traces_url_path,attr,optional"` // The URL path to receive metrics on. If omitted "/v1/metrics" will be used. - MetricsURLPath string `river:"metrics_url_path,attr,optional"` + MetricsURLPath string `alloy:"metrics_url_path,attr,optional"` // The URL path to receive logs on. If omitted "/v1/logs" will be used. - LogsURLPath string `river:"logs_url_path,attr,optional"` + LogsURLPath string `alloy:"logs_url_path,attr,optional"` } // Convert converts args into the upstream type. diff --git a/internal/component/otelcol/receiver/prometheus/prometheus.go b/internal/component/otelcol/receiver/prometheus/prometheus.go index e27488296b..c6aa4ebf59 100644 --- a/internal/component/otelcol/receiver/prometheus/prometheus.go +++ b/internal/component/otelcol/receiver/prometheus/prometheus.go @@ -40,13 +40,13 @@ func init() { // Arguments configures the otelcol.receiver.prometheus component. type Arguments struct { // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } // Exports are the set of fields exposed by the otelcol.receiver.prometheus // component. type Exports struct { - Receiver storage.Appendable `river:"receiver,attr"` + Receiver storage.Appendable `alloy:"receiver,attr"` } // Component is the otelcol.receiver.prometheus component. diff --git a/internal/component/otelcol/receiver/vcenter/vcenter.go b/internal/component/otelcol/receiver/vcenter/vcenter.go index b83f97f727..e1bad99588 100644 --- a/internal/component/otelcol/receiver/vcenter/vcenter.go +++ b/internal/component/otelcol/receiver/vcenter/vcenter.go @@ -31,7 +31,7 @@ func init() { } type MetricConfig struct { - Enabled bool `river:"enabled,attr"` + Enabled bool `alloy:"enabled,attr"` } func (r *MetricConfig) Convert() map[string]interface{} { @@ -45,45 +45,45 @@ func (r *MetricConfig) Convert() map[string]interface{} { } type MetricsConfig struct { - VcenterClusterCPUEffective MetricConfig `river:"vcenter.cluster.cpu.effective,block,optional"` - VcenterClusterCPULimit MetricConfig `river:"vcenter.cluster.cpu.limit,block,optional"` - VcenterClusterHostCount MetricConfig `river:"vcenter.cluster.host.count,block,optional"` - VcenterClusterMemoryEffective MetricConfig `river:"vcenter.cluster.memory.effective,block,optional"` - VcenterClusterMemoryLimit MetricConfig `river:"vcenter.cluster.memory.limit,block,optional"` - VcenterClusterMemoryUsed MetricConfig `river:"vcenter.cluster.memory.used,block,optional"` - VcenterClusterVMCount MetricConfig `river:"vcenter.cluster.vm.count,block,optional"` - VcenterDatastoreDiskUsage MetricConfig `river:"vcenter.datastore.disk.usage,block,optional"` - VcenterDatastoreDiskUtilization MetricConfig `river:"vcenter.datastore.disk.utilization,block,optional"` - VcenterHostCPUUsage MetricConfig `river:"vcenter.host.cpu.usage,block,optional"` - VcenterHostCPUUtilization MetricConfig `river:"vcenter.host.cpu.utilization,block,optional"` - VcenterHostDiskLatencyAvg MetricConfig `river:"vcenter.host.disk.latency.avg,block,optional"` - VcenterHostDiskLatencyMax MetricConfig `river:"vcenter.host.disk.latency.max,block,optional"` - VcenterHostDiskThroughput MetricConfig `river:"vcenter.host.disk.throughput,block,optional"` - VcenterHostMemoryUsage MetricConfig `river:"vcenter.host.memory.usage,block,optional"` - VcenterHostMemoryUtilization MetricConfig `river:"vcenter.host.memory.utilization,block,optional"` - VcenterHostNetworkPacketCount MetricConfig `river:"vcenter.host.network.packet.count,block,optional"` - VcenterHostNetworkPacketErrors MetricConfig `river:"vcenter.host.network.packet.errors,block,optional"` - VcenterHostNetworkThroughput MetricConfig `river:"vcenter.host.network.throughput,block,optional"` - VcenterHostNetworkUsage MetricConfig `river:"vcenter.host.network.usage,block,optional"` - VcenterResourcePoolCPUShares MetricConfig `river:"vcenter.resource_pool.cpu.shares,block,optional"` - VcenterResourcePoolCPUUsage MetricConfig `river:"vcenter.resource_pool.cpu.usage,block,optional"` - VcenterResourcePoolMemoryShares MetricConfig `river:"vcenter.resource_pool.memory.shares,block,optional"` - VcenterResourcePoolMemoryUsage MetricConfig `river:"vcenter.resource_pool.memory.usage,block,optional"` - VcenterVMCPUUsage MetricConfig `river:"vcenter.vm.cpu.usage,block,optional"` - VcenterVMCPUUtilization MetricConfig `river:"vcenter.vm.cpu.utilization,block,optional"` - VcenterVMDiskLatencyAvg MetricConfig `river:"vcenter.vm.disk.latency.avg,block,optional"` - VcenterVMDiskLatencyMax MetricConfig `river:"vcenter.vm.disk.latency.max,block,optional"` - VcenterVMDiskThroughput MetricConfig `river:"vcenter.vm.disk.throughput,block,optional"` - VcenterVMDiskUsage MetricConfig `river:"vcenter.vm.disk.usage,block,optional"` - VcenterVMDiskUtilization MetricConfig `river:"vcenter.vm.disk.utilization,block,optional"` - VcenterVMMemoryBallooned MetricConfig `river:"vcenter.vm.memory.ballooned,block,optional"` - VcenterVMMemorySwapped MetricConfig `river:"vcenter.vm.memory.swapped,block,optional"` - VcenterVMMemorySwappedSsd MetricConfig `river:"vcenter.vm.memory.swapped_ssd,block,optional"` - VcenterVMMemoryUsage MetricConfig `river:"vcenter.vm.memory.usage,block,optional"` - VcenterVMMemoryUtilization MetricConfig `river:"vcenter.vm.memory.utilization,block,optional"` - VcenterVMNetworkPacketCount MetricConfig `river:"vcenter.vm.network.packet.count,block,optional"` - VcenterVMNetworkThroughput MetricConfig `river:"vcenter.vm.network.throughput,block,optional"` - VcenterVMNetworkUsage MetricConfig `river:"vcenter.vm.network.usage,block,optional"` + VcenterClusterCPUEffective MetricConfig `alloy:"vcenter.cluster.cpu.effective,block,optional"` + VcenterClusterCPULimit MetricConfig `alloy:"vcenter.cluster.cpu.limit,block,optional"` + VcenterClusterHostCount MetricConfig `alloy:"vcenter.cluster.host.count,block,optional"` + VcenterClusterMemoryEffective MetricConfig `alloy:"vcenter.cluster.memory.effective,block,optional"` + VcenterClusterMemoryLimit MetricConfig `alloy:"vcenter.cluster.memory.limit,block,optional"` + VcenterClusterMemoryUsed MetricConfig `alloy:"vcenter.cluster.memory.used,block,optional"` + VcenterClusterVMCount MetricConfig `alloy:"vcenter.cluster.vm.count,block,optional"` + VcenterDatastoreDiskUsage MetricConfig `alloy:"vcenter.datastore.disk.usage,block,optional"` + VcenterDatastoreDiskUtilization MetricConfig `alloy:"vcenter.datastore.disk.utilization,block,optional"` + VcenterHostCPUUsage MetricConfig `alloy:"vcenter.host.cpu.usage,block,optional"` + VcenterHostCPUUtilization MetricConfig `alloy:"vcenter.host.cpu.utilization,block,optional"` + VcenterHostDiskLatencyAvg MetricConfig `alloy:"vcenter.host.disk.latency.avg,block,optional"` + VcenterHostDiskLatencyMax MetricConfig `alloy:"vcenter.host.disk.latency.max,block,optional"` + VcenterHostDiskThroughput MetricConfig `alloy:"vcenter.host.disk.throughput,block,optional"` + VcenterHostMemoryUsage MetricConfig `alloy:"vcenter.host.memory.usage,block,optional"` + VcenterHostMemoryUtilization MetricConfig `alloy:"vcenter.host.memory.utilization,block,optional"` + VcenterHostNetworkPacketCount MetricConfig `alloy:"vcenter.host.network.packet.count,block,optional"` + VcenterHostNetworkPacketErrors MetricConfig `alloy:"vcenter.host.network.packet.errors,block,optional"` + VcenterHostNetworkThroughput MetricConfig `alloy:"vcenter.host.network.throughput,block,optional"` + VcenterHostNetworkUsage MetricConfig `alloy:"vcenter.host.network.usage,block,optional"` + VcenterResourcePoolCPUShares MetricConfig `alloy:"vcenter.resource_pool.cpu.shares,block,optional"` + VcenterResourcePoolCPUUsage MetricConfig `alloy:"vcenter.resource_pool.cpu.usage,block,optional"` + VcenterResourcePoolMemoryShares MetricConfig `alloy:"vcenter.resource_pool.memory.shares,block,optional"` + VcenterResourcePoolMemoryUsage MetricConfig `alloy:"vcenter.resource_pool.memory.usage,block,optional"` + VcenterVMCPUUsage MetricConfig `alloy:"vcenter.vm.cpu.usage,block,optional"` + VcenterVMCPUUtilization MetricConfig `alloy:"vcenter.vm.cpu.utilization,block,optional"` + VcenterVMDiskLatencyAvg MetricConfig `alloy:"vcenter.vm.disk.latency.avg,block,optional"` + VcenterVMDiskLatencyMax MetricConfig `alloy:"vcenter.vm.disk.latency.max,block,optional"` + VcenterVMDiskThroughput MetricConfig `alloy:"vcenter.vm.disk.throughput,block,optional"` + VcenterVMDiskUsage MetricConfig `alloy:"vcenter.vm.disk.usage,block,optional"` + VcenterVMDiskUtilization MetricConfig `alloy:"vcenter.vm.disk.utilization,block,optional"` + VcenterVMMemoryBallooned MetricConfig `alloy:"vcenter.vm.memory.ballooned,block,optional"` + VcenterVMMemorySwapped MetricConfig `alloy:"vcenter.vm.memory.swapped,block,optional"` + VcenterVMMemorySwappedSsd MetricConfig `alloy:"vcenter.vm.memory.swapped_ssd,block,optional"` + VcenterVMMemoryUsage MetricConfig `alloy:"vcenter.vm.memory.usage,block,optional"` + VcenterVMMemoryUtilization MetricConfig `alloy:"vcenter.vm.memory.utilization,block,optional"` + VcenterVMNetworkPacketCount MetricConfig `alloy:"vcenter.vm.network.packet.count,block,optional"` + VcenterVMNetworkThroughput MetricConfig `alloy:"vcenter.vm.network.throughput,block,optional"` + VcenterVMNetworkUsage MetricConfig `alloy:"vcenter.vm.network.usage,block,optional"` } func (args *MetricsConfig) SetToDefault() { @@ -178,7 +178,7 @@ func (args *MetricsConfig) Convert() map[string]interface{} { } type ResourceAttributeConfig struct { - Enabled bool `river:"enabled,attr"` + Enabled bool `alloy:"enabled,attr"` } func (r *ResourceAttributeConfig) Convert() map[string]interface{} { @@ -192,13 +192,13 @@ func (r *ResourceAttributeConfig) Convert() map[string]interface{} { } type ResourceAttributesConfig struct { - VcenterClusterName ResourceAttributeConfig `river:"vcenter.cluster.name,block,optional"` - VcenterDatastoreName ResourceAttributeConfig `river:"vcenter.datastore.name,block,optional"` - VcenterHostName ResourceAttributeConfig `river:"vcenter.host.name,block,optional"` - VcenterResourcePoolInventoryPath ResourceAttributeConfig `river:"vcenter.resource_pool.inventory_path,block,optional"` - VcenterResourcePoolName ResourceAttributeConfig `river:"vcenter.resource_pool.name,block,optional"` - VcenterVMID ResourceAttributeConfig `river:"vcenter.vm.id,block,optional"` - VcenterVMName ResourceAttributeConfig `river:"vcenter.vm.name,block,optional"` + VcenterClusterName ResourceAttributeConfig `alloy:"vcenter.cluster.name,block,optional"` + VcenterDatastoreName ResourceAttributeConfig `alloy:"vcenter.datastore.name,block,optional"` + VcenterHostName ResourceAttributeConfig `alloy:"vcenter.host.name,block,optional"` + VcenterResourcePoolInventoryPath ResourceAttributeConfig `alloy:"vcenter.resource_pool.inventory_path,block,optional"` + VcenterResourcePoolName ResourceAttributeConfig `alloy:"vcenter.resource_pool.name,block,optional"` + VcenterVMID ResourceAttributeConfig `alloy:"vcenter.vm.id,block,optional"` + VcenterVMName ResourceAttributeConfig `alloy:"vcenter.vm.name,block,optional"` } func (args *ResourceAttributesConfig) SetToDefault() { @@ -232,8 +232,8 @@ func (args *ResourceAttributesConfig) Convert() map[string]interface{} { } type MetricsBuilderConfig struct { - Metrics MetricsConfig `river:"metrics,block,optional"` - ResourceAttributes ResourceAttributesConfig `river:"resource_attributes,block,optional"` + Metrics MetricsConfig `alloy:"metrics,block,optional"` + ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"` } func (mbc *MetricsBuilderConfig) SetToDefault() { @@ -257,20 +257,20 @@ func (args *MetricsBuilderConfig) Convert() map[string]interface{} { // Arguments configures the otelcol.receiver.vcenter component. type Arguments struct { - Endpoint string `river:"endpoint,attr"` - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` + Endpoint string `alloy:"endpoint,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` - MetricsBuilderConfig MetricsBuilderConfig `river:",squash"` + MetricsBuilderConfig MetricsBuilderConfig `alloy:",squash"` - ScraperControllerArguments otelcol.ScraperControllerArguments `river:",squash"` - TLS otelcol.TLSClientArguments `river:"tls,block,optional"` + ScraperControllerArguments otelcol.ScraperControllerArguments `alloy:",squash"` + TLS otelcol.TLSClientArguments `alloy:"tls,block,optional"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var _ receiver.Arguments = Arguments{} diff --git a/internal/component/otelcol/receiver/zipkin/zipkin.go b/internal/component/otelcol/receiver/zipkin/zipkin.go index 6cf15ac2a1..f63cc06183 100644 --- a/internal/component/otelcol/receiver/zipkin/zipkin.go +++ b/internal/component/otelcol/receiver/zipkin/zipkin.go @@ -26,15 +26,15 @@ func init() { // Arguments configures the otelcol.receiver.zipkin component. type Arguments struct { - ParseStringTags bool `river:"parse_string_tags,attr,optional"` + ParseStringTags bool `alloy:"parse_string_tags,attr,optional"` - HTTPServer otelcol.HTTPServerArguments `river:",squash"` + HTTPServer otelcol.HTTPServerArguments `alloy:",squash"` // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` // Output configures where to send received data. Required. - Output *otelcol.ConsumerArguments `river:"output,block"` + Output *otelcol.ConsumerArguments `alloy:"output,block"` } var _ receiver.Arguments = Arguments{} diff --git a/internal/component/prometheus/exporter/apache/apache.go b/internal/component/prometheus/exporter/apache/apache.go index 5d0d419e92..5cc988cf1c 100644 --- a/internal/component/prometheus/exporter/apache/apache.go +++ b/internal/component/prometheus/exporter/apache/apache.go @@ -33,9 +33,9 @@ var DefaultArguments = Arguments{ // Arguments controls the apache exporter. type Arguments struct { - ApacheAddr string `river:"scrape_uri,attr,optional"` - ApacheHostOverride string `river:"host_override,attr,optional"` - ApacheInsecure bool `river:"insecure,attr,optional"` + ApacheAddr string `alloy:"scrape_uri,attr,optional"` + ApacheHostOverride string `alloy:"host_override,attr,optional"` + ApacheInsecure bool `alloy:"insecure,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/azure/azure.go b/internal/component/prometheus/exporter/azure/azure.go index 3671cfa783..ed410e7029 100644 --- a/internal/component/prometheus/exporter/azure/azure.go +++ b/internal/component/prometheus/exporter/azure/azure.go @@ -25,20 +25,20 @@ func createExporter(opts component.Options, args component.Arguments, defaultIns } type Arguments struct { - Subscriptions []string `river:"subscriptions,attr"` - ResourceGraphQueryFilter string `river:"resource_graph_query_filter,attr,optional"` - ResourceType string `river:"resource_type,attr"` - Metrics []string `river:"metrics,attr"` - MetricAggregations []string `river:"metric_aggregations,attr,optional"` - Timespan string `river:"timespan,attr,optional"` - IncludedDimensions []string `river:"included_dimensions,attr,optional"` - IncludedResourceTags []string `river:"included_resource_tags,attr,optional"` - MetricNamespace string `river:"metric_namespace,attr,optional"` - MetricNameTemplate string `river:"metric_name_template,attr,optional"` - MetricHelpTemplate string `river:"metric_help_template,attr,optional"` - AzureCloudEnvironment string `river:"azure_cloud_environment,attr,optional"` - ValidateDimensions bool `river:"validate_dimensions,attr,optional"` - Regions []string `river:"regions,attr,optional"` + Subscriptions []string `alloy:"subscriptions,attr"` + ResourceGraphQueryFilter string `alloy:"resource_graph_query_filter,attr,optional"` + ResourceType string `alloy:"resource_type,attr"` + Metrics []string `alloy:"metrics,attr"` + MetricAggregations []string `alloy:"metric_aggregations,attr,optional"` + Timespan string `alloy:"timespan,attr,optional"` + IncludedDimensions []string `alloy:"included_dimensions,attr,optional"` + IncludedResourceTags []string `alloy:"included_resource_tags,attr,optional"` + MetricNamespace string `alloy:"metric_namespace,attr,optional"` + MetricNameTemplate string `alloy:"metric_name_template,attr,optional"` + MetricHelpTemplate string `alloy:"metric_help_template,attr,optional"` + AzureCloudEnvironment string `alloy:"azure_cloud_environment,attr,optional"` + ValidateDimensions bool `alloy:"validate_dimensions,attr,optional"` + Regions []string `alloy:"regions,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/blackbox/blackbox.go b/internal/component/prometheus/exporter/blackbox/blackbox.go index 5e1e84c831..e32a630660 100644 --- a/internal/component/prometheus/exporter/blackbox/blackbox.go +++ b/internal/component/prometheus/exporter/blackbox/blackbox.go @@ -69,10 +69,10 @@ var DefaultArguments = Arguments{ // BlackboxTarget defines a target to be used by the exporter. type BlackboxTarget struct { - Name string `river:"name,attr"` - Target string `river:"address,attr"` - Module string `river:"module,attr,optional"` - Labels map[string]string `river:"labels,attr,optional"` + Name string `alloy:"name,attr"` + Target string `alloy:"address,attr"` + Module string `alloy:"module,attr,optional"` + Labels map[string]string `alloy:"labels,attr,optional"` } type TargetBlock []BlackboxTarget @@ -91,10 +91,10 @@ func (t TargetBlock) Convert() []blackbox_exporter.BlackboxTarget { } type Arguments struct { - ConfigFile string `river:"config_file,attr,optional"` - Config alloytypes.OptionalSecret `river:"config,attr,optional"` - Targets TargetBlock `river:"target,block"` - ProbeTimeoutOffset time.Duration `river:"probe_timeout_offset,attr,optional"` + ConfigFile string `alloy:"config_file,attr,optional"` + Config alloytypes.OptionalSecret `alloy:"config,attr,optional"` + Targets TargetBlock `alloy:"target,block"` + ProbeTimeoutOffset time.Duration `alloy:"probe_timeout_offset,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/cadvisor/cadvisor.go b/internal/component/prometheus/exporter/cadvisor/cadvisor.go index e28b4e1c7d..223203dffa 100644 --- a/internal/component/prometheus/exporter/cadvisor/cadvisor.go +++ b/internal/component/prometheus/exporter/cadvisor/cadvisor.go @@ -28,24 +28,24 @@ func createExporter(opts component.Options, args component.Arguments, defaultIns // Arguments configures the prometheus.exporter.cadvisor component. type Arguments struct { - StoreContainerLabels bool `river:"store_container_labels,attr,optional"` - AllowlistedContainerLabels []string `river:"allowlisted_container_labels,attr,optional"` - EnvMetadataAllowlist []string `river:"env_metadata_allowlist,attr,optional"` - RawCgroupPrefixAllowlist []string `river:"raw_cgroup_prefix_allowlist,attr,optional"` - PerfEventsConfig string `river:"perf_events_config,attr,optional"` - ResctrlInterval time.Duration `river:"resctrl_interval,attr,optional"` - DisabledMetrics []string `river:"disabled_metrics,attr,optional"` - EnabledMetrics []string `river:"enabled_metrics,attr,optional"` - StorageDuration time.Duration `river:"storage_duration,attr,optional"` - ContainerdHost string `river:"containerd_host,attr,optional"` - ContainerdNamespace string `river:"containerd_namespace,attr,optional"` - DockerHost string `river:"docker_host,attr,optional"` - UseDockerTLS bool `river:"use_docker_tls,attr,optional"` - DockerTLSCert string `river:"docker_tls_cert,attr,optional"` - DockerTLSKey string `river:"docker_tls_key,attr,optional"` - DockerTLSCA string `river:"docker_tls_ca,attr,optional"` - DockerOnly bool `river:"docker_only,attr,optional"` - DisableRootCgroupStats bool `river:"disable_root_cgroup_stats,attr,optional"` + StoreContainerLabels bool `alloy:"store_container_labels,attr,optional"` + AllowlistedContainerLabels []string `alloy:"allowlisted_container_labels,attr,optional"` + EnvMetadataAllowlist []string `alloy:"env_metadata_allowlist,attr,optional"` + RawCgroupPrefixAllowlist []string `alloy:"raw_cgroup_prefix_allowlist,attr,optional"` + PerfEventsConfig string `alloy:"perf_events_config,attr,optional"` + ResctrlInterval time.Duration `alloy:"resctrl_interval,attr,optional"` + DisabledMetrics []string `alloy:"disabled_metrics,attr,optional"` + EnabledMetrics []string `alloy:"enabled_metrics,attr,optional"` + StorageDuration time.Duration `alloy:"storage_duration,attr,optional"` + ContainerdHost string `alloy:"containerd_host,attr,optional"` + ContainerdNamespace string `alloy:"containerd_namespace,attr,optional"` + DockerHost string `alloy:"docker_host,attr,optional"` + UseDockerTLS bool `alloy:"use_docker_tls,attr,optional"` + DockerTLSCert string `alloy:"docker_tls_cert,attr,optional"` + DockerTLSKey string `alloy:"docker_tls_key,attr,optional"` + DockerTLSCA string `alloy:"docker_tls_ca,attr,optional"` + DockerOnly bool `alloy:"docker_only,attr,optional"` + DisableRootCgroupStats bool `alloy:"disable_root_cgroup_stats,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/cloudwatch/config.go b/internal/component/prometheus/exporter/cloudwatch/config.go index bd751d8ceb..c87de8b372 100644 --- a/internal/component/prometheus/exporter/cloudwatch/config.go +++ b/internal/component/prometheus/exporter/cloudwatch/config.go @@ -30,33 +30,33 @@ var defaults = Arguments{ // Arguments are the river based options to configure the embedded CloudWatch exporter. type Arguments struct { - STSRegion string `river:"sts_region,attr"` - FIPSDisabled bool `river:"fips_disabled,attr,optional"` - Debug bool `river:"debug,attr,optional"` - DiscoveryExportedTags TagsPerNamespace `river:"discovery_exported_tags,attr,optional"` - Discovery []DiscoveryJob `river:"discovery,block,optional"` - Static []StaticJob `river:"static,block,optional"` - DecoupledScrape DecoupledScrapeConfig `river:"decoupled_scraping,block,optional"` + STSRegion string `alloy:"sts_region,attr"` + FIPSDisabled bool `alloy:"fips_disabled,attr,optional"` + Debug bool `alloy:"debug,attr,optional"` + DiscoveryExportedTags TagsPerNamespace `alloy:"discovery_exported_tags,attr,optional"` + Discovery []DiscoveryJob `alloy:"discovery,block,optional"` + Static []StaticJob `alloy:"static,block,optional"` + DecoupledScrape DecoupledScrapeConfig `alloy:"decoupled_scraping,block,optional"` } // DecoupledScrapeConfig is the configuration for decoupled scraping feature. type DecoupledScrapeConfig struct { - Enabled bool `river:"enabled,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` // ScrapeInterval defines the decoupled scraping interval. If left empty, a default interval of 5m is used - ScrapeInterval time.Duration `river:"scrape_interval,attr,optional"` + ScrapeInterval time.Duration `alloy:"scrape_interval,attr,optional"` } type TagsPerNamespace = cloudwatch_exporter.TagsPerNamespace // DiscoveryJob configures a discovery job for a given service. type DiscoveryJob struct { - Auth RegionAndRoles `river:",squash"` - CustomTags Tags `river:"custom_tags,attr,optional"` - SearchTags Tags `river:"search_tags,attr,optional"` - Type string `river:"type,attr"` - DimensionNameRequirements []string `river:"dimension_name_requirements,attr,optional"` - Metrics []Metric `river:"metric,block"` - NilToZero *bool `river:"nil_to_zero,attr,optional"` + Auth RegionAndRoles `alloy:",squash"` + CustomTags Tags `alloy:"custom_tags,attr,optional"` + SearchTags Tags `alloy:"search_tags,attr,optional"` + Type string `alloy:"type,attr"` + DimensionNameRequirements []string `alloy:"dimension_name_requirements,attr,optional"` + Metrics []Metric `alloy:"metric,block"` + NilToZero *bool `alloy:"nil_to_zero,attr,optional"` } // Tags represents a series of tags configured on an AWS resource. Each tag is a @@ -65,25 +65,25 @@ type Tags map[string]string // StaticJob will scrape metrics that match all defined dimensions. type StaticJob struct { - Name string `river:",label"` - Auth RegionAndRoles `river:",squash"` - CustomTags Tags `river:"custom_tags,attr,optional"` - Namespace string `river:"namespace,attr"` - Dimensions Dimensions `river:"dimensions,attr"` - Metrics []Metric `river:"metric,block"` - NilToZero *bool `river:"nil_to_zero,attr,optional"` + Name string `alloy:",label"` + Auth RegionAndRoles `alloy:",squash"` + CustomTags Tags `alloy:"custom_tags,attr,optional"` + Namespace string `alloy:"namespace,attr"` + Dimensions Dimensions `alloy:"dimensions,attr"` + Metrics []Metric `alloy:"metric,block"` + NilToZero *bool `alloy:"nil_to_zero,attr,optional"` } // RegionAndRoles exposes for each supported job, the AWS regions and IAM roles in which the agent should perform the // scrape. type RegionAndRoles struct { - Regions []string `river:"regions,attr"` - Roles []Role `river:"role,block,optional"` + Regions []string `alloy:"regions,attr"` + Roles []Role `alloy:"role,block,optional"` } type Role struct { - RoleArn string `river:"role_arn,attr"` - ExternalID string `river:"external_id,attr,optional"` + RoleArn string `alloy:"role_arn,attr"` + ExternalID string `alloy:"external_id,attr,optional"` } // Dimensions are the label values used to identify a unique metric stream in CloudWatch. @@ -91,11 +91,11 @@ type Role struct { type Dimensions map[string]string type Metric struct { - Name string `river:"name,attr"` - Statistics []string `river:"statistics,attr"` - Period time.Duration `river:"period,attr"` - Length time.Duration `river:"length,attr,optional"` - NilToZero *bool `river:"nil_to_zero,attr,optional"` + Name string `alloy:"name,attr"` + Statistics []string `alloy:"statistics,attr"` + Period time.Duration `alloy:"period,attr"` + Length time.Duration `alloy:"length,attr,optional"` + NilToZero *bool `alloy:"nil_to_zero,attr,optional"` } // SetToDefault implements syntax.Defaulter. diff --git a/internal/component/prometheus/exporter/consul/consul.go b/internal/component/prometheus/exporter/consul/consul.go index 60ce1d6d4b..9647dc32b2 100644 --- a/internal/component/prometheus/exporter/consul/consul.go +++ b/internal/component/prometheus/exporter/consul/consul.go @@ -37,20 +37,20 @@ var DefaultArguments = Arguments{ // Arguments controls the consul_exporter exporter. type Arguments struct { - Server string `river:"server,attr,optional"` - CAFile string `river:"ca_file,attr,optional"` - CertFile string `river:"cert_file,attr,optional"` - KeyFile string `river:"key_file,attr,optional"` - ServerName string `river:"server_name,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` - InsecureSkipVerify bool `river:"insecure_skip_verify,attr,optional"` - RequestLimit int `river:"concurrent_request_limit,attr,optional"` - AllowStale bool `river:"allow_stale,attr,optional"` - RequireConsistent bool `river:"require_consistent,attr,optional"` + Server string `alloy:"server,attr,optional"` + CAFile string `alloy:"ca_file,attr,optional"` + CertFile string `alloy:"cert_file,attr,optional"` + KeyFile string `alloy:"key_file,attr,optional"` + ServerName string `alloy:"server_name,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + InsecureSkipVerify bool `alloy:"insecure_skip_verify,attr,optional"` + RequestLimit int `alloy:"concurrent_request_limit,attr,optional"` + AllowStale bool `alloy:"allow_stale,attr,optional"` + RequireConsistent bool `alloy:"require_consistent,attr,optional"` - KVPrefix string `river:"kv_prefix,attr,optional"` - KVFilter string `river:"kv_filter,attr,optional"` - HealthSummary bool `river:"generate_health_summary,attr,optional"` + KVPrefix string `alloy:"kv_prefix,attr,optional"` + KVFilter string `alloy:"kv_filter,attr,optional"` + HealthSummary bool `alloy:"generate_health_summary,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go index dc261f5758..bd3abc2077 100644 --- a/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go +++ b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go @@ -34,13 +34,13 @@ var DefaultArguments = Arguments{ // Arguments configures the prometheus.exporter.dnsmasq component. type Arguments struct { // Address is the address of the dnsmasq server to connect to (host:port). - Address string `river:"address,attr,optional"` + Address string `alloy:"address,attr,optional"` // LeasesFile is the path to the dnsmasq leases file. - LeasesFile string `river:"leases_file,attr,optional"` + LeasesFile string `alloy:"leases_file,attr,optional"` // ExposeLeases controls whether expose dnsmasq leases as metrics (high cardinality). - ExposeLeases bool `river:"expose_leases,attr,optional"` + ExposeLeases bool `alloy:"expose_leases,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go index 06811eb68c..6cd3b98c3c 100644 --- a/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go +++ b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go @@ -38,24 +38,24 @@ var DefaultArguments = Arguments{ } type Arguments struct { - Address string `river:"address,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` - AllNodes bool `river:"all,attr,optional"` - Node string `river:"node,attr,optional"` - ExportIndices bool `river:"indices,attr,optional"` - ExportIndicesSettings bool `river:"indices_settings,attr,optional"` - ExportClusterSettings bool `river:"cluster_settings,attr,optional"` - ExportShards bool `river:"shards,attr,optional"` - IncludeAliases bool `river:"aliases,attr,optional"` - ExportSnapshots bool `river:"snapshots,attr,optional"` - ExportClusterInfoInterval time.Duration `river:"clusterinfo_interval,attr,optional"` - CA string `river:"ca,attr,optional"` - ClientPrivateKey string `river:"client_private_key,attr,optional"` - ClientCert string `river:"client_cert,attr,optional"` - InsecureSkipVerify bool `river:"ssl_skip_verify,attr,optional"` - ExportDataStreams bool `river:"data_stream,attr,optional"` - ExportSLM bool `river:"slm,attr,optional"` - BasicAuth *commonCfg.BasicAuth `river:"basic_auth,block,optional"` + Address string `alloy:"address,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + AllNodes bool `alloy:"all,attr,optional"` + Node string `alloy:"node,attr,optional"` + ExportIndices bool `alloy:"indices,attr,optional"` + ExportIndicesSettings bool `alloy:"indices_settings,attr,optional"` + ExportClusterSettings bool `alloy:"cluster_settings,attr,optional"` + ExportShards bool `alloy:"shards,attr,optional"` + IncludeAliases bool `alloy:"aliases,attr,optional"` + ExportSnapshots bool `alloy:"snapshots,attr,optional"` + ExportClusterInfoInterval time.Duration `alloy:"clusterinfo_interval,attr,optional"` + CA string `alloy:"ca,attr,optional"` + ClientPrivateKey string `alloy:"client_private_key,attr,optional"` + ClientCert string `alloy:"client_cert,attr,optional"` + InsecureSkipVerify bool `alloy:"ssl_skip_verify,attr,optional"` + ExportDataStreams bool `alloy:"data_stream,attr,optional"` + ExportSLM bool `alloy:"slm,attr,optional"` + BasicAuth *commonCfg.BasicAuth `alloy:"basic_auth,block,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/exporter.go b/internal/component/prometheus/exporter/exporter.go index c184e1c12e..40572f21a0 100644 --- a/internal/component/prometheus/exporter/exporter.go +++ b/internal/component/prometheus/exporter/exporter.go @@ -22,7 +22,7 @@ type Creator func(component.Options, component.Arguments, string) (integrations. // Exports are simply a list of targets for a scraper to consume. type Exports struct { - Targets []discovery.Target `river:"targets,attr"` + Targets []discovery.Target `alloy:"targets,attr"` } type Component struct { diff --git a/internal/component/prometheus/exporter/gcp/gcp.go b/internal/component/prometheus/exporter/gcp/gcp.go index d9dbbf16ad..b3fb702f7a 100644 --- a/internal/component/prometheus/exporter/gcp/gcp.go +++ b/internal/component/prometheus/exporter/gcp/gcp.go @@ -27,14 +27,14 @@ func createExporter(opts component.Options, args component.Arguments, defaultIns } type Arguments struct { - ProjectIDs []string `river:"project_ids,attr"` - MetricPrefixes []string `river:"metrics_prefixes,attr"` - ExtraFilters []string `river:"extra_filters,attr,optional"` - RequestInterval time.Duration `river:"request_interval,attr,optional"` - RequestOffset time.Duration `river:"request_offset,attr,optional"` - IngestDelay bool `river:"ingest_delay,attr,optional"` - DropDelegatedProjects bool `river:"drop_delegated_projects,attr,optional"` - ClientTimeout time.Duration `river:"gcp_client_timeout,attr,optional"` + ProjectIDs []string `alloy:"project_ids,attr"` + MetricPrefixes []string `alloy:"metrics_prefixes,attr"` + ExtraFilters []string `alloy:"extra_filters,attr,optional"` + RequestInterval time.Duration `alloy:"request_interval,attr,optional"` + RequestOffset time.Duration `alloy:"request_offset,attr,optional"` + IngestDelay bool `alloy:"ingest_delay,attr,optional"` + DropDelegatedProjects bool `alloy:"drop_delegated_projects,attr,optional"` + ClientTimeout time.Duration `alloy:"gcp_client_timeout,attr,optional"` } var DefaultArguments = Arguments{ diff --git a/internal/component/prometheus/exporter/github/github.go b/internal/component/prometheus/exporter/github/github.go index eca1679719..1b321f0ce5 100644 --- a/internal/component/prometheus/exporter/github/github.go +++ b/internal/component/prometheus/exporter/github/github.go @@ -33,12 +33,12 @@ var DefaultArguments = Arguments{ } type Arguments struct { - APIURL string `river:"api_url,attr,optional"` - Repositories []string `river:"repositories,attr,optional"` - Organizations []string `river:"organizations,attr,optional"` - Users []string `river:"users,attr,optional"` - APIToken alloytypes.Secret `river:"api_token,attr,optional"` - APITokenFile string `river:"api_token_file,attr,optional"` + APIURL string `alloy:"api_url,attr,optional"` + Repositories []string `alloy:"repositories,attr,optional"` + Organizations []string `alloy:"organizations,attr,optional"` + Users []string `alloy:"users,attr,optional"` + APIToken alloytypes.Secret `alloy:"api_token,attr,optional"` + APITokenFile string `alloy:"api_token_file,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/kafka/kafka.go b/internal/component/prometheus/exporter/kafka/kafka.go index 604b04e018..95738f53d8 100644 --- a/internal/component/prometheus/exporter/kafka/kafka.go +++ b/internal/component/prometheus/exporter/kafka/kafka.go @@ -26,28 +26,28 @@ var DefaultArguments = Arguments{ } type Arguments struct { - Instance string `river:"instance,attr,optional"` - KafkaURIs []string `river:"kafka_uris,attr,optional"` - UseSASL bool `river:"use_sasl,attr,optional"` - UseSASLHandshake bool `river:"use_sasl_handshake,attr,optional"` - SASLUsername string `river:"sasl_username,attr,optional"` - SASLPassword alloytypes.Secret `river:"sasl_password,attr,optional"` - SASLMechanism string `river:"sasl_mechanism,attr,optional"` - UseTLS bool `river:"use_tls,attr,optional"` - CAFile string `river:"ca_file,attr,optional"` - CertFile string `river:"cert_file,attr,optional"` - KeyFile string `river:"key_file,attr,optional"` - InsecureSkipVerify bool `river:"insecure_skip_verify,attr,optional"` - KafkaVersion string `river:"kafka_version,attr,optional"` - UseZooKeeperLag bool `river:"use_zookeeper_lag,attr,optional"` - ZookeeperURIs []string `river:"zookeeper_uris,attr,optional"` - ClusterName string `river:"kafka_cluster_name,attr,optional"` - MetadataRefreshInterval string `river:"metadata_refresh_interval,attr,optional"` - AllowConcurrent bool `river:"allow_concurrency,attr,optional"` - MaxOffsets int `river:"max_offsets,attr,optional"` - PruneIntervalSeconds int `river:"prune_interval_seconds,attr,optional"` - TopicsFilter string `river:"topics_filter_regex,attr,optional"` - GroupFilter string `river:"groups_filter_regex,attr,optional"` + Instance string `alloy:"instance,attr,optional"` + KafkaURIs []string `alloy:"kafka_uris,attr,optional"` + UseSASL bool `alloy:"use_sasl,attr,optional"` + UseSASLHandshake bool `alloy:"use_sasl_handshake,attr,optional"` + SASLUsername string `alloy:"sasl_username,attr,optional"` + SASLPassword alloytypes.Secret `alloy:"sasl_password,attr,optional"` + SASLMechanism string `alloy:"sasl_mechanism,attr,optional"` + UseTLS bool `alloy:"use_tls,attr,optional"` + CAFile string `alloy:"ca_file,attr,optional"` + CertFile string `alloy:"cert_file,attr,optional"` + KeyFile string `alloy:"key_file,attr,optional"` + InsecureSkipVerify bool `alloy:"insecure_skip_verify,attr,optional"` + KafkaVersion string `alloy:"kafka_version,attr,optional"` + UseZooKeeperLag bool `alloy:"use_zookeeper_lag,attr,optional"` + ZookeeperURIs []string `alloy:"zookeeper_uris,attr,optional"` + ClusterName string `alloy:"kafka_cluster_name,attr,optional"` + MetadataRefreshInterval string `alloy:"metadata_refresh_interval,attr,optional"` + AllowConcurrent bool `alloy:"allow_concurrency,attr,optional"` + MaxOffsets int `alloy:"max_offsets,attr,optional"` + PruneIntervalSeconds int `alloy:"prune_interval_seconds,attr,optional"` + TopicsFilter string `alloy:"topics_filter_regex,attr,optional"` + GroupFilter string `alloy:"groups_filter_regex,attr,optional"` } func init() { diff --git a/internal/component/prometheus/exporter/memcached/memcached.go b/internal/component/prometheus/exporter/memcached/memcached.go index 516d05b24e..2a1a6d3588 100644 --- a/internal/component/prometheus/exporter/memcached/memcached.go +++ b/internal/component/prometheus/exporter/memcached/memcached.go @@ -36,14 +36,14 @@ var DefaultArguments = Arguments{ // Arguments configures the prometheus.exporter.memcached component. type Arguments struct { // Address is the address of the memcached server to connect to (host:port). - Address string `river:"address,attr,optional"` + Address string `alloy:"address,attr,optional"` // Timeout is the timeout for the memcached exporter to use when connecting to the // memcached server. - Timeout time.Duration `river:"timeout,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` // TLSConfig is used to configure TLS for connection to memcached. - TLSConfig *config.TLSConfig `river:"tls_config,block,optional"` + TLSConfig *config.TLSConfig `alloy:"tls_config,block,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/mongodb/mongodb.go b/internal/component/prometheus/exporter/mongodb/mongodb.go index cd46d1ebe1..c59c3eeaab 100644 --- a/internal/component/prometheus/exporter/mongodb/mongodb.go +++ b/internal/component/prometheus/exporter/mongodb/mongodb.go @@ -27,10 +27,10 @@ func createExporter(opts component.Options, args component.Arguments, defaultIns } type Arguments struct { - URI alloytypes.Secret `river:"mongodb_uri,attr"` - DirectConnect bool `river:"direct_connect,attr,optional"` - DiscoveringMode bool `river:"discovering_mode,attr,optional"` - TLSBasicAuthConfigPath string `river:"tls_basic_auth_config_path,attr,optional"` + URI alloytypes.Secret `alloy:"mongodb_uri,attr"` + DirectConnect bool `alloy:"direct_connect,attr,optional"` + DiscoveringMode bool `alloy:"discovering_mode,attr,optional"` + TLSBasicAuthConfigPath string `alloy:"tls_basic_auth_config_path,attr,optional"` } func (a *Arguments) Convert() *mongodb_exporter.Config { diff --git a/internal/component/prometheus/exporter/mssql/mssql.go b/internal/component/prometheus/exporter/mssql/mssql.go index dad15af1db..e50f064919 100644 --- a/internal/component/prometheus/exporter/mssql/mssql.go +++ b/internal/component/prometheus/exporter/mssql/mssql.go @@ -42,11 +42,11 @@ var DefaultArguments = Arguments{ // Arguments controls the mssql exporter. type Arguments struct { - ConnectionString alloytypes.Secret `river:"connection_string,attr"` - MaxIdleConnections int `river:"max_idle_connections,attr,optional"` - MaxOpenConnections int `river:"max_open_connections,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` - QueryConfig alloytypes.OptionalSecret `river:"query_config,attr,optional"` + ConnectionString alloytypes.Secret `alloy:"connection_string,attr"` + MaxIdleConnections int `alloy:"max_idle_connections,attr,optional"` + MaxOpenConnections int `alloy:"max_open_connections,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + QueryConfig alloytypes.OptionalSecret `alloy:"query_config,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/mysql/mysql.go b/internal/component/prometheus/exporter/mysql/mysql.go index 6f24e5d482..3fb75f2c52 100644 --- a/internal/component/prometheus/exporter/mysql/mysql.go +++ b/internal/component/prometheus/exporter/mysql/mysql.go @@ -58,71 +58,71 @@ var DefaultArguments = Arguments{ // Arguments controls the mysql component. type Arguments struct { // DataSourceName to use to connect to MySQL. - DataSourceName alloytypes.Secret `river:"data_source_name,attr,optional"` + DataSourceName alloytypes.Secret `alloy:"data_source_name,attr,optional"` // Collectors to mark as enabled in addition to the default. - EnableCollectors []string `river:"enable_collectors,attr,optional"` + EnableCollectors []string `alloy:"enable_collectors,attr,optional"` // Collectors to explicitly mark as disabled. - DisableCollectors []string `river:"disable_collectors,attr,optional"` + DisableCollectors []string `alloy:"disable_collectors,attr,optional"` // Overrides the default set of enabled collectors with the given list. - SetCollectors []string `river:"set_collectors,attr,optional"` + SetCollectors []string `alloy:"set_collectors,attr,optional"` // Collector-wide options - LockWaitTimeout int `river:"lock_wait_timeout,attr,optional"` - LogSlowFilter bool `river:"log_slow_filter,attr,optional"` + LockWaitTimeout int `alloy:"lock_wait_timeout,attr,optional"` + LogSlowFilter bool `alloy:"log_slow_filter,attr,optional"` // Collector-specific config options - InfoSchemaProcessList InfoSchemaProcessList `river:"info_schema.processlist,block,optional"` - InfoSchemaTables InfoSchemaTables `river:"info_schema.tables,block,optional"` - PerfSchemaEventsStatements PerfSchemaEventsStatements `river:"perf_schema.eventsstatements,block,optional"` - PerfSchemaFileInstances PerfSchemaFileInstances `river:"perf_schema.file_instances,block,optional"` - PerfSchemaMemoryEvents PerfSchemaMemoryEvents `river:"perf_schema.memory_events,block,optional"` - - Heartbeat Heartbeat `river:"heartbeat,block,optional"` - MySQLUser MySQLUser `river:"mysql.user,block,optional"` + InfoSchemaProcessList InfoSchemaProcessList `alloy:"info_schema.processlist,block,optional"` + InfoSchemaTables InfoSchemaTables `alloy:"info_schema.tables,block,optional"` + PerfSchemaEventsStatements PerfSchemaEventsStatements `alloy:"perf_schema.eventsstatements,block,optional"` + PerfSchemaFileInstances PerfSchemaFileInstances `alloy:"perf_schema.file_instances,block,optional"` + PerfSchemaMemoryEvents PerfSchemaMemoryEvents `alloy:"perf_schema.memory_events,block,optional"` + + Heartbeat Heartbeat `alloy:"heartbeat,block,optional"` + MySQLUser MySQLUser `alloy:"mysql.user,block,optional"` } // InfoSchemaProcessList configures the info_schema.processlist collector type InfoSchemaProcessList struct { - MinTime int `river:"min_time,attr,optional"` - ProcessesByUser bool `river:"processes_by_user,attr,optional"` - ProcessesByHost bool `river:"processes_by_host,attr,optional"` + MinTime int `alloy:"min_time,attr,optional"` + ProcessesByUser bool `alloy:"processes_by_user,attr,optional"` + ProcessesByHost bool `alloy:"processes_by_host,attr,optional"` } // InfoSchemaTables configures the info_schema.tables collector type InfoSchemaTables struct { - Databases string `river:"databases,attr,optional"` + Databases string `alloy:"databases,attr,optional"` } // PerfSchemaEventsStatements configures the perf_schema.eventsstatements collector type PerfSchemaEventsStatements struct { - Limit int `river:"limit,attr,optional"` - TimeLimit int `river:"time_limit,attr,optional"` - TextLimit int `river:"text_limit,attr,optional"` + Limit int `alloy:"limit,attr,optional"` + TimeLimit int `alloy:"time_limit,attr,optional"` + TextLimit int `alloy:"text_limit,attr,optional"` } // PerfSchemaFileInstances configures the perf_schema.file_instances collector type PerfSchemaFileInstances struct { - Filter string `river:"filter,attr,optional"` - RemovePrefix string `river:"remove_prefix,attr,optional"` + Filter string `alloy:"filter,attr,optional"` + RemovePrefix string `alloy:"remove_prefix,attr,optional"` } // PerfSchemaMemoryEvents configures the perf_schema.memory_events collector type PerfSchemaMemoryEvents struct { - RemovePrefix string `river:"remove_prefix,attr,optional"` + RemovePrefix string `alloy:"remove_prefix,attr,optional"` } // Heartbeat controls the heartbeat collector type Heartbeat struct { - Database string `river:"database,attr,optional"` - Table string `river:"table,attr,optional"` - UTC bool `river:"utc,attr,optional"` + Database string `alloy:"database,attr,optional"` + Table string `alloy:"table,attr,optional"` + UTC bool `alloy:"utc,attr,optional"` } // MySQLUser controls the mysql.user collector type MySQLUser struct { - Privileges bool `river:"privileges,attr,optional"` + Privileges bool `alloy:"privileges,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/oracledb/oracledb.go b/internal/component/prometheus/exporter/oracledb/oracledb.go index 21ea2909b6..dd71616d68 100644 --- a/internal/component/prometheus/exporter/oracledb/oracledb.go +++ b/internal/component/prometheus/exporter/oracledb/oracledb.go @@ -44,10 +44,10 @@ var ( // Arguments controls the oracledb exporter. type Arguments struct { - ConnectionString alloytypes.Secret `river:"connection_string,attr"` - MaxIdleConns int `river:"max_idle_conns,attr,optional"` - MaxOpenConns int `river:"max_open_conns,attr,optional"` - QueryTimeout int `river:"query_timeout,attr,optional"` + ConnectionString alloytypes.Secret `alloy:"connection_string,attr"` + MaxIdleConns int `alloy:"max_idle_conns,attr,optional"` + MaxOpenConns int `alloy:"max_open_conns,attr,optional"` + QueryTimeout int `alloy:"query_timeout,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/postgres/postgres.go b/internal/component/prometheus/exporter/postgres/postgres.go index d5e2e0d1b7..ec227308a3 100644 --- a/internal/component/prometheus/exporter/postgres/postgres.go +++ b/internal/component/prometheus/exporter/postgres/postgres.go @@ -77,22 +77,22 @@ type Arguments struct { // DataSourceNames to use to connect to Postgres. This is marked optional because it // may also be supplied by the POSTGRES_EXPORTER_DATA_SOURCE_NAME env var, // though it is not recommended to do so. - DataSourceNames []alloytypes.Secret `river:"data_source_names,attr,optional"` + DataSourceNames []alloytypes.Secret `alloy:"data_source_names,attr,optional"` // Attributes - DisableSettingsMetrics bool `river:"disable_settings_metrics,attr,optional"` - DisableDefaultMetrics bool `river:"disable_default_metrics,attr,optional"` - CustomQueriesConfigPath string `river:"custom_queries_config_path,attr,optional"` + DisableSettingsMetrics bool `alloy:"disable_settings_metrics,attr,optional"` + DisableDefaultMetrics bool `alloy:"disable_default_metrics,attr,optional"` + CustomQueriesConfigPath string `alloy:"custom_queries_config_path,attr,optional"` // Blocks - AutoDiscovery AutoDiscovery `river:"autodiscovery,block,optional"` + AutoDiscovery AutoDiscovery `alloy:"autodiscovery,block,optional"` } // Autodiscovery controls discovery of databases outside any specified in DataSourceNames. type AutoDiscovery struct { - Enabled bool `river:"enabled,attr,optional"` - DatabaseAllowlist []string `river:"database_allowlist,attr,optional"` - DatabaseDenylist []string `river:"database_denylist,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + DatabaseAllowlist []string `alloy:"database_allowlist,attr,optional"` + DatabaseDenylist []string `alloy:"database_denylist,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/process/process.go b/internal/component/prometheus/exporter/process/process.go index 187aee4a76..fbf27a256a 100644 --- a/internal/component/prometheus/exporter/process/process.go +++ b/internal/component/prometheus/exporter/process/process.go @@ -37,21 +37,21 @@ var DefaultArguments = Arguments{ // Arguments configures the prometheus.exporter.process component type Arguments struct { - ProcessExporter []MatcherGroup `river:"matcher,block,optional"` + ProcessExporter []MatcherGroup `alloy:"matcher,block,optional"` - ProcFSPath string `river:"procfs_path,attr,optional"` - Children bool `river:"track_children,attr,optional"` - Threads bool `river:"track_threads,attr,optional"` - SMaps bool `river:"gather_smaps,attr,optional"` - Recheck bool `river:"recheck_on_scrape,attr,optional"` + ProcFSPath string `alloy:"procfs_path,attr,optional"` + Children bool `alloy:"track_children,attr,optional"` + Threads bool `alloy:"track_threads,attr,optional"` + SMaps bool `alloy:"gather_smaps,attr,optional"` + Recheck bool `alloy:"recheck_on_scrape,attr,optional"` } // MatcherGroup taken and converted to River from github.com/ncabatoff/process-exporter/config type MatcherGroup struct { - Name string `river:"name,attr,optional"` - CommRules []string `river:"comm,attr,optional"` - ExeRules []string `river:"exe,attr,optional"` - CmdlineRules []string `river:"cmdline,attr,optional"` + Name string `alloy:"name,attr,optional"` + CommRules []string `alloy:"comm,attr,optional"` + ExeRules []string `alloy:"exe,attr,optional"` + CmdlineRules []string `alloy:"cmdline,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/redis/redis.go b/internal/component/prometheus/exporter/redis/redis.go index cfb8f7459a..61bd9977c4 100644 --- a/internal/component/prometheus/exporter/redis/redis.go +++ b/internal/component/prometheus/exporter/redis/redis.go @@ -44,43 +44,43 @@ var DefaultArguments = Arguments{ } type Arguments struct { - IncludeExporterMetrics bool `river:"include_exporter_metrics,attr,optional"` + IncludeExporterMetrics bool `alloy:"include_exporter_metrics,attr,optional"` // exporter-specific config. // // The exporter binary config differs to this, but these // are the only fields that are relevant to the exporter struct. - RedisAddr string `river:"redis_addr,attr"` - RedisUser string `river:"redis_user,attr,optional"` - RedisPassword alloytypes.Secret `river:"redis_password,attr,optional"` - RedisPasswordFile string `river:"redis_password_file,attr,optional"` - RedisPasswordMapFile string `river:"redis_password_map_file,attr,optional"` - Namespace string `river:"namespace,attr,optional"` - ConfigCommand string `river:"config_command,attr,optional"` - CheckKeys []string `river:"check_keys,attr,optional"` - CheckKeyGroups []string `river:"check_key_groups,attr,optional"` - CheckKeyGroupsBatchSize int64 `river:"check_key_groups_batch_size,attr,optional"` - MaxDistinctKeyGroups int64 `river:"max_distinct_key_groups,attr,optional"` - CheckSingleKeys []string `river:"check_single_keys,attr,optional"` - CheckStreams []string `river:"check_streams,attr,optional"` - CheckSingleStreams []string `river:"check_single_streams,attr,optional"` - ExportKeyValues bool `river:"export_key_values,attr,optional"` - CountKeys []string `river:"count_keys,attr,optional"` - ScriptPath string `river:"script_path,attr,optional"` - ScriptPaths []string `river:"script_paths,attr,optional"` - ConnectionTimeout time.Duration `river:"connection_timeout,attr,optional"` - TLSClientKeyFile string `river:"tls_client_key_file,attr,optional"` - TLSClientCertFile string `river:"tls_client_cert_file,attr,optional"` - TLSCaCertFile string `river:"tls_ca_cert_file,attr,optional"` - SetClientName bool `river:"set_client_name,attr,optional"` - IsTile38 bool `river:"is_tile38,attr,optional"` - IsCluster bool `river:"is_cluster,attr,optional"` - ExportClientList bool `river:"export_client_list,attr,optional"` - ExportClientPort bool `river:"export_client_port,attr,optional"` - RedisMetricsOnly bool `river:"redis_metrics_only,attr,optional"` - PingOnConnect bool `river:"ping_on_connect,attr,optional"` - InclSystemMetrics bool `river:"incl_system_metrics,attr,optional"` - SkipTLSVerification bool `river:"skip_tls_verification,attr,optional"` + RedisAddr string `alloy:"redis_addr,attr"` + RedisUser string `alloy:"redis_user,attr,optional"` + RedisPassword alloytypes.Secret `alloy:"redis_password,attr,optional"` + RedisPasswordFile string `alloy:"redis_password_file,attr,optional"` + RedisPasswordMapFile string `alloy:"redis_password_map_file,attr,optional"` + Namespace string `alloy:"namespace,attr,optional"` + ConfigCommand string `alloy:"config_command,attr,optional"` + CheckKeys []string `alloy:"check_keys,attr,optional"` + CheckKeyGroups []string `alloy:"check_key_groups,attr,optional"` + CheckKeyGroupsBatchSize int64 `alloy:"check_key_groups_batch_size,attr,optional"` + MaxDistinctKeyGroups int64 `alloy:"max_distinct_key_groups,attr,optional"` + CheckSingleKeys []string `alloy:"check_single_keys,attr,optional"` + CheckStreams []string `alloy:"check_streams,attr,optional"` + CheckSingleStreams []string `alloy:"check_single_streams,attr,optional"` + ExportKeyValues bool `alloy:"export_key_values,attr,optional"` + CountKeys []string `alloy:"count_keys,attr,optional"` + ScriptPath string `alloy:"script_path,attr,optional"` + ScriptPaths []string `alloy:"script_paths,attr,optional"` + ConnectionTimeout time.Duration `alloy:"connection_timeout,attr,optional"` + TLSClientKeyFile string `alloy:"tls_client_key_file,attr,optional"` + TLSClientCertFile string `alloy:"tls_client_cert_file,attr,optional"` + TLSCaCertFile string `alloy:"tls_ca_cert_file,attr,optional"` + SetClientName bool `alloy:"set_client_name,attr,optional"` + IsTile38 bool `alloy:"is_tile38,attr,optional"` + IsCluster bool `alloy:"is_cluster,attr,optional"` + ExportClientList bool `alloy:"export_client_list,attr,optional"` + ExportClientPort bool `alloy:"export_client_port,attr,optional"` + RedisMetricsOnly bool `alloy:"redis_metrics_only,attr,optional"` + PingOnConnect bool `alloy:"ping_on_connect,attr,optional"` + InclSystemMetrics bool `alloy:"incl_system_metrics,attr,optional"` + SkipTLSVerification bool `alloy:"skip_tls_verification,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/snmp/snmp.go b/internal/component/prometheus/exporter/snmp/snmp.go index 286ae7fb35..5ad5df6bfa 100644 --- a/internal/component/prometheus/exporter/snmp/snmp.go +++ b/internal/component/prometheus/exporter/snmp/snmp.go @@ -63,11 +63,11 @@ func buildSNMPTargets(baseTarget discovery.Target, args component.Arguments) []d // SNMPTarget defines a target to be used by the exporter. type SNMPTarget struct { - Name string `river:",label"` - Target string `river:"address,attr"` - Module string `river:"module,attr,optional"` - Auth string `river:"auth,attr,optional"` - WalkParams string `river:"walk_params,attr,optional"` + Name string `alloy:",label"` + Target string `alloy:"address,attr"` + Module string `alloy:"module,attr,optional"` + Auth string `alloy:"auth,attr,optional"` + WalkParams string `alloy:"walk_params,attr,optional"` } type TargetBlock []SNMPTarget @@ -88,11 +88,11 @@ func (t TargetBlock) Convert() []snmp_exporter.SNMPTarget { } type WalkParam struct { - Name string `river:",label"` - MaxRepetitions uint32 `river:"max_repetitions,attr,optional"` - Retries int `river:"retries,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` - UseUnconnectedUDPSocket bool `river:"use_unconnected_udp_socket,attr,optional"` + Name string `alloy:",label"` + MaxRepetitions uint32 `alloy:"max_repetitions,attr,optional"` + Retries int `alloy:"retries,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` + UseUnconnectedUDPSocket bool `alloy:"use_unconnected_udp_socket,attr,optional"` } type WalkParams []WalkParam @@ -112,10 +112,10 @@ func (w WalkParams) Convert() map[string]snmp_config.WalkParams { } type Arguments struct { - ConfigFile string `river:"config_file,attr,optional"` - Config alloytypes.OptionalSecret `river:"config,attr,optional"` - Targets TargetBlock `river:"target,block"` - WalkParams WalkParams `river:"walk_param,block,optional"` + ConfigFile string `alloy:"config_file,attr,optional"` + Config alloytypes.OptionalSecret `alloy:"config,attr,optional"` + Targets TargetBlock `alloy:"target,block"` + WalkParams WalkParams `alloy:"walk_param,block,optional"` ConfigStruct snmp_config.Config } diff --git a/internal/component/prometheus/exporter/snowflake/snowflake.go b/internal/component/prometheus/exporter/snowflake/snowflake.go index f377d4edd9..72bd01e4b7 100644 --- a/internal/component/prometheus/exporter/snowflake/snowflake.go +++ b/internal/component/prometheus/exporter/snowflake/snowflake.go @@ -33,11 +33,11 @@ var DefaultArguments = Arguments{ // Arguments controls the snowflake exporter. type Arguments struct { - AccountName string `river:"account_name,attr"` - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` - Role string `river:"role,attr,optional"` - Warehouse string `river:"warehouse,attr"` + AccountName string `alloy:"account_name,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` + Role string `alloy:"role,attr,optional"` + Warehouse string `alloy:"warehouse,attr"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/squid/squid.go b/internal/component/prometheus/exporter/squid/squid.go index f5ba5a133c..e08e404cbf 100644 --- a/internal/component/prometheus/exporter/squid/squid.go +++ b/internal/component/prometheus/exporter/squid/squid.go @@ -30,9 +30,9 @@ func createExporter(opts component.Options, args component.Arguments, defaultIns // Arguments controls the squid exporter. type Arguments struct { - SquidAddr string `river:"address,attr"` - SquidUser string `river:"username,attr,optional"` - SquidPassword alloytypes.Secret `river:"password,attr,optional"` + SquidAddr string `alloy:"address,attr"` + SquidUser string `alloy:"username,attr,optional"` + SquidPassword alloytypes.Secret `alloy:"password,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/exporter/statsd/config.go b/internal/component/prometheus/exporter/statsd/config.go index 2b3f11e0bd..18525450a9 100644 --- a/internal/component/prometheus/exporter/statsd/config.go +++ b/internal/component/prometheus/exporter/statsd/config.go @@ -10,26 +10,26 @@ import ( ) type Arguments struct { - ListenUDP string `river:"listen_udp,attr,optional"` - ListenTCP string `river:"listen_tcp,attr,optional"` - ListenUnixgram string `river:"listen_unixgram,attr,optional"` - UnixSocketMode string `river:"unix_socket_mode,attr,optional"` - MappingConfig string `river:"mapping_config_path,attr,optional"` - - ReadBuffer int `river:"read_buffer,attr,optional"` - CacheSize int `river:"cache_size,attr,optional"` - CacheType string `river:"cache_type,attr,optional"` - EventQueueSize int `river:"event_queue_size,attr,optional"` - EventFlushThreshold int `river:"event_flush_threshold,attr,optional"` - EventFlushInterval time.Duration `river:"event_flush_interval,attr,optional"` - - ParseDogStatsd bool `river:"parse_dogstatsd_tags,attr,optional"` - ParseInfluxDB bool `river:"parse_influxdb_tags,attr,optional"` - ParseLibrato bool `river:"parse_librato_tags,attr,optional"` - ParseSignalFX bool `river:"parse_signalfx_tags,attr,optional"` - - RelayAddr string `river:"relay_addr,attr,optional"` - RelayPacketLength int `river:"relay_packet_length,attr,optional"` + ListenUDP string `alloy:"listen_udp,attr,optional"` + ListenTCP string `alloy:"listen_tcp,attr,optional"` + ListenUnixgram string `alloy:"listen_unixgram,attr,optional"` + UnixSocketMode string `alloy:"unix_socket_mode,attr,optional"` + MappingConfig string `alloy:"mapping_config_path,attr,optional"` + + ReadBuffer int `alloy:"read_buffer,attr,optional"` + CacheSize int `alloy:"cache_size,attr,optional"` + CacheType string `alloy:"cache_type,attr,optional"` + EventQueueSize int `alloy:"event_queue_size,attr,optional"` + EventFlushThreshold int `alloy:"event_flush_threshold,attr,optional"` + EventFlushInterval time.Duration `alloy:"event_flush_interval,attr,optional"` + + ParseDogStatsd bool `alloy:"parse_dogstatsd_tags,attr,optional"` + ParseInfluxDB bool `alloy:"parse_influxdb_tags,attr,optional"` + ParseLibrato bool `alloy:"parse_librato_tags,attr,optional"` + ParseSignalFX bool `alloy:"parse_signalfx_tags,attr,optional"` + + RelayAddr string `alloy:"relay_addr,attr,optional"` + RelayPacketLength int `alloy:"relay_packet_length,attr,optional"` } // DefaultConfig holds non-zero default options for the Config when it is diff --git a/internal/component/prometheus/exporter/unix/config.go b/internal/component/prometheus/exporter/unix/config.go index 96de4a5c6b..f5303566e0 100644 --- a/internal/component/prometheus/exporter/unix/config.go +++ b/internal/component/prometheus/exporter/unix/config.go @@ -63,42 +63,42 @@ var DefaultArguments = Arguments{ // Arguments is used for controlling for this exporter. type Arguments struct { - IncludeExporterMetrics bool `river:"include_exporter_metrics,attr,optional"` - ProcFSPath string `river:"procfs_path,attr,optional"` - SysFSPath string `river:"sysfs_path,attr,optional"` - RootFSPath string `river:"rootfs_path,attr,optional"` - UdevDataPath string `river:"udev_data_path,attr,optional"` + IncludeExporterMetrics bool `alloy:"include_exporter_metrics,attr,optional"` + ProcFSPath string `alloy:"procfs_path,attr,optional"` + SysFSPath string `alloy:"sysfs_path,attr,optional"` + RootFSPath string `alloy:"rootfs_path,attr,optional"` + UdevDataPath string `alloy:"udev_data_path,attr,optional"` // Collectors to mark as enabled - EnableCollectors flagext.StringSlice `river:"enable_collectors,attr,optional"` + EnableCollectors flagext.StringSlice `alloy:"enable_collectors,attr,optional"` // Collectors to mark as disabled - DisableCollectors flagext.StringSlice `river:"disable_collectors,attr,optional"` + DisableCollectors flagext.StringSlice `alloy:"disable_collectors,attr,optional"` // Overrides the default set of enabled collectors with the collectors // listed. - SetCollectors flagext.StringSlice `river:"set_collectors,attr,optional"` + SetCollectors flagext.StringSlice `alloy:"set_collectors,attr,optional"` // Collector-specific config options - BCache BCacheConfig `river:"bcache,block,optional"` - CPU CPUConfig `river:"cpu,block,optional"` - Disk DiskStatsConfig `river:"disk,block,optional"` - EthTool EthToolConfig `river:"ethtool,block,optional"` - Filesystem FilesystemConfig `river:"filesystem,block,optional"` - IPVS IPVSConfig `river:"ipvs,block,optional"` - NTP NTPConfig `river:"ntp,block,optional"` - Netclass NetclassConfig `river:"netclass,block,optional"` - Netdev NetdevConfig `river:"netdev,block,optional"` - Netstat NetstatConfig `river:"netstat,block,optional"` - Perf PerfConfig `river:"perf,block,optional"` - Powersupply PowersupplyConfig `river:"powersupply,block,optional"` - Runit RunitConfig `river:"runit,block,optional"` - Supervisord SupervisordConfig `river:"supervisord,block,optional"` - Sysctl SysctlConfig `river:"sysctl,block,optional"` - Systemd SystemdConfig `river:"systemd,block,optional"` - Tapestats TapestatsConfig `river:"tapestats,block,optional"` - Textfile TextfileConfig `river:"textfile,block,optional"` - VMStat VMStatConfig `river:"vmstat,block,optional"` + BCache BCacheConfig `alloy:"bcache,block,optional"` + CPU CPUConfig `alloy:"cpu,block,optional"` + Disk DiskStatsConfig `alloy:"disk,block,optional"` + EthTool EthToolConfig `alloy:"ethtool,block,optional"` + Filesystem FilesystemConfig `alloy:"filesystem,block,optional"` + IPVS IPVSConfig `alloy:"ipvs,block,optional"` + NTP NTPConfig `alloy:"ntp,block,optional"` + Netclass NetclassConfig `alloy:"netclass,block,optional"` + Netdev NetdevConfig `alloy:"netdev,block,optional"` + Netstat NetstatConfig `alloy:"netstat,block,optional"` + Perf PerfConfig `alloy:"perf,block,optional"` + Powersupply PowersupplyConfig `alloy:"powersupply,block,optional"` + Runit RunitConfig `alloy:"runit,block,optional"` + Supervisord SupervisordConfig `alloy:"supervisord,block,optional"` + Sysctl SysctlConfig `alloy:"sysctl,block,optional"` + Systemd SystemdConfig `alloy:"systemd,block,optional"` + Tapestats TapestatsConfig `alloy:"tapestats,block,optional"` + Textfile TextfileConfig `alloy:"textfile,block,optional"` + VMStat VMStatConfig `alloy:"vmstat,block,optional"` } // Convert gives a config suitable for use with github.com/grafana/agent/internal/static/integrations/node_exporter. @@ -169,125 +169,125 @@ func (a *Arguments) SetToDefault() { // PowersupplyConfig contains config specific to the powersupply collector. type PowersupplyConfig struct { - IgnoredSupplies string `river:"ignored_supplies,attr,optional"` + IgnoredSupplies string `alloy:"ignored_supplies,attr,optional"` } // RunitConfig contains config specific to the runit collector. type RunitConfig struct { - ServiceDir string `river:"service_dir,attr,optional"` + ServiceDir string `alloy:"service_dir,attr,optional"` } // SupervisordConfig contains config specific to the supervisord collector. type SupervisordConfig struct { - URL string `river:"url,attr,optional"` + URL string `alloy:"url,attr,optional"` } // TapestatsConfig contains config specific to the tapestats collector. type TapestatsConfig struct { - IgnoredDevices string `river:"ignored_devices,attr,optional"` + IgnoredDevices string `alloy:"ignored_devices,attr,optional"` } // TextfileConfig contains config specific to the textfile collector. type TextfileConfig struct { - Directory string `river:"directory,attr,optional"` + Directory string `alloy:"directory,attr,optional"` } // VMStatConfig contains config specific to the vmstat collector. type VMStatConfig struct { - Fields string `river:"fields,attr,optional"` + Fields string `alloy:"fields,attr,optional"` } // NetclassConfig contains config specific to the netclass collector. type NetclassConfig struct { - IgnoreInvalidSpeedDevice bool `river:"ignore_invalid_speed_device,attr,optional"` - IgnoredDevices string `river:"ignored_devices,attr,optional"` + IgnoreInvalidSpeedDevice bool `alloy:"ignore_invalid_speed_device,attr,optional"` + IgnoredDevices string `alloy:"ignored_devices,attr,optional"` } // NetdevConfig contains config specific to the netdev collector. type NetdevConfig struct { - AddressInfo bool `river:"address_info,attr,optional"` - DeviceExclude string `river:"device_exclude,attr,optional"` - DeviceInclude string `river:"device_include,attr,optional"` + AddressInfo bool `alloy:"address_info,attr,optional"` + DeviceExclude string `alloy:"device_exclude,attr,optional"` + DeviceInclude string `alloy:"device_include,attr,optional"` } // NetstatConfig contains config specific to the netstat collector. type NetstatConfig struct { - Fields string `river:"fields,attr,optional"` + Fields string `alloy:"fields,attr,optional"` } // PerfConfig contains config specific to the perf collector. type PerfConfig struct { - CPUS string `river:"cpus,attr,optional"` - Tracepoint flagext.StringSlice `river:"tracepoint,attr,optional"` + CPUS string `alloy:"cpus,attr,optional"` + Tracepoint flagext.StringSlice `alloy:"tracepoint,attr,optional"` - DisableHardwareProfilers bool `river:"disable_hardware_profilers,attr,optional"` - DisableSoftwareProfilers bool `river:"disable_software_profilers,attr,optional"` - DisableCacheProfilers bool `river:"disable_cache_profilers,attr,optional"` + DisableHardwareProfilers bool `alloy:"disable_hardware_profilers,attr,optional"` + DisableSoftwareProfilers bool `alloy:"disable_software_profilers,attr,optional"` + DisableCacheProfilers bool `alloy:"disable_cache_profilers,attr,optional"` - HardwareProfilers flagext.StringSlice `river:"hardware_profilers,attr,optional"` - SoftwareProfilers flagext.StringSlice `river:"software_profilers,attr,optional"` - CacheProfilers flagext.StringSlice `river:"cache_profilers,attr,optional"` + HardwareProfilers flagext.StringSlice `alloy:"hardware_profilers,attr,optional"` + SoftwareProfilers flagext.StringSlice `alloy:"software_profilers,attr,optional"` + CacheProfilers flagext.StringSlice `alloy:"cache_profilers,attr,optional"` } // EthToolConfig contains config specific to the ethtool collector. type EthToolConfig struct { - DeviceExclude string `river:"device_exclude,attr,optional"` - DeviceInclude string `river:"device_include,attr,optional"` - MetricsInclude string `river:"metrics_include,attr,optional"` + DeviceExclude string `alloy:"device_exclude,attr,optional"` + DeviceInclude string `alloy:"device_include,attr,optional"` + MetricsInclude string `alloy:"metrics_include,attr,optional"` } // FilesystemConfig contains config specific to the filesystem collector. type FilesystemConfig struct { - FSTypesExclude string `river:"fs_types_exclude,attr,optional"` - MountPointsExclude string `river:"mount_points_exclude,attr,optional"` - MountTimeout time.Duration `river:"mount_timeout,attr,optional"` + FSTypesExclude string `alloy:"fs_types_exclude,attr,optional"` + MountPointsExclude string `alloy:"mount_points_exclude,attr,optional"` + MountTimeout time.Duration `alloy:"mount_timeout,attr,optional"` } // IPVSConfig contains config specific to the ipvs collector. type IPVSConfig struct { - BackendLabels []string `river:"backend_labels,attr,optional"` + BackendLabels []string `alloy:"backend_labels,attr,optional"` } // BCacheConfig contains config specific to the bcache collector. type BCacheConfig struct { - PriorityStats bool `river:"priority_stats,attr,optional"` + PriorityStats bool `alloy:"priority_stats,attr,optional"` } // CPUConfig contains config specific to the cpu collector. type CPUConfig struct { - BugsInclude string `river:"bugs_include,attr,optional"` - EnableCPUGuest bool `river:"guest,attr,optional"` - EnableCPUInfo bool `river:"info,attr,optional"` - FlagsInclude string `river:"flags_include,attr,optional"` + BugsInclude string `alloy:"bugs_include,attr,optional"` + EnableCPUGuest bool `alloy:"guest,attr,optional"` + EnableCPUInfo bool `alloy:"info,attr,optional"` + FlagsInclude string `alloy:"flags_include,attr,optional"` } // DiskStatsConfig contains config specific to the diskstats collector. type DiskStatsConfig struct { - DeviceExclude string `river:"device_exclude,attr,optional"` - DeviceInclude string `river:"device_include,attr,optional"` + DeviceExclude string `alloy:"device_exclude,attr,optional"` + DeviceInclude string `alloy:"device_include,attr,optional"` } // NTPConfig contains config specific to the ntp collector. type NTPConfig struct { - IPTTL int `river:"ip_ttl,attr,optional"` - LocalOffsetTolerance time.Duration `river:"local_offset_tolerance,attr,optional"` - MaxDistance time.Duration `river:"max_distance,attr,optional"` - ProtocolVersion int `river:"protocol_version,attr,optional"` - Server string `river:"server,attr,optional"` - ServerIsLocal bool `river:"server_is_local,attr,optional"` + IPTTL int `alloy:"ip_ttl,attr,optional"` + LocalOffsetTolerance time.Duration `alloy:"local_offset_tolerance,attr,optional"` + MaxDistance time.Duration `alloy:"max_distance,attr,optional"` + ProtocolVersion int `alloy:"protocol_version,attr,optional"` + Server string `alloy:"server,attr,optional"` + ServerIsLocal bool `alloy:"server_is_local,attr,optional"` } // SystemdConfig contains config specific to the systemd collector. type SystemdConfig struct { - EnableRestartsMetrics bool `river:"enable_restarts,attr,optional"` - EnableStartTimeMetrics bool `river:"start_time,attr,optional"` - EnableTaskMetrics bool `river:"task_metrics,attr,optional"` - UnitExclude string `river:"unit_exclude,attr,optional"` - UnitInclude string `river:"unit_include,attr,optional"` + EnableRestartsMetrics bool `alloy:"enable_restarts,attr,optional"` + EnableStartTimeMetrics bool `alloy:"start_time,attr,optional"` + EnableTaskMetrics bool `alloy:"task_metrics,attr,optional"` + UnitExclude string `alloy:"unit_exclude,attr,optional"` + UnitInclude string `alloy:"unit_include,attr,optional"` } // SysctlConfig contains config specific to the sysctl collector. type SysctlConfig struct { - Include []string `river:"include,attr,optional"` - IncludeInfo []string `river:"include_info,attr,optional"` + Include []string `alloy:"include,attr,optional"` + IncludeInfo []string `alloy:"include_info,attr,optional"` } diff --git a/internal/component/prometheus/exporter/windows/config.go b/internal/component/prometheus/exporter/windows/config.go index 185f6213ac..e4bff8c46c 100644 --- a/internal/component/prometheus/exporter/windows/config.go +++ b/internal/component/prometheus/exporter/windows/config.go @@ -9,22 +9,22 @@ import ( // Arguments is used for controlling for this exporter. type Arguments struct { // Collectors to mark as enabled - EnabledCollectors []string `river:"enabled_collectors,attr,optional"` + EnabledCollectors []string `alloy:"enabled_collectors,attr,optional"` // Collector-specific config options - Dfsr DfsrConfig `river:"dfsr,block,optional"` - Exchange ExchangeConfig `river:"exchange,block,optional"` - IIS IISConfig `river:"iis,block,optional"` - LogicalDisk LogicalDiskConfig `river:"logical_disk,block,optional"` - MSMQ MSMQConfig `river:"msmq,block,optional"` - MSSQL MSSQLConfig `river:"mssql,block,optional"` - Network NetworkConfig `river:"network,block,optional"` - PhysicalDisk PhysicalDiskConfig `river:"physical_disk,block,optional"` - Process ProcessConfig `river:"process,block,optional"` - ScheduledTask ScheduledTaskConfig `river:"scheduled_task,block,optional"` - Service ServiceConfig `river:"service,block,optional"` - SMTP SMTPConfig `river:"smtp,block,optional"` - TextFile TextFileConfig `river:"text_file,block,optional"` + Dfsr DfsrConfig `alloy:"dfsr,block,optional"` + Exchange ExchangeConfig `alloy:"exchange,block,optional"` + IIS IISConfig `alloy:"iis,block,optional"` + LogicalDisk LogicalDiskConfig `alloy:"logical_disk,block,optional"` + MSMQ MSMQConfig `alloy:"msmq,block,optional"` + MSSQL MSSQLConfig `alloy:"mssql,block,optional"` + Network NetworkConfig `alloy:"network,block,optional"` + PhysicalDisk PhysicalDiskConfig `alloy:"physical_disk,block,optional"` + Process ProcessConfig `alloy:"process,block,optional"` + ScheduledTask ScheduledTaskConfig `alloy:"scheduled_task,block,optional"` + Service ServiceConfig `alloy:"service,block,optional"` + SMTP SMTPConfig `alloy:"smtp,block,optional"` + TextFile TextFileConfig `alloy:"text_file,block,optional"` } // Convert converts the component's Arguments to the integration's Config. @@ -49,7 +49,7 @@ func (a *Arguments) Convert() *windows_integration.Config { // DfsrConfig handles settings for the windows_exporter Exchange collector type DfsrConfig struct { - SourcesEnabled []string `river:"sources_enabled,attr,optional"` + SourcesEnabled []string `alloy:"sources_enabled,attr,optional"` } // Convert converts the component's DfsrConfig to the integration's ExchangeConfig. @@ -61,7 +61,7 @@ func (t DfsrConfig) Convert() windows_integration.DfsrConfig { // ExchangeConfig handles settings for the windows_exporter Exchange collector type ExchangeConfig struct { - EnabledList []string `river:"enabled_list,attr,optional"` + EnabledList []string `alloy:"enabled_list,attr,optional"` } // Convert converts the component's ExchangeConfig to the integration's ExchangeConfig. @@ -73,14 +73,14 @@ func (t ExchangeConfig) Convert() windows_integration.ExchangeConfig { // IISConfig handles settings for the windows_exporter IIS collector type IISConfig struct { - AppBlackList string `river:"app_blacklist,attr,optional"` - AppWhiteList string `river:"app_whitelist,attr,optional"` - SiteBlackList string `river:"site_blacklist,attr,optional"` - SiteWhiteList string `river:"site_whitelist,attr,optional"` - AppExclude string `river:"app_exclude,attr,optional"` - AppInclude string `river:"app_include,attr,optional"` - SiteExclude string `river:"site_exclude,attr,optional"` - SiteInclude string `river:"site_include,attr,optional"` + AppBlackList string `alloy:"app_blacklist,attr,optional"` + AppWhiteList string `alloy:"app_whitelist,attr,optional"` + SiteBlackList string `alloy:"site_blacklist,attr,optional"` + SiteWhiteList string `alloy:"site_whitelist,attr,optional"` + AppExclude string `alloy:"app_exclude,attr,optional"` + AppInclude string `alloy:"app_include,attr,optional"` + SiteExclude string `alloy:"site_exclude,attr,optional"` + SiteInclude string `alloy:"site_include,attr,optional"` } // Convert converts the component's IISConfig to the integration's IISConfig. @@ -99,7 +99,7 @@ func (t IISConfig) Convert() windows_integration.IISConfig { // TextFileConfig handles settings for the windows_exporter Text File collector type TextFileConfig struct { - TextFileDirectory string `river:"text_file_directory,attr,optional"` + TextFileDirectory string `alloy:"text_file_directory,attr,optional"` } // Convert converts the component's TextFileConfig to the integration's TextFileConfig. @@ -111,10 +111,10 @@ func (t TextFileConfig) Convert() windows_integration.TextFileConfig { // SMTPConfig handles settings for the windows_exporter SMTP collector type SMTPConfig struct { - BlackList string `river:"blacklist,attr,optional"` - WhiteList string `river:"whitelist,attr,optional"` - Exclude string `river:"exclude,attr,optional"` - Include string `river:"include,attr,optional"` + BlackList string `alloy:"blacklist,attr,optional"` + WhiteList string `alloy:"whitelist,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` + Include string `alloy:"include,attr,optional"` } // Convert converts the component's SMTPConfig to the integration's SMTPConfig. @@ -129,8 +129,8 @@ func (t SMTPConfig) Convert() windows_integration.SMTPConfig { // ServiceConfig handles settings for the windows_exporter service collector type ServiceConfig struct { - UseApi string `river:"use_api,attr,optional"` - Where string `river:"where_clause,attr,optional"` + UseApi string `alloy:"use_api,attr,optional"` + Where string `alloy:"where_clause,attr,optional"` } // Convert converts the component's ServiceConfig to the integration's ServiceConfig. @@ -143,10 +143,10 @@ func (t ServiceConfig) Convert() windows_integration.ServiceConfig { // ProcessConfig handles settings for the windows_exporter process collector type ProcessConfig struct { - BlackList string `river:"blacklist,attr,optional"` - WhiteList string `river:"whitelist,attr,optional"` - Exclude string `river:"exclude,attr,optional"` - Include string `river:"include,attr,optional"` + BlackList string `alloy:"blacklist,attr,optional"` + WhiteList string `alloy:"whitelist,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` + Include string `alloy:"include,attr,optional"` } // Convert converts the component's ProcessConfig to the integration's ProcessConfig. @@ -161,8 +161,8 @@ func (t ProcessConfig) Convert() windows_integration.ProcessConfig { // ScheduledTaskConfig handles settings for the windows_exporter process collector type ScheduledTaskConfig struct { - Exclude string `river:"exclude,attr,optional"` - Include string `river:"include,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` + Include string `alloy:"include,attr,optional"` } // Convert converts the component's ScheduledTaskConfig to the integration's ScheduledTaskConfig. @@ -175,10 +175,10 @@ func (t ScheduledTaskConfig) Convert() windows_integration.ScheduledTaskConfig { // NetworkConfig handles settings for the windows_exporter network collector type NetworkConfig struct { - BlackList string `river:"blacklist,attr,optional"` - WhiteList string `river:"whitelist,attr,optional"` - Exclude string `river:"exclude,attr,optional"` - Include string `river:"include,attr,optional"` + BlackList string `alloy:"blacklist,attr,optional"` + WhiteList string `alloy:"whitelist,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` + Include string `alloy:"include,attr,optional"` } // Convert converts the component's NetworkConfig to the integration's NetworkConfig. @@ -193,7 +193,7 @@ func (t NetworkConfig) Convert() windows_integration.NetworkConfig { // MSSQLConfig handles settings for the windows_exporter SQL server collector type MSSQLConfig struct { - EnabledClasses []string `river:"enabled_classes,attr,optional"` + EnabledClasses []string `alloy:"enabled_classes,attr,optional"` } // Convert converts the component's MSSQLConfig to the integration's MSSQLConfig. @@ -205,7 +205,7 @@ func (t MSSQLConfig) Convert() windows_integration.MSSQLConfig { // MSMQConfig handles settings for the windows_exporter MSMQ collector type MSMQConfig struct { - Where string `river:"where_clause,attr,optional"` + Where string `alloy:"where_clause,attr,optional"` } // Convert converts the component's MSMQConfig to the integration's MSMQConfig. @@ -217,10 +217,10 @@ func (t MSMQConfig) Convert() windows_integration.MSMQConfig { // LogicalDiskConfig handles settings for the windows_exporter logical disk collector type LogicalDiskConfig struct { - BlackList string `river:"blacklist,attr,optional"` - WhiteList string `river:"whitelist,attr,optional"` - Include string `river:"include,attr,optional"` - Exclude string `river:"exclude,attr,optional"` + BlackList string `alloy:"blacklist,attr,optional"` + WhiteList string `alloy:"whitelist,attr,optional"` + Include string `alloy:"include,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` } // Convert converts the component's LogicalDiskConfig to the integration's LogicalDiskConfig. @@ -235,8 +235,8 @@ func (t LogicalDiskConfig) Convert() windows_integration.LogicalDiskConfig { // PhysicalDiskConfig handles settings for the windows_exporter physical disk collector type PhysicalDiskConfig struct { - Include string `river:"include,attr,optional"` - Exclude string `river:"exclude,attr,optional"` + Include string `alloy:"include,attr,optional"` + Exclude string `alloy:"exclude,attr,optional"` } // Convert converts the component's PhysicalDiskConfig to the integration's PhysicalDiskConfig. diff --git a/internal/component/prometheus/operator/types.go b/internal/component/prometheus/operator/types.go index eefd8ab7c8..7f06f2f040 100644 --- a/internal/component/prometheus/operator/types.go +++ b/internal/component/prometheus/operator/types.go @@ -17,30 +17,30 @@ import ( type Arguments struct { // Client settings to connect to Kubernetes. - Client kubernetes.ClientArguments `river:"client,block,optional"` + Client kubernetes.ClientArguments `alloy:"client,block,optional"` - ForwardTo []storage.Appendable `river:"forward_to,attr"` + ForwardTo []storage.Appendable `alloy:"forward_to,attr"` // Namespaces to search for monitor resources. Empty implies All namespaces - Namespaces []string `river:"namespaces,attr,optional"` + Namespaces []string `alloy:"namespaces,attr,optional"` // LabelSelector allows filtering discovered monitor resources by labels - LabelSelector *config.LabelSelector `river:"selector,block,optional"` + LabelSelector *config.LabelSelector `alloy:"selector,block,optional"` - Clustering cluster.ComponentBlock `river:"clustering,block,optional"` + Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"` - RelabelConfigs []*flow_relabel.Config `river:"rule,block,optional"` + RelabelConfigs []*flow_relabel.Config `alloy:"rule,block,optional"` - Scrape ScrapeOptions `river:"scrape,block,optional"` + Scrape ScrapeOptions `alloy:"scrape,block,optional"` } // ScrapeOptions holds values that configure scraping behavior. type ScrapeOptions struct { // DefaultScrapeInterval is the default interval to scrape targets. - DefaultScrapeInterval time.Duration `river:"default_scrape_interval,attr,optional"` + DefaultScrapeInterval time.Duration `alloy:"default_scrape_interval,attr,optional"` // DefaultScrapeTimeout is the default timeout to scrape targets. - DefaultScrapeTimeout time.Duration `river:"default_scrape_timeout,attr,optional"` + DefaultScrapeTimeout time.Duration `alloy:"default_scrape_timeout,attr,optional"` } func (s *ScrapeOptions) GlobalConfig() promconfig.GlobalConfig { @@ -70,14 +70,14 @@ func (args *Arguments) Validate() error { } type DebugInfo struct { - DiscoveredCRDs []*DiscoveredResource `river:"crds,block"` - Targets []scrape.TargetStatus `river:"targets,block,optional"` + DiscoveredCRDs []*DiscoveredResource `alloy:"crds,block"` + Targets []scrape.TargetStatus `alloy:"targets,block,optional"` } type DiscoveredResource struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - LastReconcile time.Time `river:"last_reconcile,attr,optional"` - ReconcileError string `river:"reconcile_error,attr,optional"` - ScrapeConfigsURL string `river:"scrape_configs_url,attr,optional"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + LastReconcile time.Time `alloy:"last_reconcile,attr,optional"` + ReconcileError string `alloy:"reconcile_error,attr,optional"` + ScrapeConfigsURL string `alloy:"scrape_configs_url,attr,optional"` } diff --git a/internal/component/prometheus/receive_http/receive_http.go b/internal/component/prometheus/receive_http/receive_http.go index 1a4b6be4b5..54200481bd 100644 --- a/internal/component/prometheus/receive_http/receive_http.go +++ b/internal/component/prometheus/receive_http/receive_http.go @@ -33,8 +33,8 @@ func init() { } type Arguments struct { - Server *fnet.ServerConfig `river:",squash"` - ForwardTo []storage.Appendable `river:"forward_to,attr"` + Server *fnet.ServerConfig `alloy:",squash"` + ForwardTo []storage.Appendable `alloy:"forward_to,attr"` } // SetToDefault implements river.Defaulter. diff --git a/internal/component/prometheus/relabel/relabel.go b/internal/component/prometheus/relabel/relabel.go index 459de792f2..0a4a81510c 100644 --- a/internal/component/prometheus/relabel/relabel.go +++ b/internal/component/prometheus/relabel/relabel.go @@ -39,13 +39,13 @@ func init() { // component. type Arguments struct { // Where the relabelled metrics should be forwarded to. - ForwardTo []storage.Appendable `river:"forward_to,attr"` + ForwardTo []storage.Appendable `alloy:"forward_to,attr"` // The relabelling rules to apply to each metric before it's forwarded. - MetricRelabelConfigs []*flow_relabel.Config `river:"rule,block,optional"` + MetricRelabelConfigs []*flow_relabel.Config `alloy:"rule,block,optional"` // Cache size to use for LRU cache. - CacheSize int `river:"max_cache_size,attr,optional"` + CacheSize int `alloy:"max_cache_size,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -65,8 +65,8 @@ func (arg *Arguments) Validate() error { // Exports holds values which are exported by the prometheus.relabel component. type Exports struct { - Receiver storage.Appendable `river:"receiver,attr"` - Rules flow_relabel.Rules `river:"rules,attr"` + Receiver storage.Appendable `alloy:"receiver,attr"` + Rules flow_relabel.Rules `alloy:"rules,attr"` } // Component implements the prometheus.relabel component. diff --git a/internal/component/prometheus/remotewrite/types.go b/internal/component/prometheus/remotewrite/types.go index 79b1649e2d..f678e0ca51 100644 --- a/internal/component/prometheus/remotewrite/types.go +++ b/internal/component/prometheus/remotewrite/types.go @@ -54,9 +54,9 @@ var ( // Arguments represents the input state of the prometheus.remote_write // component. type Arguments struct { - ExternalLabels map[string]string `river:"external_labels,attr,optional"` - Endpoints []*EndpointOptions `river:"endpoint,block,optional"` - WALOptions WALOptions `river:"wal,block,optional"` + ExternalLabels map[string]string `alloy:"external_labels,attr,optional"` + Endpoints []*EndpointOptions `alloy:"endpoint,block,optional"` + WALOptions WALOptions `alloy:"wal,block,optional"` } // SetToDefault implements river.Defaulter. @@ -67,18 +67,18 @@ func (rc *Arguments) SetToDefault() { // EndpointOptions describes an individual location for where metrics in the WAL // should be delivered to using the remote_write protocol. type EndpointOptions struct { - Name string `river:"name,attr,optional"` - URL string `river:"url,attr"` - RemoteTimeout time.Duration `river:"remote_timeout,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - SendExemplars bool `river:"send_exemplars,attr,optional"` - SendNativeHistograms bool `river:"send_native_histograms,attr,optional"` - HTTPClientConfig *types.HTTPClientConfig `river:",squash"` - QueueOptions *QueueOptions `river:"queue_config,block,optional"` - MetadataOptions *MetadataOptions `river:"metadata_config,block,optional"` - WriteRelabelConfigs []*flow_relabel.Config `river:"write_relabel_config,block,optional"` - SigV4 *SigV4Config `river:"sigv4,block,optional"` - AzureAD *AzureADConfig `river:"azuread,block,optional"` + Name string `alloy:"name,attr,optional"` + URL string `alloy:"url,attr"` + RemoteTimeout time.Duration `alloy:"remote_timeout,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + SendExemplars bool `alloy:"send_exemplars,attr,optional"` + SendNativeHistograms bool `alloy:"send_native_histograms,attr,optional"` + HTTPClientConfig *types.HTTPClientConfig `alloy:",squash"` + QueueOptions *QueueOptions `alloy:"queue_config,block,optional"` + MetadataOptions *MetadataOptions `alloy:"metadata_config,block,optional"` + WriteRelabelConfigs []*flow_relabel.Config `alloy:"write_relabel_config,block,optional"` + SigV4 *SigV4Config `alloy:"sigv4,block,optional"` + AzureAD *AzureADConfig `alloy:"azuread,block,optional"` } // SetToDefault implements river.Defaulter. @@ -134,15 +134,15 @@ func (r *EndpointOptions) Validate() error { // QueueOptions handles the low level queue config options for a remote_write type QueueOptions struct { - Capacity int `river:"capacity,attr,optional"` - MaxShards int `river:"max_shards,attr,optional"` - MinShards int `river:"min_shards,attr,optional"` - MaxSamplesPerSend int `river:"max_samples_per_send,attr,optional"` - BatchSendDeadline time.Duration `river:"batch_send_deadline,attr,optional"` - MinBackoff time.Duration `river:"min_backoff,attr,optional"` - MaxBackoff time.Duration `river:"max_backoff,attr,optional"` - RetryOnHTTP429 bool `river:"retry_on_http_429,attr,optional"` - SampleAgeLimit time.Duration `river:"sample_age_limit,attr,optional"` + Capacity int `alloy:"capacity,attr,optional"` + MaxShards int `alloy:"max_shards,attr,optional"` + MinShards int `alloy:"min_shards,attr,optional"` + MaxSamplesPerSend int `alloy:"max_samples_per_send,attr,optional"` + BatchSendDeadline time.Duration `alloy:"batch_send_deadline,attr,optional"` + MinBackoff time.Duration `alloy:"min_backoff,attr,optional"` + MaxBackoff time.Duration `alloy:"max_backoff,attr,optional"` + RetryOnHTTP429 bool `alloy:"retry_on_http_429,attr,optional"` + SampleAgeLimit time.Duration `alloy:"sample_age_limit,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -173,9 +173,9 @@ func (r *QueueOptions) toPrometheusType() config.QueueConfig { // MetadataOptions configures how metadata gets sent over the remote_write // protocol. type MetadataOptions struct { - Send bool `river:"send,attr,optional"` - SendInterval time.Duration `river:"send_interval,attr,optional"` - MaxSamplesPerSend int `river:"max_samples_per_send,attr,optional"` + Send bool `alloy:"send,attr,optional"` + SendInterval time.Duration `alloy:"send_interval,attr,optional"` + MaxSamplesPerSend int `alloy:"max_samples_per_send,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -199,9 +199,9 @@ func (o *MetadataOptions) toPrometheusType() config.MetadataConfig { // WALOptions configures behavior within the WAL. type WALOptions struct { - TruncateFrequency time.Duration `river:"truncate_frequency,attr,optional"` - MinKeepaliveTime time.Duration `river:"min_keepalive_time,attr,optional"` - MaxKeepaliveTime time.Duration `river:"max_keepalive_time,attr,optional"` + TruncateFrequency time.Duration `alloy:"truncate_frequency,attr,optional"` + MinKeepaliveTime time.Duration `alloy:"min_keepalive_time,attr,optional"` + MaxKeepaliveTime time.Duration `alloy:"max_keepalive_time,attr,optional"` } // SetToDefault implements river.Defaulter. @@ -224,7 +224,7 @@ func (o *WALOptions) Validate() error { // Exports are the set of fields exposed by the prometheus.remote_write // component. type Exports struct { - Receiver storage.Appendable `river:"receiver,attr"` + Receiver storage.Appendable `alloy:"receiver,attr"` } func convertConfigs(cfg Arguments) (*config.Config, error) { @@ -271,7 +271,7 @@ func toLabels(in map[string]string) labels.Labels { // ManagedIdentityConfig is used to store managed identity config values type ManagedIdentityConfig struct { // ClientID is the clientId of the managed identity that is being used to authenticate. - ClientID string `river:"client_id,attr"` + ClientID string `alloy:"client_id,attr"` } func (m ManagedIdentityConfig) toPrometheusType() azuread.ManagedIdentityConfig { @@ -282,10 +282,10 @@ func (m ManagedIdentityConfig) toPrometheusType() azuread.ManagedIdentityConfig type AzureADConfig struct { // ManagedIdentity is the managed identity that is being used to authenticate. - ManagedIdentity ManagedIdentityConfig `river:"managed_identity,block"` + ManagedIdentity ManagedIdentityConfig `alloy:"managed_identity,block"` // Cloud is the Azure cloud in which the service is running. Example: AzurePublic/AzureGovernment/AzureChina. - Cloud string `river:"cloud,attr,optional"` + Cloud string `alloy:"cloud,attr,optional"` } func (a *AzureADConfig) Validate() error { @@ -321,11 +321,11 @@ func (a *AzureADConfig) toPrometheusType() *azuread.AzureADConfig { } type SigV4Config struct { - Region string `river:"region,attr,optional"` - AccessKey string `river:"access_key,attr,optional"` - SecretKey alloytypes.Secret `river:"secret_key,attr,optional"` - Profile string `river:"profile,attr,optional"` - RoleARN string `river:"role_arn,attr,optional"` + Region string `alloy:"region,attr,optional"` + AccessKey string `alloy:"access_key,attr,optional"` + SecretKey alloytypes.Secret `alloy:"secret_key,attr,optional"` + Profile string `alloy:"profile,attr,optional"` + RoleARN string `alloy:"role_arn,attr,optional"` } func (s *SigV4Config) Validate() error { diff --git a/internal/component/prometheus/scrape/scrape.go b/internal/component/prometheus/scrape/scrape.go index e87dc5e108..31ea701251 100644 --- a/internal/component/prometheus/scrape/scrape.go +++ b/internal/component/prometheus/scrape/scrape.go @@ -44,55 +44,55 @@ func init() { // Arguments holds values which are used to configure the prometheus.scrape // component. type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []storage.Appendable `river:"forward_to,attr"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []storage.Appendable `alloy:"forward_to,attr"` // The job name to override the job label with. - JobName string `river:"job_name,attr,optional"` + JobName string `alloy:"job_name,attr,optional"` // Indicator whether the scraped metrics should remain unmodified. - HonorLabels bool `river:"honor_labels,attr,optional"` + HonorLabels bool `alloy:"honor_labels,attr,optional"` // Indicator whether the scraped timestamps should be respected. - HonorTimestamps bool `river:"honor_timestamps,attr,optional"` + HonorTimestamps bool `alloy:"honor_timestamps,attr,optional"` // Indicator whether to track the staleness of the scraped timestamps. - TrackTimestampsStaleness bool `river:"track_timestamps_staleness,attr,optional"` + TrackTimestampsStaleness bool `alloy:"track_timestamps_staleness,attr,optional"` // A set of query parameters with which the target is scraped. - Params url.Values `river:"params,attr,optional"` + Params url.Values `alloy:"params,attr,optional"` // Whether to scrape a classic histogram that is also exposed as a native histogram. - ScrapeClassicHistograms bool `river:"scrape_classic_histograms,attr,optional"` + ScrapeClassicHistograms bool `alloy:"scrape_classic_histograms,attr,optional"` // How frequently to scrape the targets of this scrape config. - ScrapeInterval time.Duration `river:"scrape_interval,attr,optional"` + ScrapeInterval time.Duration `alloy:"scrape_interval,attr,optional"` // The timeout for scraping targets of this config. - ScrapeTimeout time.Duration `river:"scrape_timeout,attr,optional"` + ScrapeTimeout time.Duration `alloy:"scrape_timeout,attr,optional"` // The HTTP resource path on which to fetch metrics from targets. - MetricsPath string `river:"metrics_path,attr,optional"` + MetricsPath string `alloy:"metrics_path,attr,optional"` // The URL scheme with which to fetch metrics from targets. - Scheme string `river:"scheme,attr,optional"` + Scheme string `alloy:"scheme,attr,optional"` // An uncompressed response body larger than this many bytes will cause the // scrape to fail. 0 means no limit. - BodySizeLimit units.Base2Bytes `river:"body_size_limit,attr,optional"` + BodySizeLimit units.Base2Bytes `alloy:"body_size_limit,attr,optional"` // More than this many samples post metric-relabeling will cause the scrape // to fail. - SampleLimit uint `river:"sample_limit,attr,optional"` + SampleLimit uint `alloy:"sample_limit,attr,optional"` // More than this many targets after the target relabeling will cause the // scrapes to fail. - TargetLimit uint `river:"target_limit,attr,optional"` + TargetLimit uint `alloy:"target_limit,attr,optional"` // More than this many labels post metric-relabeling will cause the scrape // to fail. - LabelLimit uint `river:"label_limit,attr,optional"` + LabelLimit uint `alloy:"label_limit,attr,optional"` // More than this label name length post metric-relabeling will cause the // scrape to fail. - LabelNameLengthLimit uint `river:"label_name_length_limit,attr,optional"` + LabelNameLengthLimit uint `alloy:"label_name_length_limit,attr,optional"` // More than this label value length post metric-relabeling will cause the // scrape to fail. - LabelValueLengthLimit uint `river:"label_value_length_limit,attr,optional"` + LabelValueLengthLimit uint `alloy:"label_value_length_limit,attr,optional"` - HTTPClientConfig component_config.HTTPClientConfig `river:",squash"` + HTTPClientConfig component_config.HTTPClientConfig `alloy:",squash"` // Scrape Options - ExtraMetrics bool `river:"extra_metrics,attr,optional"` - EnableProtobufNegotiation bool `river:"enable_protobuf_negotiation,attr,optional"` + ExtraMetrics bool `alloy:"extra_metrics,attr,optional"` + EnableProtobufNegotiation bool `alloy:"enable_protobuf_negotiation,attr,optional"` - Clustering cluster.ComponentBlock `river:"clustering,block,optional"` + Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"` } // SetToDefault implements river.Defaulter. @@ -327,18 +327,18 @@ func (c *Component) distTargets( // ScraperStatus reports the status of the scraper's jobs. type ScraperStatus struct { - TargetStatus []TargetStatus `river:"target,block,optional"` + TargetStatus []TargetStatus `alloy:"target,block,optional"` } // TargetStatus reports on the status of the latest scrape for a target. type TargetStatus struct { - JobName string `river:"job,attr"` - URL string `river:"url,attr"` - Health string `river:"health,attr"` - Labels map[string]string `river:"labels,attr"` - LastError string `river:"last_error,attr,optional"` - LastScrape time.Time `river:"last_scrape,attr"` - LastScrapeDuration time.Duration `river:"last_scrape_duration,attr,optional"` + JobName string `alloy:"job,attr"` + URL string `alloy:"url,attr"` + Health string `alloy:"health,attr"` + Labels map[string]string `alloy:"labels,attr"` + LastError string `alloy:"last_error,attr,optional"` + LastScrape time.Time `alloy:"last_scrape,attr"` + LastScrapeDuration time.Duration `alloy:"last_scrape_duration,attr,optional"` } // BuildTargetStatuses transforms the targets from a scrape manager into our internal status type for debug info. diff --git a/internal/component/pyroscope/ebpf/args.go b/internal/component/pyroscope/ebpf/args.go index f2620fedd4..808a121d82 100644 --- a/internal/component/pyroscope/ebpf/args.go +++ b/internal/component/pyroscope/ebpf/args.go @@ -8,17 +8,17 @@ import ( ) type Arguments struct { - ForwardTo []pyroscope.Appendable `river:"forward_to,attr"` - Targets []discovery.Target `river:"targets,attr,optional"` - CollectInterval time.Duration `river:"collect_interval,attr,optional"` - SampleRate int `river:"sample_rate,attr,optional"` - PidCacheSize int `river:"pid_cache_size,attr,optional"` - BuildIDCacheSize int `river:"build_id_cache_size,attr,optional"` - SameFileCacheSize int `river:"same_file_cache_size,attr,optional"` - ContainerIDCacheSize int `river:"container_id_cache_size,attr,optional"` - CacheRounds int `river:"cache_rounds,attr,optional"` - CollectUserProfile bool `river:"collect_user_profile,attr,optional"` - CollectKernelProfile bool `river:"collect_kernel_profile,attr,optional"` - Demangle string `river:"demangle,attr,optional"` - PythonEnabled bool `river:"python_enabled,attr,optional"` + ForwardTo []pyroscope.Appendable `alloy:"forward_to,attr"` + Targets []discovery.Target `alloy:"targets,attr,optional"` + CollectInterval time.Duration `alloy:"collect_interval,attr,optional"` + SampleRate int `alloy:"sample_rate,attr,optional"` + PidCacheSize int `alloy:"pid_cache_size,attr,optional"` + BuildIDCacheSize int `alloy:"build_id_cache_size,attr,optional"` + SameFileCacheSize int `alloy:"same_file_cache_size,attr,optional"` + ContainerIDCacheSize int `alloy:"container_id_cache_size,attr,optional"` + CacheRounds int `alloy:"cache_rounds,attr,optional"` + CollectUserProfile bool `alloy:"collect_user_profile,attr,optional"` + CollectKernelProfile bool `alloy:"collect_kernel_profile,attr,optional"` + Demangle string `alloy:"demangle,attr,optional"` + PythonEnabled bool `alloy:"python_enabled,attr,optional"` } diff --git a/internal/component/pyroscope/ebpf/ebpf_linux.go b/internal/component/pyroscope/ebpf/ebpf_linux.go index 41f48431f5..7416ee8854 100644 --- a/internal/component/pyroscope/ebpf/ebpf_linux.go +++ b/internal/component/pyroscope/ebpf/ebpf_linux.go @@ -200,8 +200,8 @@ func (c *Component) collectProfiles() error { } type DebugInfo struct { - Targets interface{} `river:"targets,attr,optional"` - Session interface{} `river:"session,attr,optional"` + Targets interface{} `alloy:"targets,attr,optional"` + Session interface{} `alloy:"session,attr,optional"` } func (c *Component) updateDebugInfo() { diff --git a/internal/component/pyroscope/java/args.go b/internal/component/pyroscope/java/args.go index 0eba7ff2df..b6529ef368 100644 --- a/internal/component/pyroscope/java/args.go +++ b/internal/component/pyroscope/java/args.go @@ -8,19 +8,19 @@ import ( ) type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []pyroscope.Appendable `river:"forward_to,attr"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []pyroscope.Appendable `alloy:"forward_to,attr"` - TmpDir string `river:"tmp_dir,attr,optional"` - ProfilingConfig ProfilingConfig `river:"profiling_config,block,optional"` + TmpDir string `alloy:"tmp_dir,attr,optional"` + ProfilingConfig ProfilingConfig `alloy:"profiling_config,block,optional"` } type ProfilingConfig struct { - Interval time.Duration `river:"interval,attr,optional"` - SampleRate int `river:"sample_rate,attr,optional"` - Alloc string `river:"alloc,attr,optional"` - Lock string `river:"lock,attr,optional"` - CPU bool `river:"cpu,attr,optional"` + Interval time.Duration `alloy:"interval,attr,optional"` + SampleRate int `alloy:"sample_rate,attr,optional"` + Alloc string `alloy:"alloc,attr,optional"` + Lock string `alloy:"lock,attr,optional"` + CPU bool `alloy:"cpu,attr,optional"` } func (rc *Arguments) UnmarshalRiver(f func(interface{}) error) error { diff --git a/internal/component/pyroscope/scrape/scrape.go b/internal/component/pyroscope/scrape/scrape.go index dbb25884b7..9507eced24 100644 --- a/internal/component/pyroscope/scrape/scrape.go +++ b/internal/component/pyroscope/scrape/scrape.go @@ -47,57 +47,57 @@ func init() { // Arguments holds values which are used to configure the pprof.scrape // component. type Arguments struct { - Targets []discovery.Target `river:"targets,attr"` - ForwardTo []pyroscope.Appendable `river:"forward_to,attr"` + Targets []discovery.Target `alloy:"targets,attr"` + ForwardTo []pyroscope.Appendable `alloy:"forward_to,attr"` // The job name to override the job label with. - JobName string `river:"job_name,attr,optional"` + JobName string `alloy:"job_name,attr,optional"` // A set of query parameters with which the target is scraped. - Params url.Values `river:"params,attr,optional"` + Params url.Values `alloy:"params,attr,optional"` // How frequently to scrape the targets of this scrape config. - ScrapeInterval time.Duration `river:"scrape_interval,attr,optional"` + ScrapeInterval time.Duration `alloy:"scrape_interval,attr,optional"` // The timeout for scraping targets of this config. - ScrapeTimeout time.Duration `river:"scrape_timeout,attr,optional"` + ScrapeTimeout time.Duration `alloy:"scrape_timeout,attr,optional"` // The URL scheme with which to fetch metrics from targets. - Scheme string `river:"scheme,attr,optional"` + Scheme string `alloy:"scheme,attr,optional"` // todo(ctovena): add support for limits. // // An uncompressed response body larger than this many bytes will cause the // // scrape to fail. 0 means no limit. - // BodySizeLimit units.Base2Bytes `river:"body_size_limit,attr,optional"` + // BodySizeLimit units.Base2Bytes `alloy:"body_size_limit,attr,optional"` // // More than this many targets after the target relabeling will cause the // // scrapes to fail. - // TargetLimit uint `river:"target_limit,attr,optional"` + // TargetLimit uint `alloy:"target_limit,attr,optional"` // // More than this many labels post metric-relabeling will cause the scrape // // to fail. - // LabelLimit uint `river:"label_limit,attr,optional"` + // LabelLimit uint `alloy:"label_limit,attr,optional"` // // More than this label name length post metric-relabeling will cause the // // scrape to fail. - // LabelNameLengthLimit uint `river:"label_name_length_limit,attr,optional"` + // LabelNameLengthLimit uint `alloy:"label_name_length_limit,attr,optional"` // // More than this label value length post metric-relabeling will cause the // // scrape to fail. - // LabelValueLengthLimit uint `river:"label_value_length_limit,attr,optional"` + // LabelValueLengthLimit uint `alloy:"label_value_length_limit,attr,optional"` - HTTPClientConfig component_config.HTTPClientConfig `river:",squash"` + HTTPClientConfig component_config.HTTPClientConfig `alloy:",squash"` - ProfilingConfig ProfilingConfig `river:"profiling_config,block,optional"` + ProfilingConfig ProfilingConfig `alloy:"profiling_config,block,optional"` - Clustering cluster.ComponentBlock `river:"clustering,block,optional"` + Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"` } type ProfilingConfig struct { - Memory ProfilingTarget `river:"profile.memory,block,optional"` - Block ProfilingTarget `river:"profile.block,block,optional"` - Goroutine ProfilingTarget `river:"profile.goroutine,block,optional"` - Mutex ProfilingTarget `river:"profile.mutex,block,optional"` - ProcessCPU ProfilingTarget `river:"profile.process_cpu,block,optional"` - FGProf ProfilingTarget `river:"profile.fgprof,block,optional"` - GoDeltaProfMemory ProfilingTarget `river:"profile.godeltaprof_memory,block,optional"` - GoDeltaProfMutex ProfilingTarget `river:"profile.godeltaprof_mutex,block,optional"` - GoDeltaProfBlock ProfilingTarget `river:"profile.godeltaprof_block,block,optional"` - Custom []CustomProfilingTarget `river:"profile.custom,block,optional"` - - PprofPrefix string `river:"path_prefix,attr,optional"` + Memory ProfilingTarget `alloy:"profile.memory,block,optional"` + Block ProfilingTarget `alloy:"profile.block,block,optional"` + Goroutine ProfilingTarget `alloy:"profile.goroutine,block,optional"` + Mutex ProfilingTarget `alloy:"profile.mutex,block,optional"` + ProcessCPU ProfilingTarget `alloy:"profile.process_cpu,block,optional"` + FGProf ProfilingTarget `alloy:"profile.fgprof,block,optional"` + GoDeltaProfMemory ProfilingTarget `alloy:"profile.godeltaprof_memory,block,optional"` + GoDeltaProfMutex ProfilingTarget `alloy:"profile.godeltaprof_mutex,block,optional"` + GoDeltaProfBlock ProfilingTarget `alloy:"profile.godeltaprof_block,block,optional"` + Custom []CustomProfilingTarget `alloy:"profile.custom,block,optional"` + + PprofPrefix string `alloy:"path_prefix,attr,optional"` } // AllTargets returns the set of all standard and custom profiling targets, @@ -175,16 +175,16 @@ func (cfg *ProfilingConfig) SetToDefault() { } type ProfilingTarget struct { - Enabled bool `river:"enabled,attr,optional"` - Path string `river:"path,attr,optional"` - Delta bool `river:"delta,attr,optional"` + Enabled bool `alloy:"enabled,attr,optional"` + Path string `alloy:"path,attr,optional"` + Delta bool `alloy:"delta,attr,optional"` } type CustomProfilingTarget struct { - Enabled bool `river:"enabled,attr"` - Path string `river:"path,attr"` - Delta bool `river:"delta,attr,optional"` - Name string `river:",label"` + Enabled bool `alloy:"enabled,attr"` + Path string `alloy:"path,attr"` + Delta bool `alloy:"delta,attr,optional"` + Name string `alloy:",label"` } var DefaultArguments = NewDefaultArguments() diff --git a/internal/component/pyroscope/write/write.go b/internal/component/pyroscope/write/write.go index d50cec9bd1..7ecd1b20fe 100644 --- a/internal/component/pyroscope/write/write.go +++ b/internal/component/pyroscope/write/write.go @@ -49,8 +49,8 @@ func init() { // Arguments represents the input state of the pyroscope.write // component. type Arguments struct { - ExternalLabels map[string]string `river:"external_labels,attr,optional"` - Endpoints []*EndpointOptions `river:"endpoint,block,optional"` + ExternalLabels map[string]string `alloy:"external_labels,attr,optional"` + Endpoints []*EndpointOptions `alloy:"endpoint,block,optional"` } // SetToDefault implements river.Defaulter. @@ -61,14 +61,14 @@ func (rc *Arguments) SetToDefault() { // EndpointOptions describes an individual location for where profiles // should be delivered to using the Pyroscope push API. type EndpointOptions struct { - Name string `river:"name,attr,optional"` - URL string `river:"url,attr"` - RemoteTimeout time.Duration `river:"remote_timeout,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - HTTPClientConfig *config.HTTPClientConfig `river:",squash"` - MinBackoff time.Duration `river:"min_backoff_period,attr,optional"` // start backoff at this level - MaxBackoff time.Duration `river:"max_backoff_period,attr,optional"` // increase exponentially to this level - MaxBackoffRetries int `river:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries + Name string `alloy:"name,attr,optional"` + URL string `alloy:"url,attr"` + RemoteTimeout time.Duration `alloy:"remote_timeout,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + HTTPClientConfig *config.HTTPClientConfig `alloy:",squash"` + MinBackoff time.Duration `alloy:"min_backoff_period,attr,optional"` // start backoff at this level + MaxBackoff time.Duration `alloy:"max_backoff_period,attr,optional"` // increase exponentially to this level + MaxBackoffRetries int `alloy:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries } func GetDefaultEndpointOptions() EndpointOptions { @@ -107,7 +107,7 @@ type Component struct { // Exports are the set of fields exposed by the pyroscope.write component. type Exports struct { - Receiver pyroscope.Appendable `river:"receiver,attr"` + Receiver pyroscope.Appendable `alloy:"receiver,attr"` } // New creates a new pyroscope.write component. diff --git a/internal/component/remote/http/http.go b/internal/component/remote/http/http.go index 2085f054fc..3f9669bbc8 100644 --- a/internal/component/remote/http/http.go +++ b/internal/component/remote/http/http.go @@ -36,16 +36,16 @@ func init() { // Arguments control the remote.http component. type Arguments struct { - URL string `river:"url,attr"` - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` - PollTimeout time.Duration `river:"poll_timeout,attr,optional"` - IsSecret bool `river:"is_secret,attr,optional"` + URL string `alloy:"url,attr"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` + PollTimeout time.Duration `alloy:"poll_timeout,attr,optional"` + IsSecret bool `alloy:"is_secret,attr,optional"` - Method string `river:"method,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - Body string `river:"body,attr,optional"` + Method string `alloy:"method,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + Body string `alloy:"body,attr,optional"` - Client common_config.HTTPClientConfig `river:"client,block,optional"` + Client common_config.HTTPClientConfig `alloy:"client,block,optional"` } // DefaultArguments holds default settings for Arguments. @@ -82,7 +82,7 @@ func (args *Arguments) Validate() error { // Exports holds settings exported by remote.http. type Exports struct { - Content alloytypes.OptionalSecret `river:"content,attr"` + Content alloytypes.OptionalSecret `alloy:"content,attr"` } // Component implements the remote.http component. diff --git a/internal/component/remote/kubernetes/kubernetes.go b/internal/component/remote/kubernetes/kubernetes.go index 42761a02fc..251cc2d9ae 100644 --- a/internal/component/remote/kubernetes/kubernetes.go +++ b/internal/component/remote/kubernetes/kubernetes.go @@ -27,13 +27,13 @@ const ( // Arguments control the component. type Arguments struct { - Namespace string `river:"namespace,attr"` - Name string `river:"name,attr"` - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` - PollTimeout time.Duration `river:"poll_timeout,attr,optional"` + Namespace string `alloy:"namespace,attr"` + Name string `alloy:"name,attr"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` + PollTimeout time.Duration `alloy:"poll_timeout,attr,optional"` // Client settings to connect to Kubernetes. - Client kubernetes.ClientArguments `river:"client,block,optional"` + Client kubernetes.ClientArguments `alloy:"client,block,optional"` } // DefaultArguments holds default settings for Arguments. @@ -60,7 +60,7 @@ func (args *Arguments) Validate() error { // Exports holds settings exported by this component. type Exports struct { - Data map[string]alloytypes.OptionalSecret `river:"data,attr"` + Data map[string]alloytypes.OptionalSecret `alloy:"data,attr"` } // Component implements the remote.kubernetes.* component. diff --git a/internal/component/remote/s3/types.go b/internal/component/remote/s3/types.go index 2722e772af..5e64ee55fd 100644 --- a/internal/component/remote/s3/types.go +++ b/internal/component/remote/s3/types.go @@ -9,25 +9,25 @@ import ( // Arguments implements the input for the S3 component. type Arguments struct { - Path string `river:"path,attr"` + Path string `alloy:"path,attr"` // PollFrequency determines the frequency to check for changes // defaults to 10m. - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` // IsSecret determines if the content should be displayed to the user. - IsSecret bool `river:"is_secret,attr,optional"` + IsSecret bool `alloy:"is_secret,attr,optional"` // Options allows the overriding of default settings. - Options Client `river:"client,block,optional"` + Options Client `alloy:"client,block,optional"` } // Client implements specific AWS configuration options type Client struct { - AccessKey string `river:"key,attr,optional"` - Secret alloytypes.Secret `river:"secret,attr,optional"` - Endpoint string `river:"endpoint,attr,optional"` - DisableSSL bool `river:"disable_ssl,attr,optional"` - UsePathStyle bool `river:"use_path_style,attr,optional"` - Region string `river:"region,attr,optional"` - SigningRegion string `river:"signing_region,attr,optional"` + AccessKey string `alloy:"key,attr,optional"` + Secret alloytypes.Secret `alloy:"secret,attr,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` + DisableSSL bool `alloy:"disable_ssl,attr,optional"` + UsePathStyle bool `alloy:"use_path_style,attr,optional"` + Region string `alloy:"region,attr,optional"` + SigningRegion string `alloy:"signing_region,attr,optional"` } const minimumPollFrequency = 30 * time.Second @@ -52,5 +52,5 @@ func (a *Arguments) Validate() error { // Exports implements the file content type Exports struct { - Content alloytypes.OptionalSecret `river:"content,attr"` + Content alloytypes.OptionalSecret `alloy:"content,attr"` } diff --git a/internal/component/remote/vault/auth.go b/internal/component/remote/vault/auth.go index 9d27fe26b9..e494ff9aef 100644 --- a/internal/component/remote/vault/auth.go +++ b/internal/component/remote/vault/auth.go @@ -29,15 +29,15 @@ type authMethod interface { // component instance. These are embedded as an enum field so only one may be // set per AuthArguments. type AuthArguments struct { - AuthToken *AuthToken `river:"token,block,optional"` - AuthAppRole *AuthAppRole `river:"approle,block,optional"` - AuthAWS *AuthAWS `river:"aws,block,optional"` - AuthAzure *AuthAzure `river:"azure,block,optional"` - AuthGCP *AuthGCP `river:"gcp,block,optional"` - AuthKubernetes *AuthKubernetes `river:"kubernetes,block,optional"` - AuthLDAP *AuthLDAP `river:"ldap,block,optional"` - AuthUserPass *AuthUserPass `river:"userpass,block,optional"` - AuthCustom *AuthCustom `river:"custom,block,optional"` + AuthToken *AuthToken `alloy:"token,block,optional"` + AuthAppRole *AuthAppRole `alloy:"approle,block,optional"` + AuthAWS *AuthAWS `alloy:"aws,block,optional"` + AuthAzure *AuthAzure `alloy:"azure,block,optional"` + AuthGCP *AuthGCP `alloy:"gcp,block,optional"` + AuthKubernetes *AuthKubernetes `alloy:"kubernetes,block,optional"` + AuthLDAP *AuthLDAP `alloy:"ldap,block,optional"` + AuthUserPass *AuthUserPass `alloy:"userpass,block,optional"` + AuthCustom *AuthCustom `alloy:"custom,block,optional"` } func (a *AuthArguments) authMethod() authMethod { @@ -70,7 +70,7 @@ func (a *AuthArguments) authMethod() authMethod { // AuthToken authenticates against Vault with a token. type AuthToken struct { - Token alloytypes.Secret `river:"token,attr"` + Token alloytypes.Secret `alloy:"token,attr"` } func (a *AuthToken) vaultAuthenticate(ctx context.Context, cli *vault.Client) (*vault.Secret, error) { @@ -80,10 +80,10 @@ func (a *AuthToken) vaultAuthenticate(ctx context.Context, cli *vault.Client) (* // AuthAppRole authenticates against Vault with AppRole. type AuthAppRole struct { - RoleID string `river:"role_id,attr"` - Secret alloytypes.Secret `river:"secret,attr"` - WrappingToken bool `river:"wrapping_token,attr,optional"` - MountPath string `river:"mount_path,attr,optional"` + RoleID string `alloy:"role_id,attr"` + Secret alloytypes.Secret `alloy:"secret,attr"` + WrappingToken bool `alloy:"wrapping_token,attr,optional"` + MountPath string `alloy:"mount_path,attr,optional"` } // DefaultAuthAppRole provides default settings for AuthAppRole. @@ -122,14 +122,14 @@ func (a *AuthAppRole) vaultAuthenticate(ctx context.Context, cli *vault.Client) type AuthAWS struct { // Type specifies the mechanism used to authenticate with AWS. Should be // either ec2 or iam. - Type string `river:"type,attr"` - Region string `river:"region,attr,optional"` - Role string `river:"role,attr,optional"` - IAMServerIDHeader string `river:"iam_server_id_header,attr,optional"` + Type string `alloy:"type,attr"` + Region string `alloy:"region,attr,optional"` + Role string `alloy:"role,attr,optional"` + IAMServerIDHeader string `alloy:"iam_server_id_header,attr,optional"` // EC2SignatureType specifies the signature to use against EC2. Only used // when Type is ec2. Valid options are identity and pkcs7 (default). - EC2SignatureType string `river:"ec2_signature_type,attr,optional"` - MountPath string `river:"mount_path,attr,optional"` + EC2SignatureType string `alloy:"ec2_signature_type,attr,optional"` + MountPath string `alloy:"mount_path,attr,optional"` } const ( @@ -219,9 +219,9 @@ func (a *AuthAWS) vaultAuthenticate(ctx context.Context, cli *vault.Client) (*va // AuthAzure authenticates against Vault with Azure. type AuthAzure struct { - Role string `river:"role,attr"` - ResourceURL string `river:"resource_url,attr,optional"` - MountPath string `river:"mount_path,attr,optional"` + Role string `alloy:"role,attr"` + ResourceURL string `alloy:"resource_url,attr,optional"` + MountPath string `alloy:"mount_path,attr,optional"` } // DefaultAuthAzure provides default settings for AuthAzure. @@ -258,12 +258,12 @@ func (a *AuthAzure) vaultAuthenticate(ctx context.Context, cli *vault.Client) (* // AuthGCP authenticates against Vault with GCP. type AuthGCP struct { - Role string `river:"role,attr"` + Role string `alloy:"role,attr"` // Type specifies the mechanism used to authenticate with GCS. Should be // either gce or iam. - Type string `river:"type,attr"` - IAMServiceAccount string `river:"iam_service_account,attr,optional"` - MountPath string `river:"mount_path,attr,optional"` + Type string `alloy:"type,attr"` + IAMServiceAccount string `alloy:"iam_service_account,attr,optional"` + MountPath string `alloy:"mount_path,attr,optional"` } const ( @@ -330,9 +330,9 @@ func (a *AuthGCP) vaultAuthenticate(ctx context.Context, cli *vault.Client) (*va // AuthKubernetes authenticates against Vault with Kubernetes. type AuthKubernetes struct { - Role string `river:"role,attr"` - ServiceAccountTokenFile string `river:"service_account_file,attr,optional"` - MountPath string `river:"mount_path,attr,optional"` + Role string `alloy:"role,attr"` + ServiceAccountTokenFile string `alloy:"service_account_file,attr,optional"` + MountPath string `alloy:"mount_path,attr,optional"` } // DefaultAuthKubernetes provides default settings for AuthKubernetes. @@ -369,9 +369,9 @@ func (a *AuthKubernetes) vaultAuthenticate(ctx context.Context, cli *vault.Clien // AuthLDAP authenticates against Vault with LDAP. type AuthLDAP struct { - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` - MountPath string `river:"mount_path,attr,optional"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` + MountPath string `alloy:"mount_path,attr,optional"` } // DefaultAuthLDAP provides default settings for AuthLDAP. @@ -406,9 +406,9 @@ func (a *AuthLDAP) vaultAuthenticate(ctx context.Context, cli *vault.Client) (*v // AuthUserPass authenticates against Vault with a username and password. type AuthUserPass struct { - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` - MountPath string `river:"mount_path,attr,optional"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` + MountPath string `alloy:"mount_path,attr,optional"` } // DefaultAuthUserPass provides default settings for AuthUserPass. @@ -444,8 +444,8 @@ func (a *AuthUserPass) vaultAuthenticate(ctx context.Context, cli *vault.Client) // AuthCustom provides a custom authentication method. type AuthCustom struct { // Path to use for logging in (e.g., auth/kubernetes/login, etc.) - Path string `river:"path,attr"` - Data map[string]alloytypes.Secret `river:"data,attr"` + Path string `alloy:"path,attr"` + Data map[string]alloytypes.Secret `alloy:"data,attr"` } // Login implements vault.AuthMethod. diff --git a/internal/component/remote/vault/refresher.go b/internal/component/remote/vault/refresher.go index e752e1ccc7..479e7184eb 100644 --- a/internal/component/remote/vault/refresher.go +++ b/internal/component/remote/vault/refresher.go @@ -258,11 +258,11 @@ func (tm *tokenManager) DebugInfo() secretInfo { } type secretInfo struct { - LatestRequestID string `river:"latest_request_id,attr"` - LastUpdateTime time.Time `river:"last_update_time,attr"` - SecretExpireTime time.Time `river:"secret_expire_time,attr"` - Renewable bool `river:"renewable,attr"` - Warnings []string `river:"warnings,attr"` + LatestRequestID string `alloy:"latest_request_id,attr"` + LastUpdateTime time.Time `alloy:"last_update_time,attr"` + SecretExpireTime time.Time `alloy:"secret_expire_time,attr"` + Renewable bool `alloy:"renewable,attr"` + Warnings []string `alloy:"warnings,attr"` } func getSecretInfo(secret *vault.Secret, updateTime time.Time) secretInfo { diff --git a/internal/component/remote/vault/vault.go b/internal/component/remote/vault/vault.go index ccc06173e5..cfe4fe85ee 100644 --- a/internal/component/remote/vault/vault.go +++ b/internal/component/remote/vault/vault.go @@ -31,21 +31,21 @@ func init() { // Arguments configures remote.vault. type Arguments struct { - Server string `river:"server,attr"` - Namespace string `river:"namespace,attr,optional"` + Server string `alloy:"server,attr"` + Namespace string `alloy:"namespace,attr,optional"` - Path string `river:"path,attr"` + Path string `alloy:"path,attr"` - RereadFrequency time.Duration `river:"reread_frequency,attr,optional"` + RereadFrequency time.Duration `alloy:"reread_frequency,attr,optional"` - ClientOptions ClientOptions `river:"client_options,block,optional"` + ClientOptions ClientOptions `alloy:"client_options,block,optional"` // The user *must* provide exactly one Auth blocks. This must be a slice // because the enum flag requires a slice and being tagged as optional. // // TODO(rfratto): allow the enum flag to be used with a non-slice type. - Auth []AuthArguments `river:"auth,enum,optional"` + Auth []AuthArguments `alloy:"auth,enum,optional"` } // DefaultArguments holds default settings for Arguments. @@ -112,10 +112,10 @@ func (a *Arguments) secretStore(cli *vault.Client) secretStore { // ClientOptions sets extra options on the Client. type ClientOptions struct { - MinRetryWait time.Duration `river:"min_retry_wait,attr,optional"` - MaxRetryWait time.Duration `river:"max_retry_wait,attr,optional"` - MaxRetries int `river:"max_retries,attr,optional"` - Timeout time.Duration `river:"timeout,attr,optional"` + MinRetryWait time.Duration `alloy:"min_retry_wait,attr,optional"` + MaxRetryWait time.Duration `alloy:"max_retry_wait,attr,optional"` + MaxRetries int `alloy:"max_retries,attr,optional"` + Timeout time.Duration `alloy:"timeout,attr,optional"` } // Exports is the values exported by remote.vault. @@ -126,7 +126,7 @@ type Exports struct { // // However, it seems that most secrets engines don't actually return // arbitrary data, so this limitation shouldn't cause any issues in practice. - Data map[string]alloytypes.Secret `river:"data,attr"` + Data map[string]alloytypes.Secret `alloy:"data,attr"` } // Component implements the remote.vault component. @@ -318,6 +318,6 @@ func (c *Component) DebugInfo() interface{} { } type debugInfo struct { - AuthToken secretInfo `river:"auth_token,block"` - Secret secretInfo `river:"secret,block"` + AuthToken secretInfo `alloy:"auth_token,block"` + Secret secretInfo `alloy:"secret,block"` } diff --git a/internal/flow/componenttest/testfailmodule.go b/internal/flow/componenttest/testfailmodule.go index b5f4de1757..ddd5c4ae18 100644 --- a/internal/flow/componenttest/testfailmodule.go +++ b/internal/flow/componenttest/testfailmodule.go @@ -40,8 +40,8 @@ func init() { } type TestFailArguments struct { - Content string `river:"content,attr"` - Fail bool `river:"fail,attr,optional"` + Content string `alloy:"content,attr"` + Fail bool `alloy:"fail,attr,optional"` } type TestFailModule struct { diff --git a/internal/flow/flow_services_test.go b/internal/flow/flow_services_test.go index 80404b80f4..b6674ad9dc 100644 --- a/internal/flow/flow_services_test.go +++ b/internal/flow/flow_services_test.go @@ -49,7 +49,7 @@ func TestServices(t *testing.T) { func TestServices_Configurable(t *testing.T) { defer verifyNoGoroutineLeaks(t) type ServiceOptions struct { - Name string `river:"name,attr"` + Name string `alloy:"name,attr"` } ctx, cancel := context.WithCancel(context.Background()) @@ -104,7 +104,7 @@ func TestServices_Configurable(t *testing.T) { func TestServices_Configurable_Optional(t *testing.T) { defer verifyNoGoroutineLeaks(t) type ServiceOptions struct { - Name string `river:"name,attr,optional"` + Name string `alloy:"name,attr,optional"` } ctx, cancel := context.WithCancel(context.Background()) diff --git a/internal/flow/internal/controller/loader_test.go b/internal/flow/internal/controller/loader_test.go index b0eb2ac884..1fdd42b0ee 100644 --- a/internal/flow/internal/controller/loader_test.go +++ b/internal/flow/internal/controller/loader_test.go @@ -328,7 +328,7 @@ func TestLoader_Services(t *testing.T) { return service.Definition{ Name: "testsvc", ConfigType: struct { - Name string `river:"name,attr,optional"` + Name string `alloy:"name,attr,optional"` }{}, Stability: featuregate.StabilityBeta, } diff --git a/internal/flow/internal/controller/node_config_argument.go b/internal/flow/internal/controller/node_config_argument.go index 75d8b7e6a2..fe85dcac60 100644 --- a/internal/flow/internal/controller/node_config_argument.go +++ b/internal/flow/internal/controller/node_config_argument.go @@ -37,9 +37,9 @@ func NewArgumentConfigNode(block *ast.BlockStmt, globals ComponentGlobals) *Argu } type argumentBlock struct { - Optional bool `river:"optional,attr,optional"` - Default any `river:"default,attr,optional"` - Comment string `river:"comment,attr,optional"` + Optional bool `alloy:"optional,attr,optional"` + Default any `alloy:"default,attr,optional"` + Comment string `alloy:"comment,attr,optional"` } // Evaluate implements BlockNode and updates the arguments for the managed config block diff --git a/internal/flow/internal/controller/node_config_export.go b/internal/flow/internal/controller/node_config_export.go index 8983c0e33c..eb6df4ce45 100644 --- a/internal/flow/internal/controller/node_config_export.go +++ b/internal/flow/internal/controller/node_config_export.go @@ -36,7 +36,7 @@ func NewExportConfigNode(block *ast.BlockStmt, globals ComponentGlobals) *Export } type exportBlock struct { - Value any `river:"value,attr"` + Value any `alloy:"value,attr"` } // Evaluate implements BlockNode and updates the arguments for the managed config block diff --git a/internal/flow/internal/controller/value_cache_test.go b/internal/flow/internal/controller/value_cache_test.go index 7b4daa252a..2cbc92d2a4 100644 --- a/internal/flow/internal/controller/value_cache_test.go +++ b/internal/flow/internal/controller/value_cache_test.go @@ -7,14 +7,14 @@ import ( ) type fooArgs struct { - Something bool `river:"something,attr"` + Something bool `alloy:"something,attr"` } type fooExports struct { - SomethingElse bool `river:"something_else,attr"` + SomethingElse bool `alloy:"something_else,attr"` } type barArgs struct { - Number int `river:"number,attr"` + Number int `alloy:"number,attr"` } func TestValueCache(t *testing.T) { diff --git a/internal/flow/internal/importsource/import_file.go b/internal/flow/internal/importsource/import_file.go index 9887a38410..06e83bf166 100644 --- a/internal/flow/internal/importsource/import_file.go +++ b/internal/flow/internal/importsource/import_file.go @@ -57,11 +57,11 @@ func NewImportFile(managedOpts component.Options, eval *vm.Evaluator, onContentC type FileArguments struct { // Filename indicates the file to watch. - Filename string `river:"filename,attr"` + Filename string `alloy:"filename,attr"` // Type indicates how to detect changes to the file. - Type filedetector.Detector `river:"detector,attr,optional"` + Type filedetector.Detector `alloy:"detector,attr,optional"` // PollFrequency determines the frequency to check for changes when Type is Poll. - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` } var DefaultFileArguments = FileArguments{ diff --git a/internal/flow/internal/importsource/import_git.go b/internal/flow/internal/importsource/import_git.go index 93a5da668d..d0eec75a5e 100644 --- a/internal/flow/internal/importsource/import_git.go +++ b/internal/flow/internal/importsource/import_git.go @@ -43,11 +43,11 @@ var ( ) type GitArguments struct { - Repository string `river:"repository,attr"` - Revision string `river:"revision,attr,optional"` - Path string `river:"path,attr"` - PullFrequency time.Duration `river:"pull_frequency,attr,optional"` - GitAuthConfig vcs.GitAuthConfig `river:",squash"` + Repository string `alloy:"repository,attr"` + Revision string `alloy:"revision,attr,optional"` + Path string `alloy:"path,attr"` + PullFrequency time.Duration `alloy:"pull_frequency,attr,optional"` + GitAuthConfig vcs.GitAuthConfig `alloy:",squash"` } var DefaultGitArguments = GitArguments{ diff --git a/internal/flow/internal/importsource/import_http.go b/internal/flow/internal/importsource/import_http.go index 15e29a3d67..30c2e19338 100644 --- a/internal/flow/internal/importsource/import_http.go +++ b/internal/flow/internal/importsource/import_http.go @@ -36,15 +36,15 @@ func NewImportHTTP(managedOpts component.Options, eval *vm.Evaluator, onContentC // HTTPArguments holds values which are used to configure the remote.http component. type HTTPArguments struct { - URL string `river:"url,attr"` - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` - PollTimeout time.Duration `river:"poll_timeout,attr,optional"` + URL string `alloy:"url,attr"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` + PollTimeout time.Duration `alloy:"poll_timeout,attr,optional"` - Method string `river:"method,attr,optional"` - Headers map[string]string `river:"headers,attr,optional"` - Body string `river:"body,attr,optional"` + Method string `alloy:"method,attr,optional"` + Headers map[string]string `alloy:"headers,attr,optional"` + Body string `alloy:"body,attr,optional"` - Client common_config.HTTPClientConfig `river:"client,block,optional"` + Client common_config.HTTPClientConfig `alloy:"client,block,optional"` } // DefaultHTTPArguments holds default settings for HTTPArguments. diff --git a/internal/flow/internal/importsource/import_string.go b/internal/flow/internal/importsource/import_string.go index 38b52297f7..b66970821f 100644 --- a/internal/flow/internal/importsource/import_string.go +++ b/internal/flow/internal/importsource/import_string.go @@ -27,7 +27,7 @@ func NewImportString(eval *vm.Evaluator, onContentChange func(map[string]string) } type importStringConfigBlock struct { - Content alloytypes.OptionalSecret `river:"content,attr"` + Content alloytypes.OptionalSecret `alloy:"content,attr"` } func (im *ImportString) Evaluate(scope *vm.Scope) error { diff --git a/internal/flow/internal/testcomponents/count.go b/internal/flow/internal/testcomponents/count.go index c284136f0d..fb7d81a87f 100644 --- a/internal/flow/internal/testcomponents/count.go +++ b/internal/flow/internal/testcomponents/count.go @@ -27,12 +27,12 @@ func init() { } type CountConfig struct { - Frequency time.Duration `river:"frequency,attr"` - Max int `river:"max,attr"` + Frequency time.Duration `alloy:"frequency,attr"` + Max int `alloy:"max,attr"` } type CountExports struct { - Count int `river:"count,attr,optional"` + Count int `alloy:"count,attr,optional"` } type Count struct { diff --git a/internal/flow/internal/testcomponents/module/file/file.go b/internal/flow/internal/testcomponents/module/file/file.go index c211d56519..bb223f53be 100644 --- a/internal/flow/internal/testcomponents/module/file/file.go +++ b/internal/flow/internal/testcomponents/module/file/file.go @@ -28,10 +28,10 @@ func init() { // Arguments holds values which are used to configure the module.file component. type Arguments struct { - LocalFileArguments file.Arguments `river:",squash"` + LocalFileArguments file.Arguments `alloy:",squash"` // Arguments to pass into the module. - Arguments map[string]any `river:"arguments,block,optional"` + Arguments map[string]any `alloy:"arguments,block,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/flow/internal/testcomponents/module/git/git.go b/internal/flow/internal/testcomponents/module/git/git.go index 2a57a21278..5fafe6894a 100644 --- a/internal/flow/internal/testcomponents/module/git/git.go +++ b/internal/flow/internal/testcomponents/module/git/git.go @@ -32,13 +32,13 @@ func init() { // Arguments configures the module.git component. type Arguments struct { - Repository string `river:"repository,attr"` - Revision string `river:"revision,attr,optional"` - Path string `river:"path,attr"` - PullFrequency time.Duration `river:"pull_frequency,attr,optional"` + Repository string `alloy:"repository,attr"` + Revision string `alloy:"revision,attr,optional"` + Path string `alloy:"path,attr"` + PullFrequency time.Duration `alloy:"pull_frequency,attr,optional"` - Arguments map[string]any `river:"arguments,block,optional"` - GitAuthConfig vcs.GitAuthConfig `river:",squash"` + Arguments map[string]any `alloy:"arguments,block,optional"` + GitAuthConfig vcs.GitAuthConfig `alloy:",squash"` } // DefaultArguments holds default settings for Arguments. @@ -255,8 +255,8 @@ func (c *Component) CurrentHealth() component.Health { // DebugInfo implements component.DebugComponent. func (c *Component) DebugInfo() interface{} { type DebugInfo struct { - SHA string `river:"sha,attr"` - RepoError string `river:"repo_error,attr,optional"` + SHA string `alloy:"sha,attr"` + RepoError string `alloy:"repo_error,attr,optional"` } c.mut.RLock() diff --git a/internal/flow/internal/testcomponents/module/http/http.go b/internal/flow/internal/testcomponents/module/http/http.go index 5bfc76b79a..fd69a6cd64 100644 --- a/internal/flow/internal/testcomponents/module/http/http.go +++ b/internal/flow/internal/testcomponents/module/http/http.go @@ -28,9 +28,9 @@ func init() { // Arguments holds values which are used to configure the module.http component. type Arguments struct { - RemoteHTTPArguments remote_http.Arguments `river:",squash"` + RemoteHTTPArguments remote_http.Arguments `alloy:",squash"` - Arguments map[string]any `river:"arguments,block,optional"` + Arguments map[string]any `alloy:"arguments,block,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/flow/internal/testcomponents/module/module.go b/internal/flow/internal/testcomponents/module/module.go index 1357d7c026..e83df417a8 100644 --- a/internal/flow/internal/testcomponents/module/module.go +++ b/internal/flow/internal/testcomponents/module/module.go @@ -25,7 +25,7 @@ type ModuleComponent struct { // Exports holds values which are exported from the run module. type Exports struct { // Exports exported from the running module. - Exports map[string]any `river:"exports,block"` + Exports map[string]any `alloy:"exports,block"` } // NewModuleComponent initializes a new ModuleComponent. diff --git a/internal/flow/internal/testcomponents/module/string/string.go b/internal/flow/internal/testcomponents/module/string/string.go index 65c25dd9dc..e5b92416d8 100644 --- a/internal/flow/internal/testcomponents/module/string/string.go +++ b/internal/flow/internal/testcomponents/module/string/string.go @@ -26,10 +26,10 @@ func init() { // component. type Arguments struct { // Content to load for the module. - Content alloytypes.OptionalSecret `river:"content,attr"` + Content alloytypes.OptionalSecret `alloy:"content,attr"` // Arguments to pass into the module. - Arguments map[string]any `river:"arguments,block,optional"` + Arguments map[string]any `alloy:"arguments,block,optional"` } // Component implements the module.string component. diff --git a/internal/flow/internal/testcomponents/passthrough.go b/internal/flow/internal/testcomponents/passthrough.go index 108bfd61f8..4a079a4f53 100644 --- a/internal/flow/internal/testcomponents/passthrough.go +++ b/internal/flow/internal/testcomponents/passthrough.go @@ -25,14 +25,14 @@ func init() { // PassthroughConfig configures the testcomponents.passthrough component. type PassthroughConfig struct { - Input string `river:"input,attr"` - Lag time.Duration `river:"lag,attr,optional"` + Input string `alloy:"input,attr"` + Lag time.Duration `alloy:"lag,attr,optional"` } // PassthroughExports describes exported fields for the // testcomponents.passthrough component. type PassthroughExports struct { - Output string `river:"output,attr,optional"` + Output string `alloy:"output,attr,optional"` } // Passthrough implements the testcomponents.passthrough component, where it @@ -88,5 +88,5 @@ func (t *Passthrough) DebugInfo() interface{} { } type passthroughDebugInfo struct { - ComponentVersion string `river:"component_version,attr"` + ComponentVersion string `alloy:"component_version,attr"` } diff --git a/internal/flow/internal/testcomponents/sumation.go b/internal/flow/internal/testcomponents/sumation.go index 8318ff070e..7df8fb0f2f 100644 --- a/internal/flow/internal/testcomponents/sumation.go +++ b/internal/flow/internal/testcomponents/sumation.go @@ -24,12 +24,12 @@ func init() { } type SummationConfig struct { - Input int `river:"input,attr"` + Input int `alloy:"input,attr"` } type SummationExports struct { - Sum int `river:"sum,attr"` - LastAdded int `river:"last_added,attr"` + Sum int `alloy:"sum,attr"` + LastAdded int `alloy:"last_added,attr"` } type Summation struct { diff --git a/internal/flow/internal/testcomponents/tick.go b/internal/flow/internal/testcomponents/tick.go index e75622644e..1e16f60cab 100644 --- a/internal/flow/internal/testcomponents/tick.go +++ b/internal/flow/internal/testcomponents/tick.go @@ -27,12 +27,12 @@ func init() { // TickConfig configures the testcomponents.tick component. type TickConfig struct { - Frequency time.Duration `river:"frequency,attr"` + Frequency time.Duration `alloy:"frequency,attr"` } // TickExports describes exported fields for the testcomponents.tick component. type TickExports struct { - Time time.Time `river:"tick_time,attr,optional"` + Time time.Time `alloy:"tick_time,attr,optional"` } // Tick implements the testcomponents.tick component, where the wallclock time diff --git a/internal/flow/logging/options.go b/internal/flow/logging/options.go index 1cde94fffa..0fbb576456 100644 --- a/internal/flow/logging/options.go +++ b/internal/flow/logging/options.go @@ -12,10 +12,10 @@ import ( // Options is a set of options used to construct and configure a Logger. type Options struct { - Level Level `river:"level,attr,optional"` - Format Format `river:"format,attr,optional"` + Level Level `alloy:"level,attr,optional"` + Format Format `alloy:"format,attr,optional"` - WriteTo []loki.LogsReceiver `river:"write_to,attr,optional"` + WriteTo []loki.LogsReceiver `alloy:"write_to,attr,optional"` } // DefaultOptions holds defaults for creating a Logger. diff --git a/internal/flow/module_test.go b/internal/flow/module_test.go index 663d058757..6b2b25981c 100644 --- a/internal/flow/module_test.go +++ b/internal/flow/module_test.go @@ -291,11 +291,11 @@ func init() { } type TestArguments struct { - Content string `river:"content,attr"` + Content string `alloy:"content,attr"` } type TestExports struct { - Exports map[string]interface{} `river:"exports,attr"` + Exports map[string]interface{} `alloy:"exports,attr"` } type testModule struct { diff --git a/internal/flow/tracing/tracing.go b/internal/flow/tracing/tracing.go index 9d1a174e33..1da4c26d1b 100644 --- a/internal/flow/tracing/tracing.go +++ b/internal/flow/tracing/tracing.go @@ -38,28 +38,28 @@ var ( type Options struct { // SamplingFraction determines which rate of traces to sample. A value of 1 // means to keep 100% of traces. A value of 0 means to keep 0% of traces. - SamplingFraction float64 `river:"sampling_fraction,attr,optional"` + SamplingFraction float64 `alloy:"sampling_fraction,attr,optional"` // Sampler holds optional samplers to configure on top of the sampling // fraction. - Sampler SamplerOptions `river:"sampler,block,optional"` + Sampler SamplerOptions `alloy:"sampler,block,optional"` // WriteTo holds a set of OpenTelemetry Collector consumers where internal // traces should be sent. - WriteTo []otelcol.Consumer `river:"write_to,attr,optional"` + WriteTo []otelcol.Consumer `alloy:"write_to,attr,optional"` } type SamplerOptions struct { - JaegerRemote *JaegerRemoteSamplerOptions `river:"jaeger_remote,block,optional"` + JaegerRemote *JaegerRemoteSamplerOptions `alloy:"jaeger_remote,block,optional"` // TODO(rfratto): if support for another sampler is added, SamplerOptions // must enforce that only one inner block is provided. } type JaegerRemoteSamplerOptions struct { - URL string `river:"url,attr,optional"` - MaxOperations int `river:"max_operations,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` + URL string `alloy:"url,attr,optional"` + MaxOperations int `alloy:"max_operations,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` } // SetToDefault implements river.Defaulter. diff --git a/internal/service/cluster/cluster.go b/internal/service/cluster/cluster.go index 30c7a1cc45..d98b5faf69 100644 --- a/internal/service/cluster/cluster.go +++ b/internal/service/cluster/cluster.go @@ -363,7 +363,7 @@ type Component interface { // component. ComponentBlock is intended to be exposed as a block called // "clustering". type ComponentBlock struct { - Enabled bool `river:"enabled,attr"` + Enabled bool `alloy:"enabled,attr"` } // Cluster is a read-only view of a cluster. diff --git a/internal/service/http/http.go b/internal/service/http/http.go index 26c93e3911..516d037a7a 100644 --- a/internal/service/http/http.go +++ b/internal/service/http/http.go @@ -52,7 +52,7 @@ type Options struct { // Arguments holds runtime settings for the HTTP service. type Arguments struct { - TLS *TLSArguments `river:"tls,block,optional"` + TLS *TLSArguments `alloy:"tls,block,optional"` } type Service struct { diff --git a/internal/service/http/tls.go b/internal/service/http/tls.go index c46b8f3fcd..97c181721e 100644 --- a/internal/service/http/tls.go +++ b/internal/service/http/tls.go @@ -15,42 +15,42 @@ import ( // TLSArguments configures TLS settings for the HTTP service. type TLSArguments struct { - Cert string `river:"cert_pem,attr,optional"` - CertFile string `river:"cert_file,attr,optional"` - Key alloytypes.Secret `river:"key_pem,attr,optional"` - KeyFile string `river:"key_file,attr,optional"` - ClientCA string `river:"client_ca_pem,attr,optional"` - ClientCAFile string `river:"client_ca_file,attr,optional"` - ClientAuth ClientAuth `river:"client_auth_type,attr,optional"` - CipherSuites []TLSCipher `river:"cipher_suites,attr,optional"` - CurvePreferences []TLSCurve `river:"curve_preferences,attr,optional"` - MinVersion TLSVersion `river:"min_version,attr,optional"` - MaxVersion TLSVersion `river:"max_version,attr,optional"` + Cert string `alloy:"cert_pem,attr,optional"` + CertFile string `alloy:"cert_file,attr,optional"` + Key alloytypes.Secret `alloy:"key_pem,attr,optional"` + KeyFile string `alloy:"key_file,attr,optional"` + ClientCA string `alloy:"client_ca_pem,attr,optional"` + ClientCAFile string `alloy:"client_ca_file,attr,optional"` + ClientAuth ClientAuth `alloy:"client_auth_type,attr,optional"` + CipherSuites []TLSCipher `alloy:"cipher_suites,attr,optional"` + CurvePreferences []TLSCurve `alloy:"curve_preferences,attr,optional"` + MinVersion TLSVersion `alloy:"min_version,attr,optional"` + MaxVersion TLSVersion `alloy:"max_version,attr,optional"` // Windows Certificate Filter - WindowsFilter *WindowsCertificateFilter `river:"windows_certificate_filter,block,optional"` + WindowsFilter *WindowsCertificateFilter `alloy:"windows_certificate_filter,block,optional"` } // WindowsCertificateFilter represents the configuration for accessing the Windows store type WindowsCertificateFilter struct { - Server *WindowsServerFilter `river:"server,block"` - Client *WindowsClientFilter `river:"client,block"` + Server *WindowsServerFilter `alloy:"server,block"` + Client *WindowsClientFilter `alloy:"client,block"` } // WindowsClientFilter is used to select a client root CA certificate type WindowsClientFilter struct { - IssuerCommonNames []string `river:"issuer_common_names,attr,optional"` - SubjectRegEx string `river:"subject_regex,attr,optional"` - TemplateID string `river:"template_id,attr,optional"` + IssuerCommonNames []string `alloy:"issuer_common_names,attr,optional"` + SubjectRegEx string `alloy:"subject_regex,attr,optional"` + TemplateID string `alloy:"template_id,attr,optional"` } // WindowsServerFilter is used to select a server certificate type WindowsServerFilter struct { - Store string `river:"store,attr,optional"` - SystemStore string `river:"system_store,attr,optional"` - IssuerCommonNames []string `river:"issuer_common_names,attr,optional"` - TemplateID string `river:"template_id,attr,optional"` - RefreshInterval time.Duration `river:"refresh_interval,attr,optional"` + Store string `alloy:"store,attr,optional"` + SystemStore string `alloy:"system_store,attr,optional"` + IssuerCommonNames []string `alloy:"issuer_common_names,attr,optional"` + TemplateID string `alloy:"template_id,attr,optional"` + RefreshInterval time.Duration `alloy:"refresh_interval,attr,optional"` } var _ syntax.Defaulter = (*WindowsServerFilter)(nil) diff --git a/internal/service/remotecfg/remotecfg.go b/internal/service/remotecfg/remotecfg.go index 2d2365d912..75bafd8071 100644 --- a/internal/service/remotecfg/remotecfg.go +++ b/internal/service/remotecfg/remotecfg.go @@ -62,11 +62,11 @@ type Options struct { // Arguments holds runtime settings for the remotecfg service. type Arguments struct { - URL string `river:"url,attr,optional"` - ID string `river:"id,attr,optional"` - Metadata map[string]string `river:"metadata,attr,optional"` - PollFrequency time.Duration `river:"poll_frequency,attr,optional"` - HTTPClientConfig *config.HTTPClientConfig `river:",squash"` + URL string `alloy:"url,attr,optional"` + ID string `alloy:"id,attr,optional"` + Metadata map[string]string `alloy:"metadata,attr,optional"` + PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"` + HTTPClientConfig *config.HTTPClientConfig `alloy:",squash"` } // GetDefaultArguments populates the default values for the Arguments struct. diff --git a/internal/vcs/auth.go b/internal/vcs/auth.go index 68b1646e64..b9d0610734 100644 --- a/internal/vcs/auth.go +++ b/internal/vcs/auth.go @@ -10,8 +10,8 @@ import ( ) type GitAuthConfig struct { - BasicAuth *BasicAuth `river:"basic_auth,block,optional"` - SSHKey *SSHKey `river:"ssh_key,block,optional"` + BasicAuth *BasicAuth `alloy:"basic_auth,block,optional"` + SSHKey *SSHKey `alloy:"ssh_key,block,optional"` } // Convert converts HTTPClientConfig to the native Prometheus type. If h is @@ -33,8 +33,8 @@ func (h *GitAuthConfig) Convert() transport.AuthMethod { } type BasicAuth struct { - Username string `river:"username,attr"` - Password alloytypes.Secret `river:"password,attr"` + Username string `alloy:"username,attr"` + Password alloytypes.Secret `alloy:"password,attr"` } // Convert converts our type to the native prometheus type @@ -49,10 +49,10 @@ func (b *BasicAuth) Convert() (t transport.AuthMethod) { } type SSHKey struct { - Username string `river:"username,attr"` - Key alloytypes.Secret `river:"key,attr,optional"` - Keyfile string `river:"key_file,attr,optional"` - Passphrase alloytypes.Secret `river:"passphrase,attr,optional"` + Username string `alloy:"username,attr"` + Key alloytypes.Secret `alloy:"key,attr,optional"` + Keyfile string `alloy:"key_file,attr,optional"` + Passphrase alloytypes.Secret `alloy:"passphrase,attr,optional"` } // Convert converts our type to the native prometheus type