Wrappers around Open Telemetry tracing.
Wrappers around Open Telemetry tracing.
The active OpenTelemetry context used as the parent of any created spans. If nil, then the span is created with the OpenTelemetry's default current context.
This is designed to be bound when a span is created so that new spans created subsequently in other threads (typically, asynchronous execution) can connect to the appropriate context. In those cases, OpenTelemetry's current context is not always accurate, as it is stored in a thread-local variable.
The active OpenTelemetry context used as the parent of any created spans. If nil, then the span is created with the OpenTelemetry's default current context. This is designed to be bound when a span is created so that new spans created subsequently in other threads (typically, asynchronous execution) can connect to the appropriate context. In those cases, OpenTelemetry's current context is not always accurate, as it is stored in a thread-local variable.
(add-attribute span attribute-key attribute-value)
Adds an attribute to a span, typically, to record response attributes such as the status code. This should not be called after the span has ended.
Adds an attribute to a span, typically, to record response attributes such as the status code. This should not be called after the span has ended.
(as-root builder)
Identifies the new span as a root span, with no parent. When this is not called, and span is active in the Open Telemetry context, the active span will be the parent of the new span when the span is started.
Identifies the new span as a root span, with no parent. When this is not called, and span is active in the Open Telemetry context, the active span will be the parent of the new span when the span is started.
(create-span operation-name attributes)
(create-span tracing-source operation-name attributes)
Creates a new span builder, which allows configuration of the span prior to starting it.
Creates a new span builder, which allows configuration of the span prior to starting it.
(end-span span)
Ends the span, which will set its termination time to current time. Every started span must be ended.
Returns nil.
Ends the span, which will set its termination time to current time. Every started span must be ended. Returns nil.
(make-context-current context)
Makes the context the current context, returning a no-args function to close the scope (restoring the prior current scope).
Makes the context the current context, returning a no-args function to close the scope (restoring the prior current scope).
(make-span-context span)
Creates a Context with the current context and the provided span.
Creates a Context with the current context and the provided span.
(record-exception span e)
(rename-span span span-name)
(set-status-code span status-code)
Set the status code of the span to either :ok, :error, or :unset.
Set the status code of the span to either :ok, :error, or :unset.
(start builder)
Builds the span from the span builder, starting and returning it.
Builds the span from the span builder, starting and returning it.
(with-kind builder kind)
Updates the span builder to label the new span with a kind (:internal, :server, :client, :producer, or :consumer).
Updates the span builder to label the new span with a kind (:internal, :server, :client, :producer, or :consumer).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close