@brizz/sdk 0.1.59 → 0.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
67
67
  var _chunkNF52RMLWcjs = require('./chunk-NF52RMLW.cjs');
68
68
 
69
69
  // src/internal/log/emit.ts
70
- var _api = require('@opentelemetry/api');
70
+ var _apilogs = require('@opentelemetry/api-logs');
71
71
  var localSink = null;
72
72
  var STATE_KEY = /* @__PURE__ */ Symbol.for("brizz.sdk.eventSink");
73
73
  function state() {
@@ -88,7 +88,7 @@ function clearEventSink(sink) {
88
88
  const shared = state();
89
89
  shared.sinks = shared.sinks.filter((other) => other !== sink);
90
90
  }
91
- function emitEvent(name, attributes, body, severityNumber = _api.SeverityNumber.INFO) {
91
+ function emitEvent(name, attributes, body, severityNumber = _apilogs.SeverityNumber.INFO) {
92
92
  const sink = _nullishCoalesce(localSink, () => ( state().sinks.at(-1)));
93
93
  if (!sink) {
94
94
  throw new Error("Brizz must be initialized before accessing LoggingModule");
@@ -97,7 +97,7 @@ function emitEvent(name, attributes, body, severityNumber = _api.SeverityNumber.
97
97
  }
98
98
 
99
99
  // src/internal/trace/session.ts
100
-
100
+ var _api = require('@opentelemetry/api');
101
101
  var sessionTracer = _chunkDC2MFO65cjs.brizzTracerProvider.getTracer("@brizz/sdk");
102
102
  function setCurrentSpanCustomProperties(properties) {
103
103
  const current = _api.trace.getActiveSpan();
package/dist/index.cjs CHANGED
@@ -39,11 +39,11 @@ var _chunkUNLNNKZ7cjs = require('./chunk-UNLNNKZ7.cjs');
39
39
 
40
40
 
41
41
 
42
- var _chunk4QNEI7VZcjs = require('./chunk-4QNEI7VZ.cjs');
42
+ var _chunkY7UFS5CAcjs = require('./chunk-Y7UFS5CA.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunk5QZM5EVPcjs = require('./chunk-5QZM5EVP.cjs');
46
+ var _chunkW6AALBZNcjs = require('./chunk-W6AALBZN.cjs');
47
47
 
48
48
 
49
49
 
@@ -112,7 +112,7 @@ var _api = require('@opentelemetry/api');
112
112
 
113
113
  // src/internal/instrumentation/langgraph/attributes.ts
114
114
  var INSTRUMENTATION_NAME = "@brizz/sdk/langgraph";
115
- var INSTRUMENTATION_VERSION = _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, );
115
+ var INSTRUMENTATION_VERSION = _chunkW6AALBZNcjs.getSDKVersion.call(void 0, );
116
116
  var MODULE_NAME = "@langchain/langgraph";
117
117
  var SUPPORTED_VERSIONS = [">=0.2.0 <2"];
118
118
  function isSupportedVersion(version) {
@@ -483,7 +483,7 @@ var ATTR_ANSWERS = "typesafe.answers";
483
483
  var PATCHED_FLAG2 = /* @__PURE__ */ Symbol.for("brizz.typesafe.patched");
484
484
  var TypeSafeInstrumentation = class extends _instrumentation.InstrumentationBase {
485
485
  constructor(config = {}) {
486
- super(INSTRUMENTATION_NAME2, _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, ), config);
486
+ super(INSTRUMENTATION_NAME2, _chunkW6AALBZNcjs.getSDKVersion.call(void 0, ), config);
487
487
  this.setTracerProvider(_chunkDC2MFO65cjs.brizzTracerProvider);
488
488
  }
489
489
  init() {
@@ -710,7 +710,7 @@ function loadGenAIInstrumentations() {
710
710
  function loadMCPInstrumentation() {
711
711
  void (async () => {
712
712
  try {
713
- const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-UPBKSTB7.cjs")));
713
+ const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-EQPISLLI.cjs")));
714
714
  const mcp = new MCPInstrumentation({ exceptionLogger });
715
715
  _instrumentation.registerInstrumentations.call(void 0, { instrumentations: [mcp], tracerProvider: _chunkDC2MFO65cjs.brizzTracerProvider });
716
716
  _chunkWC573FCIcjs.logger.debug("Auto-loaded MCP instrumentation");
@@ -1321,7 +1321,7 @@ var InstrumentationRegistry = (_class = class _InstrumentationRegistry {construc
1321
1321
  const mcpModules = this.manualModules.mcp;
1322
1322
  void (async () => {
1323
1323
  try {
1324
- const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-UPBKSTB7.cjs")));
1324
+ const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-EQPISLLI.cjs")));
1325
1325
  const instrumentation = new MCPInstrumentation({ exceptionLogger: exceptionLogger2 });
1326
1326
  instrumentation.manuallyInstrument(mcpModules);
1327
1327
  _chunkWC573FCIcjs.logger.debug("Manual instrumentation enabled for MCP");
@@ -1358,7 +1358,7 @@ var InstrumentationRegistry = (_class = class _InstrumentationRegistry {construc
1358
1358
  }, _class);
1359
1359
 
1360
1360
  // src/internal/log/logging.ts
1361
-
1361
+ var _apilogs = require('@opentelemetry/api-logs');
1362
1362
  var _exporterlogsotlphttp = require('@opentelemetry/exporter-logs-otlp-http');
1363
1363
 
1364
1364
  var _sdklogs = require('@opentelemetry/sdk-logs');
@@ -1636,10 +1636,13 @@ function compilePatternEntries(patternEntries) {
1636
1636
  var compiledPatternCache = /* @__PURE__ */ new WeakMap();
1637
1637
  function getCompiledPatternsForRule(rule) {
1638
1638
  const key = rule.patterns;
1639
- if (compiledPatternCache.has(key)) {
1640
- return _nullishCoalesce(compiledPatternCache.get(key), () => ( null));
1639
+ const cached = compiledPatternCache.get(key);
1640
+ if (cached) {
1641
+ return cached;
1641
1642
  }
1642
- const compiled = compilePatternEntries(convertPatternsToPatternEntries(rule.patterns));
1643
+ const entries = convertPatternsToPatternEntries(rule.patterns);
1644
+ const pattern = compilePatternEntries(entries);
1645
+ const compiled = { pattern, custom: pattern && compileCustomEntries(entries) };
1643
1646
  compiledPatternCache.set(key, compiled);
1644
1647
  return compiled;
1645
1648
  }
@@ -1689,11 +1692,40 @@ function executeRegexWithTimeout(pattern, value, timeoutMs = 100) {
1689
1692
  }
1690
1693
  return matches;
1691
1694
  }
1692
- function maskStringByPattern(value, pattern, mode = "full") {
1695
+ var BUILTIN_ENTRIES = new Set(DEFAULT_PII_PATTERNS);
1696
+ function compileCustomEntries(patternEntries) {
1697
+ const groups = patternEntries.filter((entry) => !BUILTIN_ENTRIES.has(entry)).flatMap((entry) => {
1698
+ try {
1699
+ return [getGroupedPattern(entry)];
1700
+ } catch (e5) {
1701
+ return [];
1702
+ }
1703
+ });
1704
+ return groups.length > 0 ? new RegExp(groups.join("|")) : null;
1705
+ }
1706
+ function isDecimalPart(value, match) {
1707
+ const start = match.index;
1708
+ const end = start + match[0].length;
1709
+ if (!/^[0-9]+$/.test(match[0])) {
1710
+ return false;
1711
+ }
1712
+ const afterPoint = value.charAt(start - 1) === "." && /^[0-9]$/.test(value.charAt(start - 2));
1713
+ const beforePoint = value.charAt(end) === "." && /^[0-9]$/.test(value.charAt(end + 1));
1714
+ return afterPoint || beforePoint;
1715
+ }
1716
+ function overlapsAny(match, others) {
1717
+ const end = match.index + match[0].length;
1718
+ return others.some((other) => other.index < end && match.index < other.index + other[0].length);
1719
+ }
1720
+ function maskStringByPattern(value, pattern, mode = "full", custom = pattern) {
1693
1721
  const matches = [];
1694
1722
  try {
1695
1723
  const regexMatches = executeRegexWithTimeout(pattern, value);
1724
+ const customMatches = custom && regexMatches.some((match) => isDecimalPart(value, match)) ? executeRegexWithTimeout(custom, value) : [];
1696
1725
  for (const match of regexMatches) {
1726
+ if (isDecimalPart(value, match) && !overlapsAny(match, customMatches)) {
1727
+ continue;
1728
+ }
1697
1729
  matches.push({
1698
1730
  start: match.index,
1699
1731
  end: match.index + match[0].length,
@@ -1737,11 +1769,11 @@ function maskStringByPatternBasedRule(value, rule) {
1737
1769
  if (!patternEntries || patternEntries.length === 0) {
1738
1770
  return mode === "partial" && value ? value.at(0) + "*****" : "*****";
1739
1771
  }
1740
- const compiledPatterns = getCompiledPatternsForRule(rule);
1741
- if (!compiledPatterns) {
1772
+ const { pattern, custom } = getCompiledPatternsForRule(rule);
1773
+ if (!pattern) {
1742
1774
  return value;
1743
1775
  }
1744
- return maskStringByPattern(value, compiledPatterns, mode);
1776
+ return maskStringByPattern(value, pattern, mode, custom);
1745
1777
  }
1746
1778
  function maskValue(value, rule) {
1747
1779
  if (typeof value === "string") {
@@ -1928,7 +1960,7 @@ var LoggingModule = (_class2 = class _LoggingModule {constructor() { _class2.pro
1928
1960
  const resourceAttributes = {
1929
1961
  ...config.resourceAttributes,
1930
1962
  "service.name": serviceName,
1931
- [BRIZZ_SDK_VERSION]: _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, ),
1963
+ [BRIZZ_SDK_VERSION]: _chunkW6AALBZNcjs.getSDKVersion.call(void 0, ),
1932
1964
  [BRIZZ_SDK_LANGUAGE]: SDK_LANGUAGE
1933
1965
  };
1934
1966
  if (config.environment) {
@@ -1947,7 +1979,7 @@ var LoggingModule = (_class2 = class _LoggingModule {constructor() { _class2.pro
1947
1979
  * `callWithServiceName`, else the configured appName.
1948
1980
  */
1949
1981
  activeLoggerProvider() {
1950
- const serviceName = _chunk4QNEI7VZcjs.resolveServiceNameFromContext.call(void 0, );
1982
+ const serviceName = _chunkY7UFS5CAcjs.resolveServiceNameFromContext.call(void 0, );
1951
1983
  if (!serviceName || !this.config || serviceName === this.config.appName) {
1952
1984
  return this.loggerProvider;
1953
1985
  }
@@ -1970,13 +2002,13 @@ var LoggingModule = (_class2 = class _LoggingModule {constructor() { _class2.pro
1970
2002
  this.loggerProvider = this.createLoggerProvider(config, config.appName);
1971
2003
  }
1972
2004
  _LoggingModule.instance = this;
1973
- _chunk4QNEI7VZcjs.setEventSink.call(void 0, this);
2005
+ _chunkY7UFS5CAcjs.setEventSink.call(void 0, this);
1974
2006
  _chunkWC573FCIcjs.logger.info("Logging module setup completed");
1975
2007
  }
1976
2008
  /**
1977
2009
  * Emit a custom event to the telemetry pipeline
1978
2010
  */
1979
- emitEvent(name, attributes, body, severityNumber = _api.SeverityNumber.INFO) {
2011
+ emitEvent(name, attributes, body, severityNumber = _apilogs.SeverityNumber.INFO) {
1980
2012
  _chunkWC573FCIcjs.logger.debug("Attempting to emit event", {
1981
2013
  name,
1982
2014
  hasAttributes: !!attributes,
@@ -2048,7 +2080,7 @@ var LoggingModule = (_class2 = class _LoggingModule {constructor() { _class2.pro
2048
2080
  if (_LoggingModule.instance === this) {
2049
2081
  _LoggingModule.instance = null;
2050
2082
  }
2051
- _chunk4QNEI7VZcjs.clearEventSink.call(void 0, this);
2083
+ _chunkY7UFS5CAcjs.clearEventSink.call(void 0, this);
2052
2084
  _chunkWC573FCIcjs.logger.debug("Logging module shutdown completed");
2053
2085
  }
2054
2086
  }, _class2.__initStatic(), _class2);
@@ -2179,7 +2211,7 @@ var BrizzSpanExporter = (_class4 = class {
2179
2211
  const resourceAttrs = {
2180
2212
  ...config.resourceAttributes,
2181
2213
  "service.name": config.appName,
2182
- [BRIZZ_SDK_VERSION]: _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, ),
2214
+ [BRIZZ_SDK_VERSION]: _chunkW6AALBZNcjs.getSDKVersion.call(void 0, ),
2183
2215
  [BRIZZ_SDK_LANGUAGE]: SDK_LANGUAGE
2184
2216
  };
2185
2217
  if (config.environment) {
@@ -2543,7 +2575,7 @@ function getSpanProcessor() {
2543
2575
  // src/internal/trace/decision-call.ts
2544
2576
 
2545
2577
 
2546
- var tracer = _chunkDC2MFO65cjs.brizzTracerProvider.getTracer("@brizz/sdk/decision-call", _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, ));
2578
+ var tracer = _chunkDC2MFO65cjs.brizzTracerProvider.getTracer("@brizz/sdk/decision-call", _chunkW6AALBZNcjs.getSDKVersion.call(void 0, ));
2547
2579
  function decisionCall(options, callback) {
2548
2580
  const span = startDecisionSpan(options);
2549
2581
  if (!span) {
@@ -2723,7 +2755,7 @@ var _Brizz = (_class6 = class __Brizz {constructor() { _class6.prototype.__init1
2723
2755
  */
2724
2756
  setupInstrumentation(options) {
2725
2757
  const registry = InstrumentationRegistry.getInstance();
2726
- _chunk5QZM5EVPcjs.configure.call(void 0, resolveMcpSessionTracking(options.mcpSessionTracking));
2758
+ _chunkW6AALBZNcjs.configure.call(void 0, resolveMcpSessionTracking(options.mcpSessionTracking));
2727
2759
  patchInstalledCallbackManager();
2728
2760
  patchInstalledLangGraph();
2729
2761
  patchInstalledTypeSafe();
@@ -2758,7 +2790,7 @@ var _Brizz = (_class6 = class __Brizz {constructor() { _class6.prototype.__init1
2758
2790
  const resourceAttributes = {
2759
2791
  ...resolvedConfig.resourceAttributes,
2760
2792
  "service.name": resolvedConfig.appName,
2761
- [BRIZZ_SDK_VERSION]: _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, ),
2793
+ [BRIZZ_SDK_VERSION]: _chunkW6AALBZNcjs.getSDKVersion.call(void 0, ),
2762
2794
  [BRIZZ_SDK_LANGUAGE]: SDK_LANGUAGE
2763
2795
  };
2764
2796
  if (resolvedConfig.environment) {
@@ -2868,19 +2900,19 @@ var _Brizz = (_class6 = class __Brizz {constructor() { _class6.prototype.__init1
2868
2900
  try {
2869
2901
  const tracingModule = TracingModule.getInstance();
2870
2902
  await tracingModule.shutdown();
2871
- } catch (e5) {
2903
+ } catch (e6) {
2872
2904
  _chunkWC573FCIcjs.logger.debug("Tracing module already shut down or not initialized");
2873
2905
  }
2874
2906
  try {
2875
2907
  const metricsModule = MetricsModule.getInstance();
2876
2908
  metricsModule.shutdown();
2877
- } catch (e6) {
2909
+ } catch (e7) {
2878
2910
  _chunkWC573FCIcjs.logger.debug("Metrics module already shut down or not initialized");
2879
2911
  }
2880
2912
  try {
2881
2913
  const loggingModule = LoggingModule.getInstance();
2882
2914
  await loggingModule.shutdown();
2883
- } catch (e7) {
2915
+ } catch (e8) {
2884
2916
  _chunkWC573FCIcjs.logger.debug("Logging module already shut down or not initialized");
2885
2917
  }
2886
2918
  _chunkWC573FCIcjs.logger.info("All telemetry modules shut down successfully");
@@ -3075,4 +3107,4 @@ var Brizz = new _Brizz();
3075
3107
 
3076
3108
 
3077
3109
 
3078
- exports.Brizz = Brizz; exports.DEFAULT_PII_PATTERNS = DEFAULT_PII_PATTERNS; exports.LogLevel = _chunkWC573FCIcjs.LogLevel; exports.Session = _chunk4QNEI7VZcjs.Session; exports.SessionTitle = _chunk4QNEI7VZcjs.SessionTitle; exports.SeverityNumber = _api.SeverityNumber; exports.addExternalLink = _chunk4QNEI7VZcjs.addExternalLink; exports.callWithMessageId = _chunk4QNEI7VZcjs.callWithMessageId; exports.callWithMute = _chunk4QNEI7VZcjs.callWithMute; exports.callWithOrganization = _chunk4QNEI7VZcjs.callWithOrganization; exports.callWithProperties = _chunk4QNEI7VZcjs.callWithProperties; exports.callWithServiceName = _chunk4QNEI7VZcjs.callWithServiceName; exports.callWithSessionId = _chunk4QNEI7VZcjs.callWithSessionId; exports.callWithUser = _chunk4QNEI7VZcjs.callWithUser; exports.decisionCall = decisionCall; exports.emitEvent = _chunk4QNEI7VZcjs.emitEvent; exports.emitEventWithSessionId = _chunk4QNEI7VZcjs.emitEventWithSessionId; exports.getActiveSession = _chunk4QNEI7VZcjs.getActiveSession; exports.getLogLevel = _chunkWC573FCIcjs.getLogLevel; exports.getMetricsExporter = getMetricsExporter; exports.getMetricsReader = getMetricsReader; exports.getSpanExporter = getSpanExporter; exports.getSpanProcessor = getSpanProcessor; exports.getTracerProvider = _chunkDC2MFO65cjs.getTracerProvider; exports.logger = _chunkWC573FCIcjs.logger; exports.maskAttributes = maskAttributes; exports.maskValue = maskValue; exports.recordDecisionCall = recordDecisionCall; exports.recordFeedback = _chunk4QNEI7VZcjs.recordFeedback; exports.recordMetric = _chunk4QNEI7VZcjs.recordMetric; exports.setAgent = _chunk4QNEI7VZcjs.setAgent; exports.setCurrentSpanCustomProperties = _chunk4QNEI7VZcjs.setCurrentSpanCustomProperties; exports.setLogLevel = _chunkWC573FCIcjs.setLogLevel; exports.setMessageId = _chunk4QNEI7VZcjs.setMessageId; exports.setOrganization = _chunk4QNEI7VZcjs.setOrganization; exports.setServiceName = _chunk4QNEI7VZcjs.setServiceName; exports.setSessionId = _chunk4QNEI7VZcjs.setSessionId; exports.setUser = _chunk4QNEI7VZcjs.setUser; exports.startAgent = _chunk4QNEI7VZcjs.startAgent; exports.startSession = _chunk4QNEI7VZcjs.startSession; exports.startSessionTitle = _chunk4QNEI7VZcjs.startSessionTitle; exports.withAgent = _chunk4QNEI7VZcjs.withAgent; exports.withMessageId = _chunk4QNEI7VZcjs.withMessageId; exports.withMute = _chunk4QNEI7VZcjs.withMute; exports.withOrganization = _chunk4QNEI7VZcjs.withOrganization; exports.withProperties = _chunk4QNEI7VZcjs.withProperties; exports.withServiceName = _chunk4QNEI7VZcjs.withServiceName; exports.withSessionId = _chunk4QNEI7VZcjs.withSessionId; exports.withUser = _chunk4QNEI7VZcjs.withUser;
3110
+ exports.Brizz = Brizz; exports.DEFAULT_PII_PATTERNS = DEFAULT_PII_PATTERNS; exports.LogLevel = _chunkWC573FCIcjs.LogLevel; exports.Session = _chunkY7UFS5CAcjs.Session; exports.SessionTitle = _chunkY7UFS5CAcjs.SessionTitle; exports.SeverityNumber = _apilogs.SeverityNumber; exports.addExternalLink = _chunkY7UFS5CAcjs.addExternalLink; exports.callWithMessageId = _chunkY7UFS5CAcjs.callWithMessageId; exports.callWithMute = _chunkY7UFS5CAcjs.callWithMute; exports.callWithOrganization = _chunkY7UFS5CAcjs.callWithOrganization; exports.callWithProperties = _chunkY7UFS5CAcjs.callWithProperties; exports.callWithServiceName = _chunkY7UFS5CAcjs.callWithServiceName; exports.callWithSessionId = _chunkY7UFS5CAcjs.callWithSessionId; exports.callWithUser = _chunkY7UFS5CAcjs.callWithUser; exports.decisionCall = decisionCall; exports.emitEvent = _chunkY7UFS5CAcjs.emitEvent; exports.emitEventWithSessionId = _chunkY7UFS5CAcjs.emitEventWithSessionId; exports.getActiveSession = _chunkY7UFS5CAcjs.getActiveSession; exports.getLogLevel = _chunkWC573FCIcjs.getLogLevel; exports.getMetricsExporter = getMetricsExporter; exports.getMetricsReader = getMetricsReader; exports.getSpanExporter = getSpanExporter; exports.getSpanProcessor = getSpanProcessor; exports.getTracerProvider = _chunkDC2MFO65cjs.getTracerProvider; exports.logger = _chunkWC573FCIcjs.logger; exports.maskAttributes = maskAttributes; exports.maskValue = maskValue; exports.recordDecisionCall = recordDecisionCall; exports.recordFeedback = _chunkY7UFS5CAcjs.recordFeedback; exports.recordMetric = _chunkY7UFS5CAcjs.recordMetric; exports.setAgent = _chunkY7UFS5CAcjs.setAgent; exports.setCurrentSpanCustomProperties = _chunkY7UFS5CAcjs.setCurrentSpanCustomProperties; exports.setLogLevel = _chunkWC573FCIcjs.setLogLevel; exports.setMessageId = _chunkY7UFS5CAcjs.setMessageId; exports.setOrganization = _chunkY7UFS5CAcjs.setOrganization; exports.setServiceName = _chunkY7UFS5CAcjs.setServiceName; exports.setSessionId = _chunkY7UFS5CAcjs.setSessionId; exports.setUser = _chunkY7UFS5CAcjs.setUser; exports.startAgent = _chunkY7UFS5CAcjs.startAgent; exports.startSession = _chunkY7UFS5CAcjs.startSession; exports.startSessionTitle = _chunkY7UFS5CAcjs.startSessionTitle; exports.withAgent = _chunkY7UFS5CAcjs.withAgent; exports.withMessageId = _chunkY7UFS5CAcjs.withMessageId; exports.withMute = _chunkY7UFS5CAcjs.withMute; exports.withOrganization = _chunkY7UFS5CAcjs.withOrganization; exports.withProperties = _chunkY7UFS5CAcjs.withProperties; exports.withServiceName = _chunkY7UFS5CAcjs.withServiceName; exports.withSessionId = _chunkY7UFS5CAcjs.withSessionId; exports.withUser = _chunkY7UFS5CAcjs.withUser;
package/dist/index.js CHANGED
@@ -39,11 +39,11 @@ import {
39
39
  withServiceName,
40
40
  withSessionId,
41
41
  withUser
42
- } from "./chunk-EZCNPWKM.js";
42
+ } from "./chunk-MPSJSXD3.js";
43
43
  import {
44
44
  configure,
45
45
  getSDKVersion
46
- } from "./chunk-ZGX52S4U.js";
46
+ } from "./chunk-QUIJOAFK.js";
47
47
  import {
48
48
  bindToBrizz,
49
49
  brizzTracerProvider,
@@ -710,7 +710,7 @@ function loadGenAIInstrumentations() {
710
710
  function loadMCPInstrumentation() {
711
711
  void (async () => {
712
712
  try {
713
- const { MCPInstrumentation } = await import("./mcp-TTECBPGZ.js");
713
+ const { MCPInstrumentation } = await import("./mcp-E32E454M.js");
714
714
  const mcp = new MCPInstrumentation({ exceptionLogger });
715
715
  registerInstrumentations({ instrumentations: [mcp], tracerProvider: brizzTracerProvider });
716
716
  logger.debug("Auto-loaded MCP instrumentation");
@@ -1321,7 +1321,7 @@ var InstrumentationRegistry = class _InstrumentationRegistry {
1321
1321
  const mcpModules = this.manualModules.mcp;
1322
1322
  void (async () => {
1323
1323
  try {
1324
- const { MCPInstrumentation } = await import("./mcp-TTECBPGZ.js");
1324
+ const { MCPInstrumentation } = await import("./mcp-E32E454M.js");
1325
1325
  const instrumentation = new MCPInstrumentation({ exceptionLogger: exceptionLogger2 });
1326
1326
  instrumentation.manuallyInstrument(mcpModules);
1327
1327
  logger.debug("Manual instrumentation enabled for MCP");
@@ -1358,7 +1358,7 @@ var InstrumentationRegistry = class _InstrumentationRegistry {
1358
1358
  };
1359
1359
 
1360
1360
  // src/internal/log/logging.ts
1361
- import { SeverityNumber } from "@opentelemetry/api";
1361
+ import { SeverityNumber } from "@opentelemetry/api-logs";
1362
1362
  import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
1363
1363
  import { resourceFromAttributes } from "@opentelemetry/resources";
1364
1364
  import { LoggerProvider } from "@opentelemetry/sdk-logs";
@@ -1636,10 +1636,13 @@ function compilePatternEntries(patternEntries) {
1636
1636
  var compiledPatternCache = /* @__PURE__ */ new WeakMap();
1637
1637
  function getCompiledPatternsForRule(rule) {
1638
1638
  const key = rule.patterns;
1639
- if (compiledPatternCache.has(key)) {
1640
- return compiledPatternCache.get(key) ?? null;
1639
+ const cached = compiledPatternCache.get(key);
1640
+ if (cached) {
1641
+ return cached;
1641
1642
  }
1642
- const compiled = compilePatternEntries(convertPatternsToPatternEntries(rule.patterns));
1643
+ const entries = convertPatternsToPatternEntries(rule.patterns);
1644
+ const pattern = compilePatternEntries(entries);
1645
+ const compiled = { pattern, custom: pattern && compileCustomEntries(entries) };
1643
1646
  compiledPatternCache.set(key, compiled);
1644
1647
  return compiled;
1645
1648
  }
@@ -1689,11 +1692,40 @@ function executeRegexWithTimeout(pattern, value, timeoutMs = 100) {
1689
1692
  }
1690
1693
  return matches;
1691
1694
  }
1692
- function maskStringByPattern(value, pattern, mode = "full") {
1695
+ var BUILTIN_ENTRIES = new Set(DEFAULT_PII_PATTERNS);
1696
+ function compileCustomEntries(patternEntries) {
1697
+ const groups = patternEntries.filter((entry) => !BUILTIN_ENTRIES.has(entry)).flatMap((entry) => {
1698
+ try {
1699
+ return [getGroupedPattern(entry)];
1700
+ } catch {
1701
+ return [];
1702
+ }
1703
+ });
1704
+ return groups.length > 0 ? new RegExp(groups.join("|")) : null;
1705
+ }
1706
+ function isDecimalPart(value, match) {
1707
+ const start = match.index;
1708
+ const end = start + match[0].length;
1709
+ if (!/^[0-9]+$/.test(match[0])) {
1710
+ return false;
1711
+ }
1712
+ const afterPoint = value.charAt(start - 1) === "." && /^[0-9]$/.test(value.charAt(start - 2));
1713
+ const beforePoint = value.charAt(end) === "." && /^[0-9]$/.test(value.charAt(end + 1));
1714
+ return afterPoint || beforePoint;
1715
+ }
1716
+ function overlapsAny(match, others) {
1717
+ const end = match.index + match[0].length;
1718
+ return others.some((other) => other.index < end && match.index < other.index + other[0].length);
1719
+ }
1720
+ function maskStringByPattern(value, pattern, mode = "full", custom = pattern) {
1693
1721
  const matches = [];
1694
1722
  try {
1695
1723
  const regexMatches = executeRegexWithTimeout(pattern, value);
1724
+ const customMatches = custom && regexMatches.some((match) => isDecimalPart(value, match)) ? executeRegexWithTimeout(custom, value) : [];
1696
1725
  for (const match of regexMatches) {
1726
+ if (isDecimalPart(value, match) && !overlapsAny(match, customMatches)) {
1727
+ continue;
1728
+ }
1697
1729
  matches.push({
1698
1730
  start: match.index,
1699
1731
  end: match.index + match[0].length,
@@ -1737,11 +1769,11 @@ function maskStringByPatternBasedRule(value, rule) {
1737
1769
  if (!patternEntries || patternEntries.length === 0) {
1738
1770
  return mode === "partial" && value ? value.at(0) + "*****" : "*****";
1739
1771
  }
1740
- const compiledPatterns = getCompiledPatternsForRule(rule);
1741
- if (!compiledPatterns) {
1772
+ const { pattern, custom } = getCompiledPatternsForRule(rule);
1773
+ if (!pattern) {
1742
1774
  return value;
1743
1775
  }
1744
- return maskStringByPattern(value, compiledPatterns, mode);
1776
+ return maskStringByPattern(value, pattern, mode, custom);
1745
1777
  }
1746
1778
  function maskValue(value, rule) {
1747
1779
  if (typeof value === "string") {
@@ -3024,7 +3056,7 @@ var _Brizz = class __Brizz {
3024
3056
  var Brizz = new _Brizz();
3025
3057
 
3026
3058
  // src/index.ts
3027
- import { SeverityNumber as SeverityNumber2 } from "@opentelemetry/api";
3059
+ import { SeverityNumber as SeverityNumber2 } from "@opentelemetry/api-logs";
3028
3060
  export {
3029
3061
  Brizz,
3030
3062
  DEFAULT_PII_PATTERNS,
@@ -8,7 +8,7 @@ import {
8
8
  resolveTransportSessionId,
9
9
  sessionToolResult,
10
10
  stampAndPropagateSession
11
- } from "./chunk-ZGX52S4U.js";
11
+ } from "./chunk-QUIJOAFK.js";
12
12
  import {
13
13
  brizzTracerProvider,
14
14
  extractTraceContext,
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunk5QZM5EVPcjs = require('./chunk-5QZM5EVP.cjs');
11
+ var _chunkW6AALBZNcjs = require('./chunk-W6AALBZN.cjs');
12
12
 
13
13
 
14
14
 
@@ -410,14 +410,14 @@ function wrapOnRequest(original, tracer) {
410
410
  return original.apply(this, args);
411
411
  }
412
412
  const method = request.method;
413
- if (method === METHOD_TOOLS_CALL && _chunk5QZM5EVPcjs.isSessionToolCall.call(void 0, request)) {
413
+ if (method === METHOD_TOOLS_CALL && _chunkW6AALBZNcjs.isSessionToolCall.call(void 0, request)) {
414
414
  return answerSessionToolCall(this, request, tracer, args, original);
415
415
  }
416
416
  const handler = _nullishCoalesce(handlers.get(method), () => ( this.fallbackRequestHandler));
417
417
  if (!handler) {
418
418
  return original.apply(this, args);
419
419
  }
420
- const tracking = _chunk5QZM5EVPcjs.isEnabled.call(void 0, ) && method === METHOD_TOOLS_CALL ? _chunk5QZM5EVPcjs.popTrackingArguments.call(void 0, request) : {};
420
+ const tracking = _chunkW6AALBZNcjs.isEnabled.call(void 0, ) && method === METHOD_TOOLS_CALL ? _chunkW6AALBZNcjs.popTrackingArguments.call(void 0, request) : {};
421
421
  const started = safeStartServerSpan(tracer, request, this, tracking);
422
422
  if (!started) {
423
423
  return original.apply(this, args);
@@ -427,9 +427,9 @@ function wrapOnRequest(original, tracer) {
427
427
  if (method === METHOD_TOOLS_LIST) {
428
428
  hooks.onResult = (result) => {
429
429
  let advertised = result;
430
- if (_chunk5QZM5EVPcjs.isEnabled.call(void 0, )) {
430
+ if (_chunkW6AALBZNcjs.isEnabled.call(void 0, )) {
431
431
  try {
432
- advertised = _chunk5QZM5EVPcjs.patchListToolsResult.call(void 0, result);
432
+ advertised = _chunkW6AALBZNcjs.patchListToolsResult.call(void 0, result);
433
433
  } catch (error) {
434
434
  _chunkWC573FCIcjs.logger.warn(
435
435
  `Brizz MCP: failed to patch tools/list schemas: ${String(error)}`
@@ -440,7 +440,7 @@ function wrapOnRequest(original, tracer) {
440
440
  try {
441
441
  emitSchemaSpansFromListResponse(
442
442
  advertised,
443
- _chunk5QZM5EVPcjs.resolveTransportSessionId.call(void 0, this),
443
+ _chunkW6AALBZNcjs.resolveTransportSessionId.call(void 0, this),
444
444
  tracer
445
445
  );
446
446
  } catch (error) {
@@ -453,7 +453,7 @@ function wrapOnRequest(original, tracer) {
453
453
  }
454
454
  if (method !== METHOD_TOOLS_CALL) {
455
455
  hooks.onError = () => {
456
- _chunk5QZM5EVPcjs.stampAndPropagateSession.call(void 0, span, _chunk5QZM5EVPcjs.resolveSessionId.call(void 0, this, spanCtx), spanCtx);
456
+ _chunkW6AALBZNcjs.stampAndPropagateSession.call(void 0, span, _chunkW6AALBZNcjs.resolveSessionId.call(void 0, this, spanCtx), spanCtx);
457
457
  };
458
458
  }
459
459
  const wrappedHandler = (req, extra) => _api.context.with(
@@ -487,7 +487,7 @@ function answerSessionToolCall(protocol, request, tracer, args, original) {
487
487
  if (!handlers) {
488
488
  return original.apply(protocol, args);
489
489
  }
490
- const { id, result } = _chunk5QZM5EVPcjs.sessionToolResult.call(void 0, );
490
+ const { id, result } = _chunkW6AALBZNcjs.sessionToolResult.call(void 0, );
491
491
  const started = safeStartServerSpan(tracer, request, protocol, { sessionId: id });
492
492
  const handler = () => started ? _api.context.with(started.spanCtx, () => result) : result;
493
493
  const hadEntry = handlers.has(METHOD_TOOLS_CALL);
@@ -577,8 +577,8 @@ function safeStartServerSpan(tracer, request, protocol, tracking = {}) {
577
577
  parentCtx
578
578
  );
579
579
  applyServerRequestAttributes(span, request, protocol);
580
- const resolved = request.method === METHOD_TOOLS_CALL ? _nullishCoalesce(tracking.sessionId, () => ( _chunk5QZM5EVPcjs.resolveSessionId.call(void 0, protocol, parentCtx))) : void 0;
581
- const { context: sessCtx } = _chunk5QZM5EVPcjs.stampAndPropagateSession.call(void 0,
580
+ const resolved = request.method === METHOD_TOOLS_CALL ? _nullishCoalesce(tracking.sessionId, () => ( _chunkW6AALBZNcjs.resolveSessionId.call(void 0, protocol, parentCtx))) : void 0;
581
+ const { context: sessCtx } = _chunkW6AALBZNcjs.stampAndPropagateSession.call(void 0,
582
582
  span,
583
583
  resolved,
584
584
  parentCtx,
@@ -634,7 +634,7 @@ function safeEnd(span) {
634
634
 
635
635
  // src/internal/instrumentation/mcp/version.ts
636
636
  var INSTRUMENTATION_NAME = "@brizz/sdk/mcp";
637
- var INSTRUMENTATION_VERSION = _chunk5QZM5EVPcjs.getSDKVersion.call(void 0, );
637
+ var INSTRUMENTATION_VERSION = _chunkW6AALBZNcjs.getSDKVersion.call(void 0, );
638
638
 
639
639
  // src/internal/instrumentation/mcp/instrumentation.ts
640
640
  var PROTOCOL_MODULE_NAME = "@modelcontextprotocol/sdk/shared/protocol.js";
package/dist/session.cjs CHANGED
@@ -32,14 +32,14 @@
32
32
 
33
33
 
34
34
 
35
- var _chunk4QNEI7VZcjs = require('./chunk-4QNEI7VZ.cjs');
35
+ var _chunkY7UFS5CAcjs = require('./chunk-Y7UFS5CA.cjs');
36
36
  require('./chunk-DC2MFO65.cjs');
37
37
  require('./chunk-WC573FCI.cjs');
38
38
  require('./chunk-NF52RMLW.cjs');
39
39
  require('./chunk-OBGZSXTJ.cjs');
40
40
 
41
41
  // src/session.ts
42
- var _api = require('@opentelemetry/api');
42
+ var _apilogs = require('@opentelemetry/api-logs');
43
43
 
44
44
 
45
45
 
@@ -75,4 +75,4 @@ var _api = require('@opentelemetry/api');
75
75
 
76
76
 
77
77
 
78
- exports.Session = _chunk4QNEI7VZcjs.Session; exports.SessionTitle = _chunk4QNEI7VZcjs.SessionTitle; exports.SeverityNumber = _api.SeverityNumber; exports.addExternalLink = _chunk4QNEI7VZcjs.addExternalLink; exports.callWithMessageId = _chunk4QNEI7VZcjs.callWithMessageId; exports.callWithMute = _chunk4QNEI7VZcjs.callWithMute; exports.callWithOrganization = _chunk4QNEI7VZcjs.callWithOrganization; exports.callWithProperties = _chunk4QNEI7VZcjs.callWithProperties; exports.callWithServiceName = _chunk4QNEI7VZcjs.callWithServiceName; exports.callWithSessionId = _chunk4QNEI7VZcjs.callWithSessionId; exports.callWithUser = _chunk4QNEI7VZcjs.callWithUser; exports.emitEvent = _chunk4QNEI7VZcjs.emitEvent; exports.emitEventWithSessionId = _chunk4QNEI7VZcjs.emitEventWithSessionId; exports.getActiveSession = _chunk4QNEI7VZcjs.getActiveSession; exports.recordFeedback = _chunk4QNEI7VZcjs.recordFeedback; exports.recordMetric = _chunk4QNEI7VZcjs.recordMetric; exports.setAgent = _chunk4QNEI7VZcjs.setAgent; exports.setCurrentSpanCustomProperties = _chunk4QNEI7VZcjs.setCurrentSpanCustomProperties; exports.setMessageId = _chunk4QNEI7VZcjs.setMessageId; exports.setOrganization = _chunk4QNEI7VZcjs.setOrganization; exports.setServiceName = _chunk4QNEI7VZcjs.setServiceName; exports.setSessionId = _chunk4QNEI7VZcjs.setSessionId; exports.setUser = _chunk4QNEI7VZcjs.setUser; exports.startAgent = _chunk4QNEI7VZcjs.startAgent; exports.startSession = _chunk4QNEI7VZcjs.startSession; exports.startSessionTitle = _chunk4QNEI7VZcjs.startSessionTitle; exports.withAgent = _chunk4QNEI7VZcjs.withAgent; exports.withMessageId = _chunk4QNEI7VZcjs.withMessageId; exports.withMute = _chunk4QNEI7VZcjs.withMute; exports.withOrganization = _chunk4QNEI7VZcjs.withOrganization; exports.withProperties = _chunk4QNEI7VZcjs.withProperties; exports.withServiceName = _chunk4QNEI7VZcjs.withServiceName; exports.withSessionId = _chunk4QNEI7VZcjs.withSessionId; exports.withUser = _chunk4QNEI7VZcjs.withUser;
78
+ exports.Session = _chunkY7UFS5CAcjs.Session; exports.SessionTitle = _chunkY7UFS5CAcjs.SessionTitle; exports.SeverityNumber = _apilogs.SeverityNumber; exports.addExternalLink = _chunkY7UFS5CAcjs.addExternalLink; exports.callWithMessageId = _chunkY7UFS5CAcjs.callWithMessageId; exports.callWithMute = _chunkY7UFS5CAcjs.callWithMute; exports.callWithOrganization = _chunkY7UFS5CAcjs.callWithOrganization; exports.callWithProperties = _chunkY7UFS5CAcjs.callWithProperties; exports.callWithServiceName = _chunkY7UFS5CAcjs.callWithServiceName; exports.callWithSessionId = _chunkY7UFS5CAcjs.callWithSessionId; exports.callWithUser = _chunkY7UFS5CAcjs.callWithUser; exports.emitEvent = _chunkY7UFS5CAcjs.emitEvent; exports.emitEventWithSessionId = _chunkY7UFS5CAcjs.emitEventWithSessionId; exports.getActiveSession = _chunkY7UFS5CAcjs.getActiveSession; exports.recordFeedback = _chunkY7UFS5CAcjs.recordFeedback; exports.recordMetric = _chunkY7UFS5CAcjs.recordMetric; exports.setAgent = _chunkY7UFS5CAcjs.setAgent; exports.setCurrentSpanCustomProperties = _chunkY7UFS5CAcjs.setCurrentSpanCustomProperties; exports.setMessageId = _chunkY7UFS5CAcjs.setMessageId; exports.setOrganization = _chunkY7UFS5CAcjs.setOrganization; exports.setServiceName = _chunkY7UFS5CAcjs.setServiceName; exports.setSessionId = _chunkY7UFS5CAcjs.setSessionId; exports.setUser = _chunkY7UFS5CAcjs.setUser; exports.startAgent = _chunkY7UFS5CAcjs.startAgent; exports.startSession = _chunkY7UFS5CAcjs.startSession; exports.startSessionTitle = _chunkY7UFS5CAcjs.startSessionTitle; exports.withAgent = _chunkY7UFS5CAcjs.withAgent; exports.withMessageId = _chunkY7UFS5CAcjs.withMessageId; exports.withMute = _chunkY7UFS5CAcjs.withMute; exports.withOrganization = _chunkY7UFS5CAcjs.withOrganization; exports.withProperties = _chunkY7UFS5CAcjs.withProperties; exports.withServiceName = _chunkY7UFS5CAcjs.withServiceName; exports.withSessionId = _chunkY7UFS5CAcjs.withSessionId; exports.withUser = _chunkY7UFS5CAcjs.withUser;
package/dist/session.js CHANGED
@@ -32,14 +32,14 @@ import {
32
32
  withServiceName,
33
33
  withSessionId,
34
34
  withUser
35
- } from "./chunk-EZCNPWKM.js";
35
+ } from "./chunk-MPSJSXD3.js";
36
36
  import "./chunk-TDPQDITP.js";
37
37
  import "./chunk-Y4HNUX3Q.js";
38
38
  import "./chunk-GISL4K6Z.js";
39
39
  import "./chunk-3RG5ZIWI.js";
40
40
 
41
41
  // src/session.ts
42
- import { SeverityNumber } from "@opentelemetry/api";
42
+ import { SeverityNumber } from "@opentelemetry/api-logs";
43
43
  export {
44
44
  Session,
45
45
  SessionTitle,
@@ -10,6 +10,6 @@ export { DEFAULT_PII_PATTERNS } from './internal/masking/patterns.js';
10
10
  export { maskValue, maskAttributes } from './internal/masking/utils.js';
11
11
  export { LogLevel, logger, setLogLevel, getLogLevel } from './internal/logger.js';
12
12
  export type { ILogger } from './internal/logger.js';
13
- export { SeverityNumber } from '@opentelemetry/api';
13
+ export { SeverityNumber } from '@opentelemetry/api-logs';
14
14
  export type { AttributeValue } from '@opentelemetry/api';
15
15
  export type { ReadableSpan } from '@opentelemetry/sdk-trace';
@@ -1,5 +1,5 @@
1
- import type { AnyValue } from '@opentelemetry/api';
2
- import { SeverityNumber } from '@opentelemetry/api';
1
+ import type { AnyValue } from '@opentelemetry/api-logs';
2
+ import { SeverityNumber } from '@opentelemetry/api-logs';
3
3
  export interface IEventSink {
4
4
  emitEvent(name: string, attributes?: Record<string, string | number | boolean>, body?: AnyValue, severityNumber?: SeverityNumber): void;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type { AnyValue } from '@opentelemetry/api';
2
- import { SeverityNumber } from '@opentelemetry/api';
1
+ import type { AnyValue } from '@opentelemetry/api-logs';
2
+ import { SeverityNumber } from '@opentelemetry/api-logs';
3
3
  import { LoggerProvider } from '@opentelemetry/sdk-logs';
4
4
  import type { IResolvedBrizzConfig } from '../config.js';
5
5
  export { emitEvent } from './emit.js';
@@ -1,5 +1,5 @@
1
1
  import type { IAttributesMaskingRule, IPatternBasedMaskingRule } from './types.js';
2
- export declare function maskStringByPattern(value: string, pattern: RegExp, mode?: 'partial' | 'full'): string;
2
+ export declare function maskStringByPattern(value: string, pattern: RegExp, mode?: 'partial' | 'full', custom?: RegExp | null): string;
3
3
  export declare function maskStringByPatternBasedRule(value: string, rule: IPatternBasedMaskingRule): string;
4
4
  export declare function maskValue(value: unknown, rule: IPatternBasedMaskingRule): unknown;
5
5
  export declare function maskAttributes(attributes: Record<string, unknown>, rules: readonly IAttributesMaskingRule[], outputOriginalValue?: boolean): Record<string, unknown>;
@@ -1,4 +1,5 @@
1
- import type { AnyValue, Context, Span, AttributeValue, SeverityNumber } from '@opentelemetry/api';
1
+ import type { Context, Span, AttributeValue } from '@opentelemetry/api';
2
+ import type { AnyValue, SeverityNumber } from '@opentelemetry/api-logs';
2
3
  export declare function setCurrentSpanCustomProperties(properties: Record<string, AttributeValue>): void;
3
4
  export declare function callWithProperties<A extends unknown[], F extends (...args: A) => ReturnType<F>>(properties: {
4
5
  [name: string]: string;
@@ -3,4 +3,4 @@ export { emitEventWithSessionId, withSessionId, callWithSessionId, withPropertie
3
3
  export type { IMuteOptions } from './internal/trace/session.js';
4
4
  export { startAgent, withAgent, setAgent } from './internal/trace/agent.js';
5
5
  export type { AgentRef, IAgent, IAgentOptions } from './internal/trace/agent.js';
6
- export { SeverityNumber } from '@opentelemetry/api';
6
+ export { SeverityNumber } from '@opentelemetry/api-logs';
@@ -10,6 +10,6 @@ export { DEFAULT_PII_PATTERNS } from './internal/masking/patterns.js';
10
10
  export { maskValue, maskAttributes } from './internal/masking/utils.js';
11
11
  export { LogLevel, logger, setLogLevel, getLogLevel } from './internal/logger.js';
12
12
  export type { ILogger } from './internal/logger.js';
13
- export { SeverityNumber } from '@opentelemetry/api';
13
+ export { SeverityNumber } from '@opentelemetry/api-logs';
14
14
  export type { AttributeValue } from '@opentelemetry/api';
15
15
  export type { ReadableSpan } from '@opentelemetry/sdk-trace';
@@ -1,5 +1,5 @@
1
- import type { AnyValue } from '@opentelemetry/api';
2
- import { SeverityNumber } from '@opentelemetry/api';
1
+ import type { AnyValue } from '@opentelemetry/api-logs';
2
+ import { SeverityNumber } from '@opentelemetry/api-logs';
3
3
  export interface IEventSink {
4
4
  emitEvent(name: string, attributes?: Record<string, string | number | boolean>, body?: AnyValue, severityNumber?: SeverityNumber): void;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type { AnyValue } from '@opentelemetry/api';
2
- import { SeverityNumber } from '@opentelemetry/api';
1
+ import type { AnyValue } from '@opentelemetry/api-logs';
2
+ import { SeverityNumber } from '@opentelemetry/api-logs';
3
3
  import { LoggerProvider } from '@opentelemetry/sdk-logs';
4
4
  import type { IResolvedBrizzConfig } from '../config.js';
5
5
  export { emitEvent } from './emit.js';
@@ -1,5 +1,5 @@
1
1
  import type { IAttributesMaskingRule, IPatternBasedMaskingRule } from './types.js';
2
- export declare function maskStringByPattern(value: string, pattern: RegExp, mode?: 'partial' | 'full'): string;
2
+ export declare function maskStringByPattern(value: string, pattern: RegExp, mode?: 'partial' | 'full', custom?: RegExp | null): string;
3
3
  export declare function maskStringByPatternBasedRule(value: string, rule: IPatternBasedMaskingRule): string;
4
4
  export declare function maskValue(value: unknown, rule: IPatternBasedMaskingRule): unknown;
5
5
  export declare function maskAttributes(attributes: Record<string, unknown>, rules: readonly IAttributesMaskingRule[], outputOriginalValue?: boolean): Record<string, unknown>;
@@ -1,4 +1,5 @@
1
- import type { AnyValue, Context, Span, AttributeValue, SeverityNumber } from '@opentelemetry/api';
1
+ import type { Context, Span, AttributeValue } from '@opentelemetry/api';
2
+ import type { AnyValue, SeverityNumber } from '@opentelemetry/api-logs';
2
3
  export declare function setCurrentSpanCustomProperties(properties: Record<string, AttributeValue>): void;
3
4
  export declare function callWithProperties<A extends unknown[], F extends (...args: A) => ReturnType<F>>(properties: {
4
5
  [name: string]: string;
@@ -3,4 +3,4 @@ export { emitEventWithSessionId, withSessionId, callWithSessionId, withPropertie
3
3
  export type { IMuteOptions } from './internal/trace/session.js';
4
4
  export { startAgent, withAgent, setAgent } from './internal/trace/agent.js';
5
5
  export type { AgentRef, IAgent, IAgentOptions } from './internal/trace/agent.js';
6
- export { SeverityNumber } from '@opentelemetry/api';
6
+ export { SeverityNumber } from '@opentelemetry/api-logs';