Related: #92337. When tracing REST requests with APM, we capture HTTP headers as labels on the trace, but redact sensitive values. However, we can't know ahead of time what are all possible sensitive values. It would be better if it was possible to configure additional patterns to redact.
modules/apm/src/main/java/org/elasticsearch/tracing/apm/APM.java
private final SetOnce<APMTracer> tracer = new SetOnce<>();
    private final Settings settings;
    public APM(Settings settings) {
        this.settings = settings;
    }
    @Override
    public Tracer getTracer(Settings settings) {
        final APMTracer apmTracer = new APMTracer(settings);
        tracer.set(apmTracer);
        return apmTracer;
    }
    @Override
    public Collection<Object> createComponents(
        Client client,
        ClusterService clusterService,
        ThreadPool threadPool,
        ResourceWatcherService resourceWatcherService,
        ScriptService scriptService,