- Rename RedisSpan -> SpanHandle for generic span handling - Generalize TelemetryController methods: startSpan/endSpan with dbSystem param - Rename RedisOtelSpan -> OtelSpanHandle in rbcs-server-otel - Update Redis cache handler to use new generic API - Add OpenTelemetry tracing for memcache GET and SET commands - Add channel property to MemcacheRequestController for server address attribution - Add uses TelemetryController directive in memcache module-info Memcache spans follow the same pattern as Redis: db.system=memcache, db.operation=GET|SET, server.address, server.port
This commit is contained in:
+4
-1
@@ -2,9 +2,12 @@ package net.woggioni.rbcs.api;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface RedisSpan {
|
||||
public interface SpanHandle {
|
||||
|
||||
void setAttribute(@NotNull String key, @NotNull String value);
|
||||
|
||||
void setAttribute(@NotNull String key, long value);
|
||||
|
||||
void setAttribute(@NotNull String key, boolean value);
|
||||
|
||||
}
|
||||
@@ -4,13 +4,15 @@ import io.netty.channel.ChannelHandler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface TelemetryController {
|
||||
void initialize();
|
||||
@NotNull ChannelHandler createHandler();
|
||||
|
||||
@Nullable RedisSpan startRedisSpan(@NotNull String command, @NotNull String key);
|
||||
@Nullable SpanHandle startSpan(@NotNull String command);
|
||||
|
||||
void endRedisSpan(@Nullable RedisSpan span);
|
||||
void endSpan(@Nullable SpanHandle span);
|
||||
|
||||
void endRedisSpan(@Nullable RedisSpan span, @NotNull Throwable error);
|
||||
void endSpan(@Nullable SpanHandle span, @NotNull Throwable error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user