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/APMTracer.java
*/
    @Override
    public void startTrace(String name, Map<String, Object> attributes) {
        
        var services = this.services;
        if (services == null) {
            return;
        }
        SpanBuilder spanBuilder = services.tracer.spanBuilder(name);
        setSpanAttributes(attributes, spanBuilder);
        spanBuilder.startSpan();
    }
    private static void updateThreadContext(ThreadContext threadContext, APMServices services, Context context) {
        
        threadContext.putTransient(Task.APM_TRACE_CONTEXT, context);
        
        
        services.openTelemetry.getPropagators().getTextMapPropagator().inject(context, threadContext, (tc, key, value) -> {
            if (isSupportedContextKey(key)) {
                tc.putHeader(key, value);
            }
        });
    }
    private Context getParentContext(ThreadContext threadContext) {
        
        
        
        
        Context parentContext = threadContext.getTransient("parent_" + Task.APM_TRACE_CONTEXT);
        if (parentContext == null) {