Understanding grafana alloy relabeling

Hi all,

I am trying to understand the following configuration, in particular discovery.relabel and prometheus.relabel

discovery.relabel "metrics_integrations_integrations_rclone" {
	targets = [{
		__address__ = "localhost:5572",
	}]

	rule {
		target_label = "instance"
		replacement  = constants.hostname
	}
}

prometheus.scrape "metrics_integrations_integrations_rclone" {
	targets    = discovery.relabel.metrics_integrations_integrations_rclone.output
	forward_to = [prometheus.relabel.metrics_integrations_integrations_rclone.receiver]
	job_name   = "integrations/rclone"
}

prometheus.relabel "metrics_integrations_integrations_rclone" {
	forward_to = [prometheus.remote_write.metrics_service.receiver]

	rule {
		source_labels = ["__name__"]
		regex         = "up|rclone_bytes_transferred_total|rclone_checked_files_total|rclone_dirs_deleted_total|rclone_errors_total|rclone_files_deleted_total|rclone_files_renamed_total|rclone_files_transferred_total|rclone_speed"
		action        = "keep"
	}
}

How would the two rules look like in the otel collector distro? I was trying to reproduce the output with metric_relabel_configs and relabel_configs, but without success. So I am probably not understanding correctly how discovery.relabel and prometheus.relable works.

My otel configuration which is working except for the relabeling:

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: integrations/rclone
          scrape_interval: 5s
          static_configs:
            - targets: [localhost:5572]
          basic_auth:
            username: 'username'
            password: 'password'

exporters:
  otlphttp:
    endpoint: 'ENDPOINT'
    headers:
      Authorization: 'TOKEN'
  debug:
    verbosity: detailed

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      exporters: [otlphttp,debug]

So can anybody tell me, how the two relabeling rules would look like in the Collector config?

Thanks,
Florian