Class NoopRequestSpan
A NOOP implementation of IRequest
Inherited Members
Namespace: Couchbase.Core.Diagnostics.Tracing
Assembly: Couchbase.NetClient.dll
Syntax
public sealed class NoopRequestSpan : IRequestSpan, IDisposable
Constructors
| Edit this page View SourceNoopRequestSpan()
Creates a new NoopRequestSpan.
Declaration
public NoopRequestSpan()
NoopRequestSpan(IRequestTracer?, IRequestSpan?)
Creates a new NoopRequestSpan.
Declaration
public NoopRequestSpan(IRequestTracer? tracer, IRequestSpan? parentSpan = null)
Parameters
Type | Name | Description |
---|---|---|
IRequest |
tracer | The IRequest |
IRequest |
parentSpan | The IRequest |
Fields
| Edit this page View SourceInstance
Declaration
public static readonly IRequestSpan Instance
Field Value
Type | Description |
---|---|
IRequest |
Properties
| Edit this page View SourceCanWrite
If true IRequest
Declaration
public bool CanWrite { get; }
Property Value
Type | Description |
---|---|
bool |
Duration
The duration of the span set after Dispose() or End() is called.
Declaration
public uint? Duration { get; }
Property Value
Type | Description |
---|---|
uint? |
Id
The id, possibly from the underlying activity, of the span.
Declaration
public string? Id { get; }
Property Value
Type | Description |
---|---|
string |
Parent
The optional parent span.
Declaration
public IRequestSpan? Parent { get; set; }
Property Value
Type | Description |
---|---|
IRequest |
Methods
| Edit this page View SourceAddEvent(string, DateTimeOffset?)
Sets an event on the span which translates to the corresponding implementation.
Declaration
public IRequestSpan AddEvent(string name, DateTimeOffset? timestamp = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the event. |
Date |
timestamp | The timestamp when it happened. |
Returns
Type | Description |
---|---|
IRequest |
Remarks
Depending upon the implementation the event might be ignored (NOOP) for example.
ChildSpan(string)
Creates a child span from this span.
Declaration
public IRequestSpan ChildSpan(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the span. |
Returns
Type | Description |
---|---|
IRequest |
A child span with references to the parent span. |
Dispose()
Declaration
public void Dispose()
End()
Completes the span.
Declaration
public void End()
SetAttribute(string, bool)
Sets an attribute on the span which is translated to a corresponding implementation specific tag.
Declaration
public IRequestSpan SetAttribute(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of attribute. |
bool | value | The boolean value of the attribute. |
Returns
Type | Description |
---|---|
IRequest |
Remarks
Depending upon the implementation the attribute might be ignored (NOOP) for example.
SetAttribute(string, string)
Sets an attribute on the span which is translated to a corresponding implementation specific tag.
Declaration
public IRequestSpan SetAttribute(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of attribute. |
string | value | The string value of the attribute. |
Returns
Type | Description |
---|---|
IRequest |
Remarks
Depending upon the implementation the attribute might be ignored (NOOP) for example.
SetAttribute(string, uint)
Sets an attribute on the span which is translated to a corresponding implementation specific tag.
Declaration
public IRequestSpan SetAttribute(string key, uint value)
Parameters
Returns
Type | Description |
---|---|
IRequest |
Remarks
Depending upon the implementation the attribute might be ignored (NOOP) for example.