diff --git a/component/metadata/metadata.go b/component/metadata/metadata.go index 614b6546b3e5..0c58f35475ce 100644 --- a/component/metadata/metadata.go +++ b/component/metadata/metadata.go @@ -13,9 +13,9 @@ import ( "github.com/prometheus/prometheus/storage" ) -//TODO(thampiotr): Instead of metadata package reaching into registry, we'll migrate to using a YAML metadata file that -// contains information about all the components. This file will be generated separately from the -// registry and can be used by other tools. +//TODO(thampiotr): Instead of metadata package reaching into registry, we'll migrate to using a YAML schema file that +// contains information about all the available components. This file will be generated separately and +// can be used by other tools. type Type struct { Name string @@ -123,10 +123,7 @@ func (m Metadata) ExportsType(t Type) bool { return false } -var currentComponent = "" - func ForComponent(name string) (Metadata, error) { - currentComponent = name reg, ok := component.Get(name) if !ok { return Metadata{}, fmt.Errorf("could not find component %q", name) @@ -150,10 +147,6 @@ func inferMetadata(args component.Arguments, exports component.Exports) Metadata func hasFieldOfType(obj interface{}, fieldType reflect.Type) bool { objValue := reflect.ValueOf(obj) - if fieldType.String() == "[]otelcol.Consumer" && currentComponent == "otelcol.receiver.loki" { - fmt.Println("gotcha") - } - // If the object is a pointer, dereference it for objValue.Kind() == reflect.Ptr { objValue = objValue.Elem() diff --git a/docs/sources/flow/reference/compatibility/_index.md b/docs/sources/flow/reference/compatibility/_index.md index 972e80881aec..b780e80eec99 100644 --- a/docs/sources/flow/reference/compatibility/_index.md +++ b/docs/sources/flow/reference/compatibility/_index.md @@ -183,6 +183,7 @@ on the namespace to expand and see more detail. {{< /collapse >}} {{< collapse title="prometheus" >}} +- [prometheus.operator.podmonitors]({{< relref "../components/prometheus.operator.podmonitors.md" >}}) - [prometheus.operator.probes]({{< relref "../components/prometheus.operator.probes.md" >}}) - [prometheus.operator.servicemonitors]({{< relref "../components/prometheus.operator.servicemonitors.md" >}}) - [prometheus.receive_http]({{< relref "../components/prometheus.receive_http.md" >}}) diff --git a/docs/sources/flow/reference/components/discovery.azure.md b/docs/sources/flow/reference/components/discovery.azure.md index ab6e8670a0a6..85c78276032a 100644 --- a/docs/sources/flow/reference/components/discovery.azure.md +++ b/docs/sources/flow/reference/components/discovery.azure.md @@ -156,7 +156,6 @@ Replace the following: `discovery.azure` has exports that can be consumed by the following components: -- Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}}) - Components that consume [Targets]({{< relref "../compatibility/#targets-consumers" >}}) Note that connecting some components may not be feasible or components may require further configuration to make the connection work correctly. Please refer to the linked documentation for more details. diff --git a/docs/sources/flow/reference/components/local.file.md b/docs/sources/flow/reference/components/local.file.md index c6db8284181b..0199a088a71c 100644 --- a/docs/sources/flow/reference/components/local.file.md +++ b/docs/sources/flow/reference/components/local.file.md @@ -82,6 +82,3 @@ local.file "secret_key" { is_secret = true } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/mimir.rules.kubernetes.md b/docs/sources/flow/reference/components/mimir.rules.kubernetes.md index b070a54c5701..88bc56acc751 100644 --- a/docs/sources/flow/reference/components/mimir.rules.kubernetes.md +++ b/docs/sources/flow/reference/components/mimir.rules.kubernetes.md @@ -267,6 +267,3 @@ roleRef: name: grafana-agent apiGroup: rbac.authorization.k8s.io ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/module.file.md b/docs/sources/flow/reference/components/module.file.md index 34c148869557..7e976cb5d861 100644 --- a/docs/sources/flow/reference/components/module.file.md +++ b/docs/sources/flow/reference/components/module.file.md @@ -163,6 +163,3 @@ prometheus.remote_write "grafana_cloud" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/module.git.md b/docs/sources/flow/reference/components/module.git.md index 744cc9fe8f54..21e9ad885486 100644 --- a/docs/sources/flow/reference/components/module.git.md +++ b/docs/sources/flow/reference/components/module.git.md @@ -215,6 +215,3 @@ module.git "add" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/module.http.md b/docs/sources/flow/reference/components/module.http.md index 7c30ef653c22..959fdb48418f 100644 --- a/docs/sources/flow/reference/components/module.http.md +++ b/docs/sources/flow/reference/components/module.http.md @@ -170,6 +170,3 @@ export "redis_targets" { Replace the following: - `REDIS_ADDR`: The address of your Redis instance. - `REDIS_PASSWORD_FILE`: The path to a file containing the password for your Redis instance. - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/module.string.md b/docs/sources/flow/reference/components/module.string.md index d8a9ef709656..497c320ceae8 100644 --- a/docs/sources/flow/reference/components/module.string.md +++ b/docs/sources/flow/reference/components/module.string.md @@ -161,6 +161,3 @@ prometheus.remote_write "grafana_cloud" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.auth.basic.md b/docs/sources/flow/reference/components/otelcol.auth.basic.md index 54202d6be30d..885eb53f09fa 100644 --- a/docs/sources/flow/reference/components/otelcol.auth.basic.md +++ b/docs/sources/flow/reference/components/otelcol.auth.basic.md @@ -77,6 +77,3 @@ otelcol.auth.basic "creds" { ``` [otelcol.exporter.otlp]: {{< relref "./otelcol.exporter.otlp.md" >}} - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.auth.bearer.md b/docs/sources/flow/reference/components/otelcol.auth.bearer.md index b36f223bc63d..718789603b49 100644 --- a/docs/sources/flow/reference/components/otelcol.auth.bearer.md +++ b/docs/sources/flow/reference/components/otelcol.auth.bearer.md @@ -105,6 +105,3 @@ otelcol.auth.bearer "creds" { [otelcol.exporter.otlp]: {{< relref "./otelcol.exporter.otlp.md" >}} [otelcol.exporter.otlphttp]: {{< relref "./otelcol.exporter.otlphttp.md" >}} - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.auth.headers.md b/docs/sources/flow/reference/components/otelcol.auth.headers.md index d423005e083d..bd93a9045e31 100644 --- a/docs/sources/flow/reference/components/otelcol.auth.headers.md +++ b/docs/sources/flow/reference/components/otelcol.auth.headers.md @@ -117,6 +117,3 @@ otelcol.auth.headers "creds" { ``` [otelcol.exporter.otlp]: {{< relref "./otelcol.exporter.otlp.md" >}} - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.auth.oauth2.md b/docs/sources/flow/reference/components/otelcol.auth.oauth2.md index 2baa1c693fa0..3ef5bc26880a 100644 --- a/docs/sources/flow/reference/components/otelcol.auth.oauth2.md +++ b/docs/sources/flow/reference/components/otelcol.auth.oauth2.md @@ -122,6 +122,3 @@ otelcol.auth.oauth2 "creds" { ``` [otelcol.exporter.otlp]: {{< relref "./otelcol.exporter.otlp.md" >}} - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.auth.sigv4.md b/docs/sources/flow/reference/components/otelcol.auth.sigv4.md index 7f6a01af737e..e4fc91df2832 100644 --- a/docs/sources/flow/reference/components/otelcol.auth.sigv4.md +++ b/docs/sources/flow/reference/components/otelcol.auth.sigv4.md @@ -173,6 +173,3 @@ otelcol.auth.sigv4 "creds" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/otelcol.extension.jaeger_remote_sampling.md b/docs/sources/flow/reference/components/otelcol.extension.jaeger_remote_sampling.md index f045d8205817..650407ff0a0b 100644 --- a/docs/sources/flow/reference/components/otelcol.extension.jaeger_remote_sampling.md +++ b/docs/sources/flow/reference/components/otelcol.extension.jaeger_remote_sampling.md @@ -307,6 +307,3 @@ otelcol.extension.jaeger_remote_sampling "example" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/remote.http.md b/docs/sources/flow/reference/components/remote.http.md index 7b6ce60ed8f2..ebf805728bbd 100644 --- a/docs/sources/flow/reference/components/remote.http.md +++ b/docs/sources/flow/reference/components/remote.http.md @@ -155,6 +155,3 @@ prometheus.remote_write "default" { } } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/remote.kubernetes.configmap.md b/docs/sources/flow/reference/components/remote.kubernetes.configmap.md index 003bb21391f1..aba9af2b33f3 100644 --- a/docs/sources/flow/reference/components/remote.kubernetes.configmap.md +++ b/docs/sources/flow/reference/components/remote.kubernetes.configmap.md @@ -157,6 +157,3 @@ prometheus.remote_write "default" { This example assumes that the Secret and ConfigMap have already been created, and that the appropriate field names exist in their data. - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/remote.kubernetes.secret.md b/docs/sources/flow/reference/components/remote.kubernetes.secret.md index b0bc46e638d3..d3996715c772 100644 --- a/docs/sources/flow/reference/components/remote.kubernetes.secret.md +++ b/docs/sources/flow/reference/components/remote.kubernetes.secret.md @@ -168,6 +168,3 @@ prometheus.remote_write "default" { This example assumes that the Secret and ConfigMap have already been created, and that the appropriate field names exist in their data. - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/remote.s3.md b/docs/sources/flow/reference/components/remote.s3.md index 968fa79269ab..7e927e11b51f 100644 --- a/docs/sources/flow/reference/components/remote.s3.md +++ b/docs/sources/flow/reference/components/remote.s3.md @@ -99,6 +99,3 @@ remote.s3 "data" { path = "s3://test-bucket/file.txt" } ``` - - - \ No newline at end of file diff --git a/docs/sources/flow/reference/components/remote.vault.md b/docs/sources/flow/reference/components/remote.vault.md index 24f228e87c8c..a4491bd25c66 100644 --- a/docs/sources/flow/reference/components/remote.vault.md +++ b/docs/sources/flow/reference/components/remote.vault.md @@ -342,6 +342,3 @@ metrics.remote_write "prod" { } } ``` - - - \ No newline at end of file