/// <summary>Snippet for CreateSpan</summary> public void CreateSpanRequestObject() { // Snippet: CreateSpan(Span, CallSettings) // Create client TraceServiceClient traceServiceClient = TraceServiceClient.Create(); // Initialize request argument(s) Span request = new Span { SpanName = SpanName.FromProjectTraceSpan("[PROJECT]", "[TRACE]", "[SPAN]"), SpanId = "", ParentSpanId = "", DisplayName = new TruncatableString(), StartTime = new Timestamp(), EndTime = new Timestamp(), Attributes = new Span.Types.Attributes(), StackTrace = new StackTrace(), TimeEvents = new Span.Types.TimeEvents(), Links = new Span.Types.Links(), Status = new Status(), SameProcessAsParentSpan = false, ChildSpanCount = 0, }; // Make the request Span response = traceServiceClient.CreateSpan(request); // End snippet }
/// <summary>Snippet for CreateSpan</summary> public void CreateSpan_RequestObject() { // Snippet: CreateSpan(Span,CallSettings) // Create client TraceServiceClient traceServiceClient = TraceServiceClient.Create(); // Initialize request argument(s) Span request = new Span { SpanName = new SpanName("[PROJECT]", "[TRACE]", "[SPAN]"), SpanId = "", DisplayName = new TruncatableString(), StartTime = new Timestamp(), EndTime = new Timestamp(), }; // Make the request Span response = traceServiceClient.CreateSpan(request); // End snippet }