updateTrace method

Future<void> updateTrace(
  1. Response response
)

update trace

Implementation

Future<void> updateTrace(Response response) async {
  String? trace = response.headers.value(_TRACE_HEADER);
  if (trace == null || trace == _traceCacheValue) {
    return;
  }

  // 更新内存缓存和本地缓存的trace
  _traceCacheValue = trace;
  await _setLocalValue(_traceCacheKey, _traceCacheValue!);
}