class DefaultLettuceObservationConvention implements LettuceObservationConvention {

    private final boolean includeCommandArgsInSpanTags;

    /**
     *
     */
    DefaultLettuceObservationConvention(boolean includeCommandArgsInSpanTags) {
        this.includeCommandArgsInSpanTags = includeCommandArgsInSpanTags;
    }

    @Override
    public KeyValues getLowCardinalityKeyValues(LettuceObservationContext context) {<FILL_FUNCTION_BODY>}

    @Override
    public KeyValues getHighCardinalityKeyValues(LettuceObservationContext context) {

        RedisCommand<?, ?, ?> command = context.getRequiredCommand();

        if (includeCommandArgsInSpanTags) {

            if (command.getArgs() != null) {
                return KeyValues.of(HighCardinalityCommandKeyNames.STATEMENT
                        .withValue(command.getType().name() + " " + command.getArgs().toCommandString()));
            }
        }

        return KeyValues.empty();
    }

    @Override
    public String getContextualName(LettuceObservationContext context) {
        return context.getRequiredCommand().getType().name().toLowerCase(Locale.ROOT);
    }

    public boolean includeCommandArgsInSpanTags() {
        return includeCommandArgsInSpanTags;
    }

}


        Tracing.Endpoint ep = context.getRequiredEndpoint();
        KeyValues keyValues = KeyValues.of(LowCardinalityCommandKeyNames.DATABASE_SYSTEM.withValue("redis"), //
                LowCardinalityCommandKeyNames.REDIS_COMMAND.withValue(context.getRequiredCommand().getType().name()));

        if (ep instanceof SocketAddressEndpoint) {

            SocketAddressEndpoint endpoint = (SocketAddressEndpoint) ep;

            if (endpoint.getSocketAddress() instanceof InetSocketAddress) {

                InetSocketAddress inet = (InetSocketAddress) endpoint.getSocketAddress();
                keyValues = keyValues
                        .and(KeyValues.of(LowCardinalityCommandKeyNames.NET_SOCK_PEER_ADDR.withValue(inet.getHostString()),
                                LowCardinalityCommandKeyNames.NET_SOCK_PEER_PORT.withValue("" + inet.getPort()),
                                LowCardinalityCommandKeyNames.NET_TRANSPORT.withValue("IP.TCP")));
            } else {
                keyValues = keyValues
                        .and(KeyValues.of(LowCardinalityCommandKeyNames.NET_PEER_NAME.withValue(endpoint.toString()),
                                LowCardinalityCommandKeyNames.NET_TRANSPORT.withValue("Unix")));
            }
        }

        return keyValues;
    
<no_super_class>