Exemplo n.º 1
0
Arquivo: fast.cs Projeto: zjmit/go2cs
 // Metric2 sends a label event to the exporter with the supplied labels.
 public static context.Context Metric2(context.Context ctx, label.Label t1, label.Label t2)
 {
     return(Export(ctx, MakeEvent(new array <label.Label>(new label.Label[] { keys.Metric.New(), t1, t2 }), null)));
 }
Exemplo n.º 2
0
Arquivo: fast.cs Projeto: zjmit/go2cs
                            // Start2 sends a span start event with the supplied label list to the exporter.
                            // It also returns a function that will end the span, which should normally be
                            // deferred.
                            public static (context.Context, Action) Start2(context.Context ctx, @string name, label.Label t1, label.Label t2)
                            {
                                context.Context _p0 = default;
                                Action          _p0 = default;

                                return(ExportPair(ctx, MakeEvent(new array <label.Label>(new label.Label[] { keys.Start.Of(name), t1, t2 }), null), MakeEvent(new array <label.Label>(new label.Label[] { keys.End.New() }), null)));
                            }
Exemplo n.º 3
0
Arquivo: fast.cs Projeto: zjmit/go2cs
 // Log2 takes a message and two labels and delivers a log event to the exporter.
 // It is a customized version of Print that is faster and does no allocation.
 public static void Log2(context.Context ctx, @string message, label.Label t1, label.Label t2)
 {
     Export(ctx, MakeEvent(new array <label.Label>(new label.Label[] { keys.Msg.Of(message), t1, t2 }), null));
 }