Beispiel #1
0
        private async Task <ServiceCallResult> CallNext(INodeClientContainer nodeClientContainer, ServiceCallInfo info, Dictionary <string, string> crossProcessBag, ITrace trace)
        {
            if (info.Attachments == null)
            {
                info.Attachments = new Dictionary <string, byte[]>();
            }

            info.Attachments.Add(Constants.CrossProcessBagKey, await serializer.SerializeAsync(crossProcessBag));

            try
            {
                return(await Next.CallAsync(nodeClientContainer, info));
            }
            catch (Exception ex)
            {
                trace.AnnotateWith(PredefinedTag.Error, ex.Message);
                throw ex;
            }
        }
Beispiel #2
0
        public static ITrace AnnotateWith(this ITrace source, PredefinedTag tag, bool value)
        {
            source.AnnotateWith(new BinaryAnnotation(ToStringTag(tag), value));

            return(source);
        }
Beispiel #3
0
        public static ITrace AnnotateWith(this ITrace source, string key, bool value)
        {
            source.AnnotateWith(new BinaryAnnotation(key, value));

            return(source);
        }
Beispiel #4
0
        /// <summary>
        /// Sets a local component name to a trace (usually a local trace)
        /// </summary>
        public static ITrace SetLocalComponentName(this ITrace source, string name)
        {
            source.AnnotateWith(new BinaryAnnotation(StandardAnnotationKeys.LocalComponent, name));

            return(source);
        }