Unable to set service_name in a Docker/Alloy/Loki setup

    otelcol.processor.transform "fixes" {
      error_mode = "silent"

      log_statements {
        context = "log"
        statements = [
          `set(resource.attributes["service.name"], attributes["service.name"])`,
        ]
      }

      output {
        logs    = [...]
      }
    }

Alloy is/was focused on Loki/Loki exporter and there is option to use log attributes to define Loki labels - you will need less configs for Loki.
But OTLP exporter needs transformations to achieve the same results.