コード例 #1
0
        public void Validate()
        {
            if (ZipkinBaseUri == null)
            {
                throw new ArgumentNullException("ZipkinBaseUri");
            }

            if (Domain == null)
            {
                Domain = request => new Uri(request.Uri.Host);
            }

            if (ExcludedPathList == null)
            {
                throw new ArgumentNullException("ExcludedPathList");
            }

            if (ExcludedPathList.Any(item => !item.StartsWith("/")))
            {
                throw new ArgumentException("Item of ExcludedPathList must start with '/'. e.g.) '/check_uri'");
            }

            if (SampleRate < 0 || SampleRate > 1)
            {
                throw new ArgumentException("SampleRate must range from 0 to 1.");
            }

            if (NotToBeDisplayedDomainList == null)
            {
                throw new ArgumentNullException("NotToBeDisplayedDomainList");
            }
        }
コード例 #2
0
 internal bool IsInDontSampleList(string path)
 {
     if (path != null)
     {
         if (ExcludedPathList.Any(uri => path.StartsWith(uri, StringComparison.InvariantCultureIgnoreCase)))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
ファイル: ZipkinConfig.cs プロジェクト: sdadek/ZipkinTracer
 private bool IsInDontSampleList(string path)
 {
     return(path != null &&
            ExcludedPathList.Any(uri => path.StartsWith(uri, StringComparison.CurrentCultureIgnoreCase)));
 }