Index

A C E G H I K M N O R S T 
All Classes and Interfaces|All Packages

A

avgDuration() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns the value of the avgDuration record component.

C

clear() - Method in class cloud.opencode.base.observability.SlowLogCollector
Clears all buffered slow log entries and resets the current-size counter.
close() - Method in class cloud.opencode.base.observability.OpenTelemetryTracer
 
close() - Method in interface cloud.opencode.base.observability.Span
Closes this span by calling Span.end().
close() - Method in interface cloud.opencode.base.observability.Tracer
Closes this tracer and releases any underlying resources.
close() - Method in class cloud.opencode.base.observability.Tracer.NoopTracer
 
cloud.opencode.base.observability - module cloud.opencode.base.observability
OpenCode Base Observability Module OpenCode 基础可观测性模块
cloud.opencode.base.observability - package cloud.opencode.base.observability
 
count() - Method in class cloud.opencode.base.observability.SlowLogCollector
Returns the total number of slow operations ever recorded (cumulative, never reset by clear).
create() - Static method in class cloud.opencode.base.observability.SlowLogCollector
Creates a collector with the default 10ms threshold and 1024 max entries.
create(String) - Static method in class cloud.opencode.base.observability.OpenTelemetryTracer
Creates an OpenTelemetryTracer for the given service name.
create(Duration) - Static method in class cloud.opencode.base.observability.SlowLogCollector
Creates a collector with the given threshold and the default 1024 max entries.
create(Duration, int) - Static method in class cloud.opencode.base.observability.SlowLogCollector
Creates a collector with the given threshold and max entries.

E

elapsed() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns the value of the elapsed record component.
EMPTY - Static variable in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Empty stats instance returned when no slow operations have been recorded.
end() - Method in interface cloud.opencode.base.observability.Span
Ends this span, recording its duration.
Entry(String, String, Duration, Instant, String) - Constructor for record class cloud.opencode.base.observability.SlowLogCollector.Entry
Compact canonical constructor with null validation.
equals(Object) - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Indicates whether some other object is "equal to" this one.

G

getEntries() - Method in class cloud.opencode.base.observability.SlowLogCollector
Returns all buffered slow log entries ordered from newest to oldest.
getEntries(int) - Method in class cloud.opencode.base.observability.SlowLogCollector
Returns up to limit of the latest slow log entries.

H

hashCode() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns a hash code value for this object.
hashCode() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns a hash code value for this object.

I

isOtelAvailable() - Method in class cloud.opencode.base.observability.OpenTelemetryTracer
Returns whether OpenTelemetry API was detected on the classpath.

K

key() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns the value of the key record component.

M

maxDuration() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns the value of the maxDuration record component.
maxEntries() - Method in class cloud.opencode.base.observability.SlowLogCollector
Returns the configured maximum number of buffered entries.

N

noop() - Static method in interface cloud.opencode.base.observability.Tracer
Returns a no-op Tracer that creates no-op spans with zero overhead.
NOOP - Static variable in interface cloud.opencode.base.observability.Span
A shared no-op Span instance with zero overhead.

O

OpenTelemetryTracer - Class in cloud.opencode.base.observability
OpenTelemetry integration for operation tracing with graceful no-op fallback.
operation() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns the value of the operation record component.

R

record(String, String, Duration) - Method in class cloud.opencode.base.observability.SlowLogCollector
Records an operation if its elapsed time exceeds the configured threshold.

S

serviceName() - Method in class cloud.opencode.base.observability.OpenTelemetryTracer
Returns the configured service name.
setAttribute(String, String) - Method in interface cloud.opencode.base.observability.Span
Sets a custom string attribute on this span.
setError(Throwable) - Method in interface cloud.opencode.base.observability.Span
Records an error that occurred during this operation.
setHit(boolean) - Method in interface cloud.opencode.base.observability.Span
Records whether this operation was a hit or a miss.
slowestOperation() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns the value of the slowestOperation record component.
SlowLogCollector - Class in cloud.opencode.base.observability
Bounded slow-operation log collector, inspired by Redis SLOWLOG.
SlowLogCollector.Entry - Record Class in cloud.opencode.base.observability
A single slow log entry capturing details of a slow operation.
SlowLogCollector.Stats - Record Class in cloud.opencode.base.observability
Aggregated statistics for recorded slow operations.
Span - Interface in cloud.opencode.base.observability
Represents a single trace span for an operation, supporting AutoCloseable for try-with-resources.
startSpan(String, String) - Method in class cloud.opencode.base.observability.OpenTelemetryTracer
 
startSpan(String, String) - Method in class cloud.opencode.base.observability.Tracer.NoopTracer
 
startSpan(String, String) - Method in interface cloud.opencode.base.observability.Tracer
Starts a new trace span for the given operation.
stats() - Method in class cloud.opencode.base.observability.SlowLogCollector
Computes aggregated statistics for all currently buffered entries.
Stats(long, Duration, Duration, String) - Constructor for record class cloud.opencode.base.observability.SlowLogCollector.Stats
Creates an instance of a Stats record class.

T

threadName() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns the value of the threadName record component.
threshold() - Method in class cloud.opencode.base.observability.SlowLogCollector
Returns the configured slow operation threshold.
timestamp() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns the value of the timestamp record component.
toString() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Entry
Returns a string representation of this record class.
toString() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns a string representation of this record class.
toString() - Method in class cloud.opencode.base.observability.Tracer.NoopTracer
 
totalSlowOps() - Method in record class cloud.opencode.base.observability.SlowLogCollector.Stats
Returns the value of the totalSlowOps record component.
Tracer - Interface in cloud.opencode.base.observability
Framework-agnostic tracing abstraction for creating Span instances around operations.
Tracer.NoopTracer - Class in cloud.opencode.base.observability
No-op implementation of Tracer with zero overhead.
A C E G H I K M N O R S T 
All Classes and Interfaces|All Packages