"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LLAMAINDEX_OTEL_NAME_SUFFIX_RE = void 0;
exports.normalizeLlamaIndexSpanName = normalizeLlamaIndexSpanName;
/** UUID suffix pattern used by OTel tracer on span names (e.g. AgentWorkflow.run-19a481aa-cb99-429a-b1e9-32e74eef067e). */
exports.LLAMAINDEX_OTEL_NAME_SUFFIX_RE = /-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
/**
 * Normalize span name for OTel tracer style: strip trailing UUID so "AgentWorkflow.call_tool-b246a434-..." becomes "AgentWorkflow.call_tool".
 * For openinference style, names are already canonical; pass-through.
 */
function normalizeLlamaIndexSpanName(name, kind) {
    if (!name)
        return '';
    if (kind === 'otel_tracer') {
        return name.replace(exports.LLAMAINDEX_OTEL_NAME_SUFFIX_RE, '');
    }
    return name;
}
//# sourceMappingURL=types.js.map