For compatibility with NodeNext + esModuleInterop: false
LLM Observability SDK
Add tracer as a named export
Returns a SpanContext instance extracted from carrier
in the given
format
.
The format of the carrier.
The carrier object.
The extracted SpanContext, or null if no such SpanContext could
be found in carrier
Returns an HTML string containing tags that should be included in the
of a document to enable correlating the current trace with the RUM view. Otherwise, it is not possible to associate the trace used to generate the initial HTML document with a given RUM view. The resulting HTML document should not be cached as the meta tags are time-sensitive and are associated with a specific user.Note that this feature is currently not supported by the backend and using it will have no effect.
Initializes the tracer. This should be called before importing other libraries.
Optional
options: TracerOptionsInjects the given SpanContext instance for cross-process propagation
within carrier
The SpanContext to inject into the carrier object. As a convenience, a Span instance may be passed in instead (in which case its .context() is used for the inject()).
The format of the carrier.
The carrier object.
Instruments a function by automatically creating a span activated on its scope.
The span will automatically be finished when one of these conditions is met:
If the orphanable
option is set to false, the function will not be traced
unless there is already an active span or childOf
option. Note that this
option is deprecated and has been removed in version 4.0.
Wrap a function to automatically create a span activated on its scope when it's called.
The span will automatically be finished when one of these conditions is met:
Rest
...args: any[]Generated using TypeDoc
Tracer is the entry-point of the Datadog tracing implementation.